Need Simple Example of Firing An IFTTT Webhook

I’m pretty new to Home Assistant but have been using IFTTT for years. I’ve already got a bunch of IFTTT webhooks that work. (I’ve already setup the IFTTT API key in my config file and tested it.)

All I’m looking to do is trigger them. I’m having a hard time finding examples on doing that that aren’t too complex. They seem to focus on inbound triggers which is not what I’m looking for.

I basically want a button in my home assistant dashboard that just fires an IFTTT webhook. That’s it.

The IFTTT webhook is WizLivingNightLight

Can someone point me in the right direction? Seems like this should be ultra simple.

Thanks.

Sounds as if you need a “receive web request” trigger in your IFTTT applet, to which you give a name.

Then in HA, you can have an input_button, with an automation that fires when it is pressed. Something like:

- id: '1675268005876'
  alias: Test
  description: ' '
  trigger:
  - platform: state
    entity_id:
    - input_button.test
  condition: 
  action:
  - service: ifttt.trigger
    data:
      event: heat_day
  mode: single

…where “heat_day” is the name of your IFTTT trigger.

I go into the automation section and select scripts, switch over to the YAML editor and pasted in the example with my IFTT name when setting up a button.

I get “Configuration errors detected”

What I’m I doing wrong? I’m pretty new to Home Assistant (couple of weeks.)


The example you give configures the card in the dashboard. Before this will work, you need to:

  • Create your button in Settings | Devices & Services | Helpers
  • Create the automation in Settings | Automations & Scenes | Automations

For the latter, you need to be in automations, not scripts. Automations are triggered by things happening (like a button press); scripts are bits of code without triggers.

Then you can go to your dashboard and add a new card looking something like this in yaml:

show_name: true
show_icon: true
type: button
tap_action:
  action: toggle
entity: input_button.test

The act of tapping the button will trigger the automation, which will send the code to IFTTT.

Might be a good idea to stick to the UI to start with, rather than trying yaml. You can then look at the yaml to see what it’s like.

A note about this forum - when giving examples of code, try not to paste images into posts as this is sometimes confusing. Instead copy the yaml and paste it into the post as preformatted text (</> in the toolbar). Spacing is quite important, so people need to be able to see exactly what you’ve got, and they may want to copy your code, which is difficult with an image.

I am following along here also. Working on the use of IFTTT with HA. I have created a helper button call ‘IFTTT Button’ (go figure) I am trying to create the automation, but not sure how I reference the helper in the trigger of the automation UI.

I have added the button to one of my dashboards. But without the automation I can not fire off the web hook.

Greg

I found a solution to this.
I have been messing around with it all day, but I found another thread that explained how to call a URL.
I ended up having to create a shell command by editing the configuration.yaml,
Once I created the shell command, I was able to action a service to execute the shell command I created.

here’s the thread I found this in for reference.

Using a shell command to trigger a webhook on ifttt will work, but it is way overcomplicating things.

If you have the ifttt integration configured, the example is right there in the docs under sending events to ifttt (read on after the bit about multiple accounts though):

If you do not use the ifttt integration, you could use the restful integration from Home Assistant.