Incoming webhook

Hello and apologies if this question has been asked before. I’m not an experienced developer.

I created an Internet button which posts to Slack when pushed. That was easy enough. But now i’d like to do the thing in reverse.

How would one go on to get an event sent to a Particle due to an event on Slack? From Slack, i can create a custom slash command or an outgoing webhook, which can invoke an arbitrary web request, but how do i get that into the Particle cloud and to my Photon?

I suppose you could hack around this using IFTTT, but it sounds rather convoluted to me.

To add to the stack, if i’d like to do some data parsing before its sent on to the Photon, that would be even niftier. Though, i guess, that will make things one level more complicated.

Invoking functions is done over HTTP request. Your webhook should be able to manage that. Take a look at the API docs to see what’s expected in a request: https://docs.particle.io/reference/api/#call-a-function

Thanks. I’ll try to wrap my head around it :smile:

Hey I know it’s been a while, but did you work out a solution to this? I’d like to ask my particle for a status via a Slack slash command, and have the particle respond yes or no based on a sensor. Thanks!

You can always poll a variable or call a function?