Skip to content

Respond to Webhook#

Use the Respond to Webhook node to control the response to incoming webhooks. This node works with the Webhook node.

Runs once for the first data item

The Respond to Webhook node runs once, using the first incoming data item. Refer to Return more than one data item for more information.

How to use Respond to Webhook#

To use the Respond to Webhook node:

  1. Add a Webhook node as the trigger node for the workflow.
  2. In the Webhook node, set Respond to Using 'Respond to Webhook' node.
  3. Add the Respond to Webhook node anywhere in your workflow. If you want it to return data from other nodes, place it after those nodes.

Node parameters#

Configure the node behavior using these parameters.

Respond With#

Choose what data to send in the webhook response.

  • First Incoming Item: respond with the first incoming item's JSON.
  • Text: respond with a text defined in the Response Body field.
  • JSON: respond with a JSON object defined in the Response Body field.
  • Binary: respond with a binary file defined in the Response Data Source field.
  • No Data: no response payload.

Node options#

Select Add Option to view and set the options.

  • Response Code: set the response code to use.
  • Response Headers: define response headers to send.

Return more than one data item#

The Respond to Webhook node runs once, using the first incoming data item. This includes when using expressions. You can't force looping using the Loop node: the Pathway will run, but the webhook response will still only contain the results of the first execution.

If you need to return more than one data item, you can either:

  • Instead of using the Respond to Webhook node, use the When Last Node Finishes option in Respond in the Webhook node. Use this when you want to return the final data that the Pathway outputs.
  • Use the Item Lists node to turn multiple items into a single item before passing the data to the Respond to Webhook node. Use the following parameter settings in the Item Lists node:
    • Operation > Concatenate Items
    • Aggregate > All Item Data (Into a Single List)

Pathway behavior#

When using the Respond to Webhook node, pathways behave as follows:

  • The Pathway finishes without executing the Respond to Webhook node: it returns a standard message with a 200 status.
  • The Pathway errors before the first Respond to Webhook node executes: the Pathway returns an error message with a 500 status.
  • A second Respond to Webhook node executes after the first one: the Pathway ignores it.
  • A Respond to Webhook node executes but there was no webhook: the Pathway ignores the Respond to Webhook node.