Triggers

Rest API Trigger

Category
Trigger
Node Type
API

Overview

The REST API Trigger node starts a workflow automatically when a user sends an HTTP request to the workflow’s REST API endpoint — either from any external application or directly from the No-Code UI. It acts as the entry point for workflows that need to be triggered manually or programmatically, whether through websites, mobile apps, or the built-in request tools in the platform.

Description

Trigger workflow when a REST API endpoint is called.

This node activates a workflow automatically when a user sends an HTTP POST request to the workflow’s REST API endpoint — either from any external application or directly from the No-Code UI. It acts as the entry point for workflows that need to be triggered programmatically or through custom tools, such as websites, mobile apps, or backend services.

It supports only POST requests, and the request body must be in JSON format. By default, the node does not support nested JSON structures. If you need to send nested JSON data, you can pass it as stringified JSON within key-value pairs. This ensures the payload is received correctly and can be parsed inside the workflow.

This makes it ideal for integrating workflows with custom apps, webhooks, or backend systems.

Input Parameters

The REST API Trigger node accepts dynamic flat key-value pairs sent by an external request. You can define any keys according to the data you expect from the incoming call.

exampleKeystringOptional
A placeholder for a key in the incoming request.
Example
"userId": "12345"
exampleKey2stringOptional
Another example input key.
Example
"email": "example@domain.com"
exampleKey3stringOptional
Any additional input data you may send through the API.
Example
"source": "mobile-app"

Example cURL Request

curl -X POST "https://your-domain.com/api/your-endpoint" \  -H "Content-Type: application/json" \  -d '{    "exampleKey": "12345",    "exampleKey2": "example@domain.com",    "exampleKey3": "mobile-app"  }'

Example With Nested JSON (stringified)

curl -X POST "https://your-domain.com/api/your-endpoint" \  -H "Content-Type: application/json" \  -d '{    "exampleKey": "12345",    "profile": "{\"name\": \"John Doe\", \"age\": 30}",    "metadata": "{\"device\": \"iPhone\", \"os\": \"iOS\"}"  }'
Instructions

This node accepts only flat key-value pairs in the incoming request body, sent as a JSON object.
Nested JSON structures are not supported by default — if needed, send them as JSON-encoded (stringified) values inside the main JSON body.
Arrays must also be JSON-encoded strings.

File uploads are not supported.

Keys should be simple strings (e.g., userId, email, source).
Values may be strings, numbers, booleans, or stringified JSON for complex objects.

All inputs are optional and schema-free; define any required fields in downstream nodes.

You can access the received values inside the workflow using: {{nodeId.input.<key>}}.

If a key is not provided in the request, it will default to null.

Access input data within the workflow using:

{{nodeId.input.<key>}}

Example:

{{restApiTrigger.input.userId}}

Output Parameters

This node does not produce any output parameters of its own.
It only exposes the incoming request data through {{nodeId.input.*}} for downstream nodes.

Accessing Data

You can access incoming request values in other nodes using:

{{restApiTrigger.input.userId}}
{{restApiTrigger.input.email}}
{{restApiTrigger.input.source}}

Output Type

Output Type: None

The node does not define or emit any structured output type.
It only forwards the raw request body values as input fields accessible via {{nodeId.input.<key>}}.

Example Usage

Trigger Workflow with User Data

Incoming API Request (JSON-only POST):

POST https://api.worqhat.com/flows/trigger/flow-idAuthorization: Bearer <YOUR_WORKFLOW_API_KEY>Content-Type: application/json{  "userId": "001",  "email": "john@example.com",  "source": "mobile"}

Accessing Values Inside the Workflow:

{{restApiTrigger.input.userId}}      → "001"
{{restApiTrigger.input.email}}       → "john@example.com"
{{restApiTrigger.input.source}}      → "mobile"

Example: Sending Nested JSON (Stringified)

Incoming API Request:

POST https://api.worqhat.com/flows/trigger/flow-idAuthorization: Bearer <YOUR_WORKFLOW_API_KEY>Content-Type: application/json{  "userId": "001",  "profile": "{\"name\": \"John Doe\", \"age\": 30}",  "metadata": "{\"device\": \"iPhone\", \"os\": \"iOS\"}"}

Accessing Values Inside the Workflow:

{{restApiTrigger.input.userId}}      → "001"
{{restApiTrigger.input.profile}}     → "{\"name\": \"John Doe\", \"age\": 30}"
{{restApiTrigger.input.metadata}}    → "{\"device\": \"iPhone\", \"os\": \"iOS\"}"

(You can parse these stringified values later inside the workflow if needed.)

