Skip to main content

Webhook: File Upload

POST 

/api/automation/webhook/upload/:token

Public file-upload webhook endpoint for workflows using a file-upload trigger.

Authentication: None. Security is entirely provided by the {token} path parameter, which must match the webhookToken stored on the workflow's file-upload trigger node.

Request:

  • Content-Type: multipart/form-data
  • Single file field named file (required).

Behavior:

  1. Resolves the workflow by token.
  2. Validates file presence, size (from trigger node maxFileSizeMb, defaults to 50 MB), and extension (from trigger node allowedExtensions, case-insensitive).
  3. Stores the file via BinaryDataManager.
  4. Dispatches ExecuteWorkflowJob with trigger_type = webhook, trigger_reference = upload:{binaryId}, and a fresh UUID idempotencyKey.

Responses:

202 Accepted (happy path — execution is asynchronous):

{
"message": "Upload accepted",
"idempotencyKey": "550e8400-e29b-41d4-a716-446655440000",
"fileName": "orders-2026-04-16.csv"
}

404 Not Found — unknown/invalid token:

{ "message": "Invalid webhook token" }

413 Payload Too Large — file larger than maxFileSizeMb:

{ "message": "File exceeds allowed size" }

415 Unsupported Media Type — extension not in allowedExtensions:

{ "message": "File extension 'xyz' is not allowed" }

422 Unprocessable Entity — missing or invalid file field:

{ "message": "No valid file uploaded under key \"file\"" }

Route name: automation.webhook.upload

Request

Responses

Successful response