Use Webhook to Trigger Event

photon
Tags: #<Tag:0x00007f1ca1db7aa8>

#1

Hi,

I know I can use an IFTTT event that calls a function as per the servo gong tutorial. Is there a way for me to use a Webhook that when posts calls a function as well?

I have a webhook that posts data when some web data updates and I want my particle photon to call a function using this new data.

Thanks,
Ian


#2

You can Particle.subscribe() to the response event of your webhook and in the subscription handler call the function you want.


#3

Thank you!