How to Use in a No-Code Workflow

1

Add the REST API Trigger Node

Place the node at the start of your workflow. It acts as the entry point for POST requests coming into the workflow.

2

Copy the Workflow Endpoint

Each workflow provides a unique REST API endpoint, such as: https://api.worqhat.com/flows/trigger/flow-id All external applications must send their JSON payload to this endpoint.

3

Configure External Application

From any app, website, backend service, or from the No-Code UI, send a JSON-only POST request with flat key-value pairs. Nested JSON must be sent as stringified JSON if needed.

4

Define Expected Fields

Downstream nodes can reference incoming fields using:

{{restApiTrigger.input.<key>}}

Example:

{{restApiTrigger.input.userId}}
5

Test the Connection

Use a tool like Postman or cURL to send a test request to the workflow endpoint.

Example Using cURL

curl -X POST "https://api.worqhat.com/flows/trigger/flow-id" \  -H "Content-Type: application/json" \  -d '{    "userId": "001",    "email": "john@example.com",    "source": "web-app"  }'

Example Using Postman

  • Set Method: POST
  • Set URL: https://api.worqhat.com/flows/trigger/flow-id
  • Set Headers:
    • Content-Type: application/json
  • Go to Body → Raw → JSON
  • Add:
    {  "userId": "001",  "email": "john@example.com",  "source": "web-app"}
  • Click Send to trigger the workflow.
6

Connect to Other Nodes

Link this trigger node to other nodes (e.g., AI, Database, Email) to process, store, or react to the incoming data automatically.

Best Practices

  • Use consistent key names (e.g., userId, email, action) across all requests.
  • Validate incoming JSON payloads before processing.
  • For large or complex objects, send them as JSON-encoded (stringified) values.
  • Do not send files in this request — use dedicated file input nodes instead.
  • Always send requests over HTTPS for secure communication.
  • Test your workflow endpoint thoroughly using tools like Postman or cURL before production use.

Do / Don’t

Do
  • ✔️ Use flat key-value pairs in the JSON body.
  • ✔️ Stringify nested JSON or arrays before sending.
  • ✔️ Keep key names clean, simple, and predictable.
  • ✔️ Validate incoming data in downstream nodes.
  • ✔️ Use HTTPS and proper authentication where applicable.
  • ✔️ Test with Postman, cURL, or the No-Code UI before deployment.
Don’t
  • ❌ Don’t send files — use file-specific incoming nodes instead.
  • ❌ Don’t send raw nested JSON or arrays unless stringified.
  • ❌ Don’t rely on this node for schema validation (it is schema-free).
  • ❌ Don’t include unnecessary or unused fields in the payload.
  • ❌ Don’t use GET/PUT requests — only POST JSON is supported.

Example Workflow Integration

Use Case: Automatically process user signup data sent from an app.

  1. Trigger Node – REST API Trigger (receives signup details such as name and email.)
  2. AI Node – Text Generation (drafts a welcome message.)
  3. Utility Node – Send Email (sends the message to the user.)

Additional Incoming Use Cases

1. Create Support Tickets from Your Mobile or Web App

An external system sends:

{  "userId": "123",  "issue": "Payment failed",  "priority": "high"}

The workflow logs the ticket, assigns an agent, and sends updates.

2. Trigger Automated Order Processing

A backend system posts:

{  "orderId": "98765",  "items": "[{\"sku\":\"A101\",\"qty\":2}]",  "total": 1499}

The workflow verifies payment, triggers fulfillment, and notifies the user.

3. Sync Data from a Third-Party Integration

An external CRM sends:

{  "contactId": "c-55",  "status": "updated",  "profile": "{\"name\":\"Sarah Lee\",\"company\":\"PixelLabs\"}"}

The workflow updates internal records and alerts the team.

4. Trigger Personalized Notifications

A mobile app posts:

{  "userId": "001",  "eventType": "milestone",  "details": "{\"level\":5,\"reward\":\"50 points\"}"}

The workflow generates a personalized message and sends a push/email notification.

Common Errors

Invalid JSON formatErrorOptional
The incoming request body is not properly formatted. Ensure valid JSON syntax or use form-data encoding.
Missing endpoint or unauthorized accessErrorOptional
Request sent to the wrong endpoint or missing authorization headers. Verify the workflow’s API URL and authentication setup.
Unsupported input typeErrorOptional
Files or unsupported data structures were sent. Only send text, numbers, booleans, or JSON-encoded strings.
No data receivedErrorOptional
Request was sent with an empty payload. Add at least one key-value pair in the request body or query string.