Skip to content

Webhook

The Webhook feature allows you to execute SamuraiAI workflows by sending an HTTP request from external services or scripts. Instead of manually operating the UI, you can trigger workflows automatically through integrations with other tools and automation systems.

Key features of the Webhook functionality:

  • Execute a workflow simply by sending a POST request to a dedicated URL
  • Pass data in the request body (text, numbers, select options, file IDs, etc.)
  • Choose between two response modes: “Respond immediately” or “Wait for completion”
  • Rate limited to 60 requests per minute

Open the workflow editor, select the Start node, and open the properties panel on the right. Select “Webhook” from the “Trigger” dropdown.

Webhook settings screen

When you switch the trigger to Webhook, a dedicated Endpoint URL is generated. Sending a POST request to this URL will execute the workflow.

You can copy the URL using the button next to it.

The Executor field shows the user whose permissions and credentials will be used to run the workflow.

If you want to receive data from external sources, add input variables in the Request section by clicking ”+ Add Variable”.

Available variable types:

TypeDescription
TextAccepts string values
NumberAccepts numeric values
SelectAccepts a value from predefined options
FileAccepts an ID of a previously uploaded file

Once you add variables, a sample request body (JSON) will be displayed for reference when sending requests from external services.

In the Response section, select a response mode.

Request and Response settings

Respond immediately and execute in the background (default)

Returns an HTTP 202 response right away and executes the workflow in the background. Best when you don’t need to wait for the result before continuing.

Sample response:

{
"status": "accepted",
"thread_id": "uuid-xxx-xxx-xxx"
}

Wait for workflow completion before responding

Waits until the workflow finishes and returns an HTTP 200 response with the result. Best when you need the output immediately.

In this mode, you can configure a timeout (1–300 seconds, default 60 seconds).

Sample response:

{
"status": "completed",
"thread_id": "uuid-xxx-xxx-xxx",
"output": {
"workflow_output": "..."
}
}

Once the settings are configured, click “Save”. After saving, the Endpoint URL becomes active and can start receiving requests from external sources.

Use CaseDescription
Form submissionsAutomatically generate responses when a contact form is submitted
Google Apps ScriptTrigger workflows from GAS when a spreadsheet is updated
Batch processingLaunch data processing workflows from an external scheduler
App integrationExecute workflows in response to events in your own application

Now you can trigger SamuraiAI workflows from external services and scripts. Use this feature to integrate SamuraiAI with your existing business tools.