Webhooks
in progress
M
Mark Miyashita
After a deploy (or after other significant events), I want to hit an endpoint on my api so I can run logic (ex. notify users, increment release number in the db, etc)
Log In
Anurag Goel
in progress
We're working on it!
S
Santiago Quinteros
Anurag Goel thank you!! we've been waiting for this for so long, 3 years at least since we moved to render.
A coworker of mine made a selenium bot just to post the deployment status on our discord channel
S
Steve Krouse
I have an interesting workaround for this which turns emails into what you can think of as a 'synthetic webhook'.
- Setup Gmail filter to auto-forward Render alert emails
- Accept those forwarded emails on Val Town in an email handler
- On Val Town, send alerts to our team's Discord & create a Github Issue
Disclosure: I am a founder of Val Town
M
Miki Leskinen
We need to tell Inngest to register the latest functions after the service running on Render has gone live (see https://www.inngest.com/docs/deploy). Since Render doesn't seem to have 1st class support for Inngest (like Vercel does, through integrations), I need to call "PUT https://<my app on Render>/api/inngest" immediately after the new version has successfully deployed. The problem is, there seems to be no post-deploy hook currently supported.
An optimal solution IMO would be to have a webhook option in Render (as suggested by the original author), through which you could send deployment events. Vercel has this nicely covered: https://vercel.com/docs/observability/webhooks-overview.
A URL (without special auth support) would do just fine at least in our case, because we can always attach a custom query param and that way make sure the sender is valid. So e.g. Authorization header with Bearer <API key> value is not a must.
Another use case for such webhook: post-deploy production smoke test. With that, we could try to convince ourselves that the new app version doesn't break any critical flows in the production environment.
m
me
Leaving this here for folks coming here to check: https://nohooks.io
Nohooks supports Render Webhooks. :)
S
Santiago Quinteros
me you saved my life
n
nico
Is this something that might get worked on soon? :) would love to also have functionality like this -- need to hit an endpoint and refresh a cache on deploy.
A
Ashutosh
nico: I am building a micro-saas, which would help you do this. It would send a webhook to your defined URL on successful deployments from render. Happy to discuss more over email
p
patrick.mclenithan
Current Work Arounds
Few ways to do this while you are waiting for the feature:
- Polling: Get Deploys API Currently, there is a 100/minute rate limit on this API. So if you have tons of instances you are watching, it may be slow. This is the solution our team will be using so we can clear caches when prod deploys are completed. To retrieve your serviceId's: Get Services API
- Slack connections: Slack Notifications Connection With slack, you can setup other jobs to watch for certain slack messages to programmatically trigger stuff.(An MS Teams connection would be fantastic since most us can't live that Slack life, must be nice:) )
- Log Streams: A bit riskier since we haven't fully tested, especially if this works with static site builds - You can use Papertrail, DataDog, etc... Log Streams Most logging apps have webhooks. You may be able to extract enough information about the deployment and the service successfully launching a deployment in order to perform different automated tasks.
- Websockets: This is actually fantastic, and you can set up listeners on a server to Render's client websockets, but I don't think this is "intended use".
Hopefully this helps until we get real webhooks
🙏🙏🙏A
Alex Black
This would be very useful, we'd also use it to purge cdn cache after deploy
P
Philipp Defner
I needed that so I just built a workaround that polls the API and then sends a webhook to my target. Maybe it's also helpful for others, probably has to be customized depending no your needs:
R
Robb Shecter
I think that sentry.io needs this to track errors relating to a commit.
b
brian
I would use this to purge URLs from my CDN and trigger a cache warming script.
Load More
→