Webhook call reporting invalid json

Hi All

I just recently upgraded from version 0.7x.x to 0.110. I run HA on Ubuntu 16.04.6 in a virtual environment. Previously I’ve been using api passwords to make external calls to my HA instance to call scripts (from ifttt). Since moving to the new version I’m trying out the new method of authentication and have been struggling to get it to work. I created a ifttt webhook token(?) and I’m using that to make my calls.

The setup seems pretty straight-forward from: https://www.home-assistant.io/integrations/ifttt.

My ifttt configuration looks like this:

My automation configuration looks like this:

- id: ifttt_testing
  alias: automate_ifttt
  - platform: event
    event_type: ifttt_webhook_received
      action: call_service
  condition: []
  - service_template: '{{ trigger.event.data.service }}'
      entity_id: '{{ trigger.event.data.entity_id }}'

The error message I see the in logs when I make a call from ifttt is:

2020-05-27 20:00:13 ERROR (MainThread) [homeassistant.components.ifttt] Received invalid data from IFTTT. Data needs to be formatted as JSON: { “action”: “call_service”, “service”: “script.turn_on”, “entity_id”: “script.temp_notify” }

Needless to say, the script doesn’t run. As an additional test, I replaced the templates in the automation routine with a direct service call to the script. I deleted the json config from the body of the call from ifttt. When triggering the ifttt call, the script did run.

I’m really hope I just missing something simple but I’ve been staring at this for a while and just can’t seem to figure out what I’m missing with the templates/json config.

Anyone have any thoughts on this?

Thanks in advance!!

Finally figured out the issue here. Kind nuanced but the quotes in the json are not quite right:

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

as opposed to this:

{ "action": "call_service", "service": "script.turn_on", "entity_id": "script.temp_notify" }

I don’t exactly recall how those enclosing quotes made it in, but fixing that it’s working now.


Hahaha, I had the same problem! thank you for solving this :wink: you saved me hours of googling.

I think we got the wrong quotes because we copied some json from this forum. Sometimes the quotes change it seems.

Same issue here. Thanks