Are we still able to use WebHooks even if we don’t wanna use any of the web services like IFTTT and Zapier
Hi Rachit – yep, when creating a webhook, you can provide any url you’d like to have the event payload delivered to.
OK, that’s great.
Should localhost addresses also be fine? I have been trying to send a webhook to http://localhost and for some reason it is not working. My server is not seeing the request.
Is yours a local site or a hosted
shotgunstudio.com site? I’d wager
localhost could work for a local setup but that would mean the machine sending out the webhook call (the Shotgun app server or event pipeline server) would also be the one handling it which may not be a good idea. If technically possible, I’d probably shy away from it.
In a hosted setup,
localhost would not work.
I guess I assumed that as localhost worked for AMI:s, it would also work for webhooks. Now that you say it out loud, it actually makes sense why it doesn’t work and we need to find a way around it.
If you are doing local development and want to keep testing your code before you deploy, you could make use of https://ngrok.com/ to tunnel connection to your local running instance that is processing the webhooks.
But if you are concerned about routing the requests through a third party, the best option would be to use AWS API Gateway and Lambda. But this is assuming that the operations you are performing based on the webhooks does not require your studio data access.
Just getting up to speed here. I have a locally hosted flask service up and running. I am able to hit the URL endpoint from my browser without an issue. I was able to also hit the same URL from and Action Menu Item and cloud hosted instance of SG. Proceeded to hit the same URL via a WebHook and my cloud instance of SG, however it initially failed in the response (Delivery timed out, server did not reply after 6.0 seconds.). Stood up an ngrok tunnel as suggested on this thread. The WebHook doesn’t look like it failed in the response. The WebHook Header and Body are empty and received a process time of 1 millisecond. However the Flask app doesn’t appear to have worked. What am I missing?
With some fiddling, I was able to get this to work. Thanks for the suggestion aka_anoop. For texting and evaluation ngrok works great. I am going to persue using Lambda next.