How to resend a MQTT message within a automation

I want to make an automation to resend the data from a MQTT message of a topic that is the trigger type for this automation and resend it out to a notification to my phone.

I have the notification to my phone working fine, I just do not know how to pass on the data form the MQTT message to the notification action part of the automation.

trigger.payload

I have the triggering part down OK, I need more detail please on how once the triggered is activated (which it is) it then passes the MQTT payload into the following yaml code for the activation part:

action:
  - service: telegram_bot.send_message
    data:
      message: THE MQTT MESSAGE
action:
  - service: telegram_bot.send_message
    data:
      message: '{{ trigger.payload }}'

Thanks 123 Taras, I now understand the use of trigger.payload. It is more like triggerED.payload

You’re welcome!

For future reference, when an automation is triggered, there are two template variables that are available:

  1. trigger
  2. this

For more information, refer to: Automation Trigger Variables