IFTTT Trigger webCore Piston (via POST/JSON)


#1

1) Give a description of the problem
I have a Core Piston that has been working great but decided time to move to webCore. I have a Weather Underground IFTTT trigger that sends a Webhooks web request to a webCore Piston to send me an SMS alert. I used the webCore URL supplied under IFTTT Executes and pasted into the IFTTT web request. Set as POST and JSON format. Tested via IFTTT and nothing happens. I also tried the method of using the URL under Quick Facts in webCore and setting that as the URL. Changed the Piston to have no conditions and just me SMS statements and tried to test that via IFTTT. Again no luck. This all worked well under Core.

2) What is the expected behavior?
IFTTT triggers sends web request to webCore which triggers my Piston and sends me an SMS

3) What is happening/not happening?
I execute the test function in IFTTT and webCore doesn’t seem to register anything.

4) Post a Green Snapshot of the pistonimage

Wasn’t sure what was safe to post of the web query string I am using.

5) Attach any logs (From ST IDE and by turning logging level to Full)
No logs to share as no activity is present other than when I hit test in webCore.


#2

I just tried mine and it worked.

image


Keep light on when manually turned on turn off after set time when IFTTT turned on
#3

Yep… mine good too…

Anything showing up in the IFTTT activity log?


#4

Aha. . .I was using POST. Let me try with GET and check it out.


#5

Nope, still nothing. When you guys run a test in IFTTT does it show up in the activity log? Mine shows nothing but applets being edited.

EDIT: Also, what did you guys use as a trigger for IFTTT? Did you choose one that kicked off on its own or just clicked Check Now?


#6

Aha, figured it out. Had nothing to do with webCore. Looks like the webhooks service on IFTTT had gotten corrupted. Just refreshed the connection and now all works fine. Thanks.

EDIT: Well, claimed victory too soon. Now it’s back to not executing IFTTT. Seems like I may need to reach out to IFTTT.


#7

If you’re not seeing activity in IFTTT then it’s most likely the trigger (IF) that’s not working rather than the ‘THIS’


#8

So I got an unsolicited notification today which means the IFTTT applet triggered correctly. Still can’t get it to execute on clicking test though, but it’s doing its job, so I am set for now.


#9

It won’t trigger via test… clicking test just evaluates rhe piston but as IFTTT hadn’t triggered at that exact same moment, the piston evaluates as false and nothing happens.


#10

I meant clicking test in IFTTT


#11

The IFTTT test button does the same thing, it checks the ‘IF’ and only actions the ‘THIS’ if the ‘IF’ is true… It wont just trigger the ‘THIS’, though that would be nice.


#12

I have been testing with this feature. It is working great and was wondering if additional parameters could be attached to the url call so they can be used as variables in the piston? From what I can see, it doesn’t look like it is supported as of yet. Just wanted to know if my assumption is correct :slight_smile:


#13

You can pass data on to a piston from ifttt. Let me see if I can find the examples from before.

Edit: Here you go…


#14

Nice! Thanks for pointing me to the $args variable. Based on the thread you links, it can do much more than just supporting IFTTT data. You just opened a Pandora box for me :slight_smile:

Anyway, just to confirm, based on my understanding, if I send the following json body {"value1":"foo","value2":"bar"}, in the url call, I would be able to retrieve these values through $args.value1 and $args.value2 in my piston?


#15

Wow I did not realize that $args supports full json input from a web request, that’s cool! I tested sending an array of objects and it works perfectly with nested object access like $args.a[1].b and everything you would expect from $json. I thought you could only send a=something&b=something%20else form encoded data which is far more limited.


#16

Thanks @ipaterson. I actually did a test myself as well and it is working as I understood it, plus the fact that you can send complex json structures as you mentioned it.