IFTTT not working

I’ve been trying to get the IFTTT integration up and running and it doesn’t seem to do anything. I put the IFTTT key in the config file

ifttt:
  key: <my IFTTT Key>

and I made two different automations to try and capture the POST data

- id: '1553895680415'
  alias: FromIFTTT
  trigger:
  - event_data:
      action: call_service
    event_type: ifttt_webhook_received
    platform: event
  condition: []
  action:
  - data_template:
      entity_id: '{{ trigger.event.data.entity_id }}'
    service_template: '{{ trigger.event.data.service }}'
- id: '1622142523937'
  alias: Trying to get IFTTT to work
  description: </3
  trigger:
  - platform: event
    event_type: ifttt_webhook_recieved
  condition: []
  action:
  - service: light.turn_on
    target:
      entity_id: light.living_room_bulb
  mode: single

My POST data from IFTTT

I’ve tried navigating to URL/API/webhook/ in a browser and I get a 405 error which this post suggested a solution to but I don’t know what or where the trusted_networks file is
I’ve also tried removing the port number from the IFTTT URL because I don’t need it when I navigate to my dashboard but that also doesn’t work

This works for me:

- alias: "Landscape On"
  id: my_id_00126
  trigger:
    platform: webhook
    webhook_id: landscape-on-and-some-random-text
  action:
    service: switch.turn_on
    entity_id: switch.landscape_light

Does that just trigger off of any and all webhook requests?

No. Your IFTTT THEN statement would be:

Make a web request
https://example.com/api/webhook/landscape-on-and-some-random-text
Post
text/plain

So, landscape-on-and-some-random-text can be anything you want. As long as it’s the same in your automation and your THAT statement it should work. The random text is to make it difficult for anyone to guess how to turn on your lights.

INTERESTING. That actually worked.

So I just completely bypass that whole entire documentation for the IFTTT integration with long lived access tokens and ect and I don’t need to copy paste a long hexadecimal string whenever I set up a webhook, I can just use plain text and add /api/webhook to the end of my url. That’s so crazy, probably not as secure. But I can just use long randomized text strings for each webhook

Thank you so much!

What about sending from HA to IFTTT? I have the ifttt.trigger service but what format is it expecting the data? No matter what I type I get an error message

You’ve reminded me I set this up several years ago when the IFTTT integration was a PITA. Maybe it still is. As for security, these aren’t nuclear launch codes. If someone guesses my randomized string I would just turn off the offending light and change the string.

I only use IFTTT to communicate from Google Assistant to HASS. I know there are other ways to do that, but IIRC, they all place limitations on how you need to say your command. With IFTTT, my standard is simply ‘Room Name’ followed by ON/OFF e.g. ‘Kitchen On’. Easy for everyone to learn. If there is more than one thing in that room, it would be, say: ‘Kitchen Table On’. FWIW, IFTTT is virtually instant when used like this.

As for going from HASS to IFTTT, I’ve never felt the need to do that. Once I’m in HASS, I can usually go wherever I want without involving IFTTT which adds a layer of complexity.