diff --git a/source/_integrations/ifttt.markdown b/source/_integrations/ifttt.markdown index 4487b463166..d12255a6b24 100644 --- a/source/_integrations/ifttt.markdown +++ b/source/_integrations/ifttt.markdown @@ -15,13 +15,13 @@ ha_platforms: ## Prerequisites -To be able to receive events from IFTTT, your Home Assistant instance needs to be accessible from the web and you need to have the external URL [configured](/docs/configuration/basic). +To be able to receive events from IFTTT, your Home Assistant instance needs to be accessible from the web and you need to have the external URL [configured](/docs/configuration/basic), or use your Nabu Casa account's webhook URL from the IFTTT integration. {% include integrations/config_flow.md %} -### Using the incoming data +### Receiving events from IFTTT -Events coming in from IFTTT will be available as events in Home Assistant and are fired as `ifttt_webhook_received`. The data specified in IFTTT will be available as the event data. You can use this event to trigger automations. +Events coming in from IFTTT will be available as events in Home Assistant and are fired as `ifttt_webhook_received`. The data specified in the IFTTT recipe Body section will be available as the event data. You can use this event to trigger automations. Use POST as method. For example, set the body of the IFTTT webhook to: @@ -38,15 +38,16 @@ automation: - id: this_is_the_automation_id alias: "The optional automation alias" trigger: - - event_data: - action: call_service + - platform: event event_type: ifttt_webhook_received - platform: event + event_data: + action: call_service # the same action 'name' you used in the Body section of the IFTTT recipe condition: [] action: - - target: + - service: '{{ trigger.event.data.service }}' + target: entity_id: '{{ trigger.event.data.entity_id }}' - service: '{{ trigger.event.data.service }}' + ``` {% endraw %}