1) Give a description of the problem
I’m trying to replace all my IFTTT applets that update my Slack status with a single piston to update Slack, since now I have to be on multiple Slack instances at work, and IFTTT can only manage connections to one Slack instance per account. Piston debug shows that the web requests in this piston appear to be made successfully, but my Slack status is not changing. However, if I use an external tool like a browser plugin to issue a POST request with content-type application/x-www-form-encoded to these Slack URLs using the variables in the script as defined, it works as expected. Not sure what the issue is here or even how to see the response in piston debug?
Additional details: I’ve replaced my Slack tokens for posting, but the originals are valid from https://api.slack.com/custom-integrations/legacy-tokens, and the Contact Sensors are GCal Smart App calendar event triggers.
2) What is the expected behavior?
URLs and data are submitted to Slack successfully, status and visibility updates in Slack.
3) What is happening/not happening?
I see the web requests being made in debug, but Slack status is not updated as expected. Not sure what the error is.
4) Post a Green Snapshot of the piston
5) Attach any logs (From ST IDE and by turning logging level to Full)
+1ms ╔Received event [zoom Events].contact = open with a delay of 87ms +179ms ║RunTime Analysis CS > 13ms > PS > 52ms > PE > 114ms > CE +190ms ║Runtime (72105 bytes) successfully initialized in 52ms (v0.2.0fe.20171109) (188ms) +191ms ║╔Execution stage started +209ms ║║Comparison (enum) open changes_to (string) open = true (0ms) +210ms ║║Cancelling condition #10's schedules... +211ms ║║Condition #10 evaluated true (12ms) +228ms ║║Comparison (enum) present is (string) present = true (2ms) +230ms ║║Condition #11 evaluated true (18ms) +231ms ║║Cancelling condition #2's schedules... +232ms ║║Condition group #2 evaluated true (state changed) (33ms) +235ms ║║Cancelling statement #4's schedules... +241ms ║║Executed virtual command setVariable (2ms) +246ms ║║Executed virtual command setVariable (2ms) +252ms ║║Sending external web request to: slack.com/api/users.profile.set +416ms ║║Executed virtual command httpRequest (165ms) +422ms ║║Executed virtual command setVariable (2ms) +430ms ║║Sending external web request to: slack.com/api/users.profile.set +546ms ║║Executed virtual command httpRequest (118ms) +557ms ║║Cancelling statement #57's schedules... +561ms ║║Calculating (string) Last run: + (string) Fri, Nov 17 2017 @ 12:00:00 PM MST >> (string) Last run: Fri, Nov 17 2017 @ 12:00:00 PM MST +563ms ║║Executed virtual command setState (1ms) +565ms ║╚Execution stage complete. (374ms) +567ms ║Setting up scheduled job for Fri, Nov 17 2017 @ 5:30:00 PM MST (in 19799.097s) +583ms ╚Event processed successfully (583ms)
UPDATE: See a working example of a Slack request piston here: