Skip to main content

Wait for Event Node - Async Webhook Callback in ConvyAI Agentic Flow

Overview​

The Wait for Event node suspends flow execution until an external system signals completion by calling a unique webhook URL generated for that specific run. When the flow reaches this node, the platform generates the callback URL, optionally notifies the external system, and waits. The flow resumes either when the callback is received or when the configured timeout expires.

A common use case is human-in-the-loop: an AI Agent produces a result that must be reviewed and approved by a person before the flow continues.

The sequence below shows the interaction between the flow and the external system during the wait:

Positioning​

The Wait for Event node has one input and two exits: Resume and Timeout. It can be placed anywhere in the flow. Suspending the run does not block the execution environment - other concurrent runs are unaffected.

Exits​

The node has two exits:

BranchActivated when
ResumeA valid callback is received before the timeout.
TimeoutThe timeout expires without a valid callback.

The Timeout branch can be left unconnected - in that case, the node concludes without error when the timeout expires.

Configuration​

External system notification​

FieldDescription
Endpoint URLURL of the external system to notify. Supports $ variable references.
HTTP methodGET or POST.
AuthenticationNone, API key, or custom header.
Custom payloadKey-value pairs to include in the notification body. Values support $ variable references.

The notification is sent automatically when the node is reached. If delivery fails, the platform retries. If notification fails definitively, the node goes into error and the flow stops.

Timeout​

FieldDescription
DurationMaximum wait time, from 1 minute to N days. Select the time unit (minutes, hours, days).

Callback URL​

For each run, the platform generates a unique URL that the external system must call to resume the flow. This URL is exposed as callback_url in the notification payload sent to the external system and is also visible in the run detail view in the Monitoring page.

The URL is valid only for the duration configured as timeout and can be used exactly once. Include callback_url in the Custom payload of the notification so the external system knows which URL to call.

Runtime behavior​

When the external system calls the callback URL, the flow resumes on the Resume branch. The URL can be used only once - any subsequent call is ignored and the flow is not resumed again.

If the timeout expires before the callback is received, the flow resumes on the Timeout branch instead.

Output​

The payload received in the callback is available to downstream nodes on the Resume branch:

FieldTypeDescription
request.bodyobjectBody of the HTTP callback request.
request.headersobjectHeaders of the HTTP callback request.

On the Timeout branch, no output payload is available.

Key concepts​

TermDefinition
Callback URLA unique URL generated for each run, valid for the duration of the configured timeout and usable exactly once. The external system calls this URL to signal completion and resume the flow.
Resume branchThe output path activated when the external system calls the callback URL before the timeout expires.
Timeout branchThe output path activated when the configured wait time expires without receiving a callback.