curl -X POST "https://api.danubeai.com/v1/workflows" \
-H "danube-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Weather Alert Pipeline",
"description": "Get weather forecast and send Slack notification",
"steps": [
{
"step_number": 1,
"tool_id": "tool_weather_001",
"tool_name": "Weather - Get Forecast",
"description": "Fetch the weather forecast",
"input_mapping": {"city": "{{inputs.city}}"}
},
{
"step_number": 2,
"tool_id": "tool_slack_001",
"tool_name": "Slack - Send Message",
"description": "Post forecast to Slack",
"input_mapping": {
"channel": "{{inputs.channel}}",
"text": "Forecast: {{steps.1.result.forecast}}"
}
}
],
"visibility": "private",
"tags": ["weather", "notifications"]
}'
from danube import DanubeClient
with DanubeClient(api_key="dk_...") as client:
workflow = client.workflows.create(
name="Weather Alert Pipeline",
description="Get weather and send Slack notification",
steps=[
{
"step_number": 1,
"tool_id": "tool_weather_001",
"tool_name": "Weather - Get Forecast",
"description": "Fetch the weather forecast",
"input_mapping": {"city": "{{inputs.city}}"},
},
{
"step_number": 2,
"tool_id": "tool_slack_001",
"tool_name": "Slack - Send Message",
"description": "Post forecast to Slack",
"input_mapping": {
"channel": "{{inputs.channel}}",
"text": "Forecast: {{steps.1.result.forecast}}",
},
},
],
visibility="private",
tags=["weather", "notifications"],
)
print(f"Created: {workflow.id}")
import { DanubeClient } from 'danube';
const client = new DanubeClient({ apiKey: 'dk_...' });
const workflow = await client.workflows.create({
name: 'Weather Alert Pipeline',
description: 'Get weather and send Slack notification',
steps: [
{
stepNumber: 1,
toolId: 'tool_weather_001',
toolName: 'Weather - Get Forecast',
description: 'Fetch the weather forecast',
inputMapping: { city: '{{inputs.city}}' },
},
{
stepNumber: 2,
toolId: 'tool_slack_001',
toolName: 'Slack - Send Message',
description: 'Post forecast to Slack',
inputMapping: {
channel: '{{inputs.channel}}',
text: 'Forecast: {{steps.1.result.forecast}}',
},
},
],
visibility: 'private',
tags: ['weather', 'notifications'],
});
console.log(`Created: ${workflow.id}`);
{
"id": "wf_abc123",
"name": "Weather Alert Pipeline",
"description": "Get weather forecast and send Slack notification",
"steps": [
{
"step_number": 1,
"tool_id": "tool_weather_001",
"tool_name": "Weather - Get Forecast",
"description": "Fetch the weather forecast",
"input_mapping": {"city": "{{inputs.city}}"}
},
{
"step_number": 2,
"tool_id": "tool_slack_001",
"tool_name": "Slack - Send Message",
"description": "Post forecast to Slack",
"input_mapping": {
"channel": "{{inputs.channel}}",
"text": "Forecast: {{steps.1.result.forecast}}"
}
}
],
"owner_id": "user_456",
"visibility": "private",
"tags": ["weather", "notifications"],
"created_at": "2026-02-21T12:00:00Z",
"updated_at": "2026-02-21T12:00:00Z"
}
Workflows
Create Workflow
Create a new multi-tool workflow
POST
/
v1
/
workflows
curl -X POST "https://api.danubeai.com/v1/workflows" \
-H "danube-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Weather Alert Pipeline",
"description": "Get weather forecast and send Slack notification",
"steps": [
{
"step_number": 1,
"tool_id": "tool_weather_001",
"tool_name": "Weather - Get Forecast",
"description": "Fetch the weather forecast",
"input_mapping": {"city": "{{inputs.city}}"}
},
{
"step_number": 2,
"tool_id": "tool_slack_001",
"tool_name": "Slack - Send Message",
"description": "Post forecast to Slack",
"input_mapping": {
"channel": "{{inputs.channel}}",
"text": "Forecast: {{steps.1.result.forecast}}"
}
}
],
"visibility": "private",
"tags": ["weather", "notifications"]
}'
from danube import DanubeClient
with DanubeClient(api_key="dk_...") as client:
workflow = client.workflows.create(
name="Weather Alert Pipeline",
description="Get weather and send Slack notification",
steps=[
{
"step_number": 1,
"tool_id": "tool_weather_001",
"tool_name": "Weather - Get Forecast",
"description": "Fetch the weather forecast",
"input_mapping": {"city": "{{inputs.city}}"},
},
{
"step_number": 2,
"tool_id": "tool_slack_001",
"tool_name": "Slack - Send Message",
"description": "Post forecast to Slack",
"input_mapping": {
"channel": "{{inputs.channel}}",
"text": "Forecast: {{steps.1.result.forecast}}",
},
},
],
visibility="private",
tags=["weather", "notifications"],
)
print(f"Created: {workflow.id}")
import { DanubeClient } from 'danube';
const client = new DanubeClient({ apiKey: 'dk_...' });
const workflow = await client.workflows.create({
name: 'Weather Alert Pipeline',
description: 'Get weather and send Slack notification',
steps: [
{
stepNumber: 1,
toolId: 'tool_weather_001',
toolName: 'Weather - Get Forecast',
description: 'Fetch the weather forecast',
inputMapping: { city: '{{inputs.city}}' },
},
{
stepNumber: 2,
toolId: 'tool_slack_001',
toolName: 'Slack - Send Message',
description: 'Post forecast to Slack',
inputMapping: {
channel: '{{inputs.channel}}',
text: 'Forecast: {{steps.1.result.forecast}}',
},
},
],
visibility: 'private',
tags: ['weather', 'notifications'],
});
console.log(`Created: ${workflow.id}`);
{
"id": "wf_abc123",
"name": "Weather Alert Pipeline",
"description": "Get weather forecast and send Slack notification",
"steps": [
{
"step_number": 1,
"tool_id": "tool_weather_001",
"tool_name": "Weather - Get Forecast",
"description": "Fetch the weather forecast",
"input_mapping": {"city": "{{inputs.city}}"}
},
{
"step_number": 2,
"tool_id": "tool_slack_001",
"tool_name": "Slack - Send Message",
"description": "Post forecast to Slack",
"input_mapping": {
"channel": "{{inputs.channel}}",
"text": "Forecast: {{steps.1.result.forecast}}"
}
}
],
"owner_id": "user_456",
"visibility": "private",
"tags": ["weather", "notifications"],
"created_at": "2026-02-21T12:00:00Z",
"updated_at": "2026-02-21T12:00:00Z"
}
Overview
Creates a new workflow that chains multiple Danube tools into an ordered pipeline. Each step executes a tool and can reference results from previous steps using template syntax ({{steps.N.result.field}}, {{inputs.field}}).
Auth: Accepts either JWT or API key (danube-api-key header).
Body Parameters
Workflow name (max 128 characters)
Workflow description
Ordered list of workflow steps
Show Step object
Show Step object
Step position (1-based)
Tool UUID to execute
Tool display name
What this step does
Parameter mapping with template variables. Use
{{inputs.field}} for workflow inputs and {{steps.N.result.field}} for previous step outputs."private" or "public"Tags for discovery
Response
Created workflow UUID
Workflow name
Workflow description
The workflow steps as provided
Owner user ID
"private" or "public"Workflow tags
ISO 8601 creation timestamp
Example
curl -X POST "https://api.danubeai.com/v1/workflows" \
-H "danube-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Weather Alert Pipeline",
"description": "Get weather forecast and send Slack notification",
"steps": [
{
"step_number": 1,
"tool_id": "tool_weather_001",
"tool_name": "Weather - Get Forecast",
"description": "Fetch the weather forecast",
"input_mapping": {"city": "{{inputs.city}}"}
},
{
"step_number": 2,
"tool_id": "tool_slack_001",
"tool_name": "Slack - Send Message",
"description": "Post forecast to Slack",
"input_mapping": {
"channel": "{{inputs.channel}}",
"text": "Forecast: {{steps.1.result.forecast}}"
}
}
],
"visibility": "private",
"tags": ["weather", "notifications"]
}'
from danube import DanubeClient
with DanubeClient(api_key="dk_...") as client:
workflow = client.workflows.create(
name="Weather Alert Pipeline",
description="Get weather and send Slack notification",
steps=[
{
"step_number": 1,
"tool_id": "tool_weather_001",
"tool_name": "Weather - Get Forecast",
"description": "Fetch the weather forecast",
"input_mapping": {"city": "{{inputs.city}}"},
},
{
"step_number": 2,
"tool_id": "tool_slack_001",
"tool_name": "Slack - Send Message",
"description": "Post forecast to Slack",
"input_mapping": {
"channel": "{{inputs.channel}}",
"text": "Forecast: {{steps.1.result.forecast}}",
},
},
],
visibility="private",
tags=["weather", "notifications"],
)
print(f"Created: {workflow.id}")
import { DanubeClient } from 'danube';
const client = new DanubeClient({ apiKey: 'dk_...' });
const workflow = await client.workflows.create({
name: 'Weather Alert Pipeline',
description: 'Get weather and send Slack notification',
steps: [
{
stepNumber: 1,
toolId: 'tool_weather_001',
toolName: 'Weather - Get Forecast',
description: 'Fetch the weather forecast',
inputMapping: { city: '{{inputs.city}}' },
},
{
stepNumber: 2,
toolId: 'tool_slack_001',
toolName: 'Slack - Send Message',
description: 'Post forecast to Slack',
inputMapping: {
channel: '{{inputs.channel}}',
text: 'Forecast: {{steps.1.result.forecast}}',
},
},
],
visibility: 'private',
tags: ['weather', 'notifications'],
});
console.log(`Created: ${workflow.id}`);
{
"id": "wf_abc123",
"name": "Weather Alert Pipeline",
"description": "Get weather forecast and send Slack notification",
"steps": [
{
"step_number": 1,
"tool_id": "tool_weather_001",
"tool_name": "Weather - Get Forecast",
"description": "Fetch the weather forecast",
"input_mapping": {"city": "{{inputs.city}}"}
},
{
"step_number": 2,
"tool_id": "tool_slack_001",
"tool_name": "Slack - Send Message",
"description": "Post forecast to Slack",
"input_mapping": {
"channel": "{{inputs.channel}}",
"text": "Forecast: {{steps.1.result.forecast}}"
}
}
],
"owner_id": "user_456",
"visibility": "private",
"tags": ["weather", "notifications"],
"created_at": "2026-02-21T12:00:00Z",
"updated_at": "2026-02-21T12:00:00Z"
}
MCP Tool
This endpoint is also available as thecreate_workflow MCP tool:
result = await mcp.call_tool("create_workflow", {
"name": "Weather Alert Pipeline",
"steps": [
{
"step_number": 1,
"tool_id": "tool_weather_001",
"tool_name": "Weather - Get Forecast",
"description": "Fetch the weather forecast",
"input_mapping": {"city": "{{inputs.city}}"}
}
],
"visibility": "private"
})
⌘I
