When a workflow item finishes, Thunk.AI can notify an external system with an HTTPS POST to a URL you configure. Use this to send completion events into an observability platform (for example Amplitude or Mixpanel), a custom API, or any endpoint that accepts JSON.
This is an outbound notification from Thunk.AI to your systems. It is separate from the thunk’s inbound webhook, which receives form submissions and other requests into the thunk.
Where to configure it
Open your thunk.
In the left navigation, open Monitor.
Open the Observability tab.
Only thunk admins can edit these settings. The fields are treated as secrets in the UI.
Settings
Webhook URL
The HTTPS endpoint that receives the POST when a workflow row finishes. Leave this empty if you do not want outbound completion notifications.
Header
Optional HTTP headers for the request, one per line. Use this for authentication or other receiver requirements (for example an Authorization header).
Transform
The request body. This is a template: you write the JSON (or other text) your receiver expects, and insert values from the completion event using template tags such as <%- ... %> and <%= ... %>.
The completion event is available in the template as input.
When the webhook fires
Thunk.AI sends the webhook once per workflow row, when that row’s workflow finishes. The event name in the payload is workflow_completed.
If Webhook URL is empty, nothing is sent.
Values available in Transform
These are the main fields you can reference in the Transform template:
Template path | Meaning |
| Event name ( |
| Unique id for this notification |
| Id of the thunk |
| When the workflow finished |
| When the workflow row started |
| Elapsed time in milliseconds |
| User who initiated the run |
| Object of the row’s output column values |
| AI cost for the row, when available |
| AI processing time for the row, when available |
Output column values live under input.metadata.properties.<columnName>, using the column names from your thunk’s workflow outputs.
Example Transform
This example builds a JSON body with completion time, duration, and output columns:
{
"event": <%- JSON.stringify(input.event) %>,
"completed_at": <%- JSON.stringify(input.timestamp) %>,
"started_at": <%- JSON.stringify(input.metadata.startTime) %>,
"elapsed_ms": <%- JSON.stringify(input.metadata.elapsedTime) %>,
"outputs": <%- JSON.stringify(input.metadata.properties || {}) %>
}
Tips for reliable templates:
Prefer
<%- JSON.stringify(…) %>for values — especially dates — so the body stays valid JSON with ISO timestamps.If a field might be missing, guard it (for example
input.metadata.properties.someField || null) so the rendered body does not contain the bare tokenundefined, which breaks most JSON receivers.Match field names and types to what your receiver expects. Extra fields can also be rejected if the receiver uses a strict schema.
If the webhook fails
A failed notification does not fail the workflow. The row still finishes successfully; only the outbound POST failed.
When delivery fails, Thunk.AI records a message in the thunk’s Automation Log (under Monitor) with details such as the HTTP status or a template-rendering problem. Check:
The Webhook URL (reachable HTTPS endpoint).
The Header (auth and required header names).
The Transform (valid JSON after rendering; field names and types your receiver accepts).
