Trigger HA Script from IFTTT with Nabu Casa integration

Hello

I am trying to get IFTTT to trigger a script in my Home Assistant installation with the new Nabu Casa integration thingy.
This (https://i.imgur.com/wCilTFO.png) is what I have at the moment in IFTTT. I’m pretty sure this is correct.

Thank you all in advance

Fixed it

You need to put this in the IFTTT body:

{ “action”: “call_service”, “service”: “script.turn_on”, “entity_id”: “script.SCRIPTNAME” }

Set Content Type to application/json and input the Nabu Casa Webhook URL in the URL field.

In home assistant create this automation:

  • id: ‘IFTTT’
    alias: ‘IFTTT’
    trigger:
    platform: event
    event_type: ifttt_webhook_received
    event_data:
    action: call_service
    action:
    service_template: ‘{{ trigger.event.data.service }}’
    data_template:
    entity_id: '{{ trigger.event.data.entity_id }}'ity_id: ‘{{ trigger.event.data.entity_id }}’

Hi @nickjedl, I am trying to trigger an automation via a webhook in home assistant with IFTTT. I also have Nabu Casa and can’t seem to get it to work. Did you use the URL that you get from creating a webhook automation? Or if not, what did you use for the URL? I dont have https set-up other than Nabu Casa.

Nevermind, I figured it out. For anyone else who finds this thread and is wondering the same thing, add IFTTT as an integration, then you will get a URL to use for webhooks.

FWIW, you can also just call the script via IFTTT like this:

{ "action": "call_service", "service": "script.close_garage_door" }
1 Like

Hi Nick,

Thanks for posting your fix! I’m also having issues with IFTTT connecting with Nabu Casa and hass.io. I’m super new to this, so apologies if I get some of the lingo wrong.

I’ve got a script running and working on hass.io, and I’ve got IFTTT integration set up, my questions are;
Do I need anything in the automation.yaml file?
Which URL do I use in the IFTTT applet?

I appreciate any help you can give me.

Thanks in advance!

Add this to your automations.yaml

- id: 'Call Script'
  alias: Call Script
  trigger:
    platform: event
    event_type: ifttt_webhook_received
    event_data:
      action: call_service
  action:
    service_template: '{{ trigger.event.data.service }}'
    data_template:
      entity_id: '{{ trigger.event.data.entity_id }}'

You’ll find your URL in the Webhooks section of your “Home Assistant Cloud” config in HA. It’s under IFFT where you need to enable it first and then you’ll get the URL.

Good luck!