Using IFTTT with Webhooks - Help

I currently have the GPIO interface above configured, using the GPIO interfaces to trigger other events using IFTTT. I need to migrate to WebHooks given the standing down of current services.

I have successfully created a Webhook that will trigger an action in IFTTT every time particle publishes an event, but I am struggling to extract and interogate the JSON payload so that I can use filtering to identify combinations of PARTICLE_EVENT_NAME and PARTICLE_EVENT_VALUE to trigger specific actions (There are 7 channels active on the device).

I am an experience amateur programmer without extensive knowledge of JSON. I can’t find a web resource of either the basic coding or an example of a similar integration showing the code needed in IFTTT to do this with a web hook. (I do have a Pro account).

The Webhook JSON payload is:

“event”: “{{{PARTICLE_EVENT_NAME}}}”,
“data”: “{{{PARTICLE_EVENT_VALUE}}}”,
“coreid”: “{{{PARTICLE_DEVICE_ID}}}”,
“published_at”: “{{{PARTICLE_PUBLISHED_AT}}}”

An example of what I wish to achieve to trigger a specific IFTTT response when the payload of the WebHook has an PARTICLE_EVENT_NAME of ‘Input_7’ and the PARTICLE_EVENT_VALUE is ‘OFF’.

Can anyone point me in the right direction of a resource to help me write this or event draft a couple of lines of code that I can work from please?


1 Like

Hi Peter-Marc-

You should be able to specify that in your code with nested if statements, though you may need multiple applets. Have the if statements check if the event name is equal to Input_7 and the event value is off. If something meets that criteria, publish an event and use the webhook trigger in IFTTT to run a separate applet to trigger the IFTTT response you want.

1 Like