Skip to main content

Overview

Retrieve workflow information from your n8n instance. Supports multiple detail levels to optimize response size and performance.

Endpoint

GET /workflows/:id

Request Parameters

id
string
required
Workflow ID to retrieveExample: "wf_abc123"
mode
string
default:"full"
Detail level for the response
Use minimal for listing workflows, structure for visualizing topology, and full for editing.

Response

Common Fields (All Modes)

success
boolean
Operation success status
data
object
Workflow data (structure varies by mode)

Mode: minimal

data.id
string
Workflow unique identifier
data.name
string
Workflow name
data.active
boolean
Whether workflow is currently active
data.isArchived
boolean
Whether workflow is archived
data.tags
array
Array of tag strings
data.createdAt
string
ISO 8601 creation timestamp
data.updatedAt
string
ISO 8601 last update timestamp

Mode: structure

data.nodes
array
Simplified node array
data.connections
object
Workflow connections object
data.nodeCount
number
Total number of nodes
data.connectionCount
number
Total number of connections

Mode: details

Includes all full mode fields plus:
data.executionStats
object
Execution statistics from last 10 runs
data.hasWebhookTrigger
boolean
Whether workflow has a webhook trigger node
data.webhookPath
string
Webhook URL if applicable

Mode: full

data.workflow
object
Complete workflow object with all properties

Error Codes

NOT_FOUND
string
Cause: Workflow ID does not existResolution: Use n8n_list_workflows to find valid IDs
API_ERROR
string
Cause: n8n API not configured or unreachableResolution: Verify configuration with n8n_health_check
INVALID_INPUT
string
Cause: Invalid mode parameterResolution: Use one of: full, details, structure, minimal

Examples

curl -X GET "https://n8n.example.com/api/v1/workflows/wf_abc123?mode=minimal" \
  -H "X-N8N-API-KEY: your-api-key"

Response Examples

{
  "success": true,
  "data": {
    "id": "wf_abc123",
    "name": "Customer Onboarding",
    "active": true,
    "isArchived": false,
    "tags": ["production", "crm"],
    "createdAt": "2024-01-15T10:30:00.000Z",
    "updatedAt": "2024-03-05T14:22:00.000Z"
  }
}

Performance Tips

Mode Selection Guide:
  • Listing workflows: Use minimal mode
  • Displaying workflow cards: Use structure mode
  • Debugging execution issues: Use details mode
  • Editing workflows: Use full mode
  • Monitoring webhook URLs: Use details mode
The structure mode response size is typically 70-90% smaller than full mode, making it ideal for UI rendering and topology visualization.
Conceived by Romuald Członkowski - www.aiadvisors.pl/en

Build docs developers (and LLMs) love