Webhook trigger: start a workflow from a URL
Give another app a URL; each request starts a run. Optional secret, signature checks for Stripe, GitHub, Shopify, Typeform, Tally and Calendly, custom reply.
Updated
When a webhook is received gives you a URL. Each request another app sends to it starts one run, with the request's data.
How to set it up
- Create a workflow and choose When a webhook is received. Copy the URL.
- Send one request to it. While the workflow is off, requests are saved as sample data instead of running anything; Get sample data waits up to 10 minutes for one.
- Fill your steps from the request, with chips like Trigger → Email.
- Turn the workflow on. From now on each request runs the steps.
Data it gives
body: a POST's JSON, form-encoded or plain-text body, up to 256 KB.query: the URL's query string, for GET and POST. Repeated keys become lists.method,headersandreceivedAt. Headers that carry a credential (Authorization, Cookie, API keys, the sender's signature) and ones the network added (X-Forwarded-*, X-Real-IP) are dropped; Content-Type, User-Agent and the sender's own, like X-GitHub-Event, stay.
The response
- By default the webhook answers
202 {"status":"queued","runId":…}right away and the steps run in the background. - More options → Respond with: Custom: a status of 200, 201, 202 or 204 and a JSON or plain-text body. It can use the request's data, never step results, since it's sent before the steps run.
- Send people to this page afterwards: an HTML form that posts to the URL is redirected there (303) after a successful post.
What reached the URL
Under the URL, the trigger lists the last 10 requests, accepted or refused: when, the method, the status it got, the body's size, and why it was refused (Secret didn't match, Body isn't valid JSON, Too many requests…) or a link to the run it started. If the list stays empty, the request never reached Foliot: check the URL in the other app. Use as sample makes any listed request the trigger's sample data, also while the workflow is on. The list is kept for 7 days.
Requiring a secret
More options → Require a secret makes a random secret, shown once. Every request, POST or GET, must send it in the X-Foliot-Secret header or gets a 401 and starts nothing. Regenerate replaces it.
Signed senders
Stripe, GitHub, Shopify, Typeform, Tally and Calendly can't send a custom header, but they sign each request. Under More options → Sent by, pick the service and paste the signing secret from its webhook settings (Stripe's starts with whsec_). From then on only requests that service signed start the workflow; anything else gets a 401. The secret is stored encrypted and never shown again; Replace takes a new one. Choosing a sender turns Require a secret off, and gives a workflow with no sample data yet a real-shaped example event (a Stripe checkout.session.completed, a GitHub push, a Shopify order…) so you can fill in steps before the first real one arrives.
Limits
- Bodies up to 256 KB (413 past that); bad JSON gets a 400.
- 60 requests a minute per workflow, GET and POST together (429 past that, or when you're out of runs).
- A GET without a query string, or from a link preview or email scanner (Slackbot, Outlook…), gets a short text answer and starts nothing.
- The URL can be regenerated from the trigger.