Actions
Perform operations with action nodes
Action nodes perform operations in your workflow - calling APIs, sending notifications, processing data, and more.
HTTP Request
Make HTTP calls to external APIs.
Configuration
json{ "type": "http_request", "method": "POST", "url": "https://api.example.com/users", "headers": { "Authorization": "Bearer {{ credentials.api_token }}", "Content-Type": "application/json" }, "body": { "name": "{{ input.name }}", "email": "{{ input.email }}" }, "timeout_ms": 30000 }
Options
| Option | Description |
|---|---|
| Method | GET, POST, PUT, PATCH, DELETE |
| URL | Endpoint URL (supports variables) |
| Headers | Request headers |
| Body | Request body (JSON, form data, raw) |
| Timeout | Request timeout in milliseconds |
| Retry | Retry configuration |
Output
javascript{ "status": 200, "headers": { ... }, "body": { ... }, "duration_ms": 150 }
Send Email
Send emails through configured providers.
Configuration
json{ "type": "send_email", "channel": "sendgrid-main", "to": "{{ input.customer_email }}", "subject": "Your order has shipped!", "body": "Hi {{ input.customer_name }},\n\nYour order #{{ input.order_id }} has shipped.", "from_name": "Support Team" }
Options
| Option | Description |
|---|---|
| Channel | Notification channel to use |
| To | Recipient email(s) |
| CC/BCC | Carbon copy recipients |
| Subject | Email subject line |
| Body | Plain text or HTML content |
| Attachments | File attachments |
HTML Email
json{ "type": "send_email", "content_type": "html", "body": "<h1>Welcome!</h1><p>Thanks for signing up, {{ input.name }}!</p>" }
Send Notification
Send messages to Slack, Discord, SMS, and more.
Slack Example
json{ "type": "send_notification", "channel": "slack-alerts", "message": "New order received: #{{ input.order_id }}", "blocks": [ { "type": "section", "text": { "type": "mrkdwn", "text": "*New Order*\nCustomer: {{ input.customer_name }}\nAmount: ${{ input.amount }}" } } ] }
SMS Example
json{ "type": "send_notification", "channel": "twilio-sms", "to": "{{ input.phone }}", "message": "Your verification code is: {{ input.code }}" }
AI Agent
Invoke an AI agent to process data.
Configuration
json{ "type": "ai_agent", "agent_id": "agent_support", "message": "Please analyze this customer feedback: {{ input.feedback }}", "context": { "customer_id": "{{ input.customer_id }}", "product": "{{ input.product }}" } }
Output
javascript{ "response": "Based on the feedback...", "tokens_used": 450, "model": "gpt-4", "tools_called": ["sentiment_analysis"] }
Use Cases
- Sentiment analysis
- Content generation
- Data extraction
- Decision making
- Translation
Database Query
Execute database queries.
SELECT Example
json{ "type": "database", "connection": "postgres-main", "operation": "select", "query": "SELECT * FROM orders WHERE customer_id = $1 AND status = $2", "parameters": ["{{ input.customer_id }}", "pending"] }
INSERT Example
json{ "type": "database", "connection": "postgres-main", "operation": "insert", "table": "audit_logs", "data": { "action": "{{ input.action }}", "user_id": "{{ input.user_id }}", "timestamp": "{{ now() }}" } }
Output
javascript{ "rows": [...], "row_count": 5, "affected_rows": 1 }
Execute Code
Run custom JavaScript or Python code.
JavaScript Example
json{ "type": "execute_code", "language": "javascript", "code": "const total = input.items.reduce((sum, item) => sum + item.price, 0);\nreturn { total, item_count: input.items.length };" }
Python Example
json{ "type": "execute_code", "language": "python", "code": "import json\ntotal = sum(item['price'] for item in input['items'])\nreturn {'total': total}" }
Available Context
input- Data from previous nodesenv- Environment variablescontext- Execution context
Sub-Workflow
Call another workflow.
Configuration
json{ "type": "sub_workflow", "workflow_id": "wf_process_payment", "input": { "amount": "{{ input.total }}", "customer_id": "{{ input.customer_id }}" }, "wait_for_completion": true }
Options
| Option | Description |
|---|---|
| workflow_id | Target workflow ID |
| input | Data to pass |
| wait_for_completion | Wait for result or fire-and-forget |
| timeout_ms | Max wait time |
Transform Data
Modify data structure.
Configuration
json{ "type": "transform", "operations": [ { "type": "map", "source": "input.items", "transform": { "id": "item.id", "name": "item.product_name", "total": "item.price * item.quantity" } }, { "type": "filter", "condition": "item.total > 100" } ] }
Operations
| Operation | Description |
|---|---|
| map | Transform each item |
| filter | Keep items matching condition |
| reduce | Aggregate values |
| pick | Select specific fields |
| omit | Remove specific fields |
| flatten | Flatten nested arrays |
Set Variables
Store values for later use.
Configuration
json{ "type": "set_variables", "variables": { "order_total": "{{ nodes.calculate.result.total }}", "is_premium": "{{ input.customer.tier == 'premium' }}", "timestamp": "{{ now() }}" } }
Access Variables
javascript{{ variables.order_total }} {{ variables.is_premium }}
Error Handling
Each action can have error handling:
json{ "type": "http_request", "url": "...", "on_error": { "action": "continue", "default_output": { "status": "failed", "error": "{{ error.message }}" } } }
Error Actions
| Action | Description |
|---|---|
| stop | Stop workflow execution |
| continue | Continue with default output |
| retry | Retry the action |
| branch | Go to error handler node |
Next Steps
- Logic & Control - Conditional logic and loops
- Variables - Working with data
- Error Handling - Handle failures gracefully