Webhook
Listen for HTTP calls from outside. Fires when a POST or GET reaches {origin}/hook/{workflow}/{path}, and emits the body, json, headers and query. It replies right away, or, set to reply from Respond to Webhook, keeps the caller waiting until a Respond to Webhook in the same run answers, within the timeout.
Trigger. It starts turns on its own: when it fires, the nodes wired to its outputs run.
Outputs
Section titled “Outputs”| Port | Type | Notes |
|---|---|---|
trigger |
event | |
body |
text | |
json |
any | |
headers |
json | |
query |
json |
Right-click a knob and pick Convert to input to drive it from a wire, unless its notes say it stays a knob.
| Knob | Kind | Default | Notes |
|---|---|---|---|
pathpath |
text | my-hook |
|
method |
choice | POST |
ANY, GET, POST, PUT, PATCH, DELETE |
secretX-Webhook-Secret (optional) |
text | empty | {{secret.NAME}} works here |
replyreply |
choice | right away |
right away, from Respond to Webhook; stays a knob (cannot become an input) |
timeouttimeout (seconds) |
number | 30 |
1 to 600; only when reply is from Respond to Webhook; stays a knob (cannot become an input) |
Example
Section titled “Example”With the graph On, a request to http://127.0.0.1:8770/hook/<graph>/<path> fires the node, and the caller gets {"ok": true} right away: the answer goes wherever you wire it. json is filled when the request says Content-Type: application/json.
curl -X POST http://127.0.0.1:8770/hook/inbox/new \ -H "X-Webhook-Secret: $HOOK_SECRET" \ -H "Content-Type: application/json" \ -d '{"subject": "Invoice 42", "body": "Due Friday."}'Give every webhook a secret, ideally a {{secret.NAME}}: callers send it in the X-Webhook-Secret header, and that header, Authorization, Cookie and the other credential headers never reach headers. Converted to inputs, path, method and secret are read on every call. A wired secret that carries no value refuses every call with a 503, Webhook secret is wired but has no value, so a missing value never turns the check off. Webhook to LLM walks through it.
More in Triggers
Section titled “More in Triggers”- Agenda: Fire from data instead of a fixed clock: poll a wired store table of {when, payload} rows and fire each row when its
whenis due. - Audio Input: Send a microphone clip into the live graph while you hold to talk.
- Chat Input: Type a message and send it into the live graph.
- Interval: Fire an event every N seconds.
- Manual: Fires once when the graph turns On, and again whenever you press its Fire button.
- Schedule: Fire on a cron schedule: ‘min hour day month weekday’, in the zone its timezone knob picks.