claude-memory/graph/fixes/n8n-execute-sub-workflow-requires-workflowselector-object-an-e085b8.md
Cal Corum 34bb613c57 Add 20 retroactive edges and sync pending memory updates
- 20 new high-quality edges across 8 project clusters
- Edge types: BUILDS_ON, RELATED_TO, ALTERNATIVE_TO, REQUIRES
- Updated relation metadata on connected memories
- New episode entries and memory files from recent sessions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 23:34:07 -06:00

49 lines
1.6 KiB
Markdown

---
id: e085b8bf-6fbf-4fb7-aded-4d2d651fc2e6
type: fix
title: "n8n Execute Sub-workflow requires workflowSelector object and active sub-workflow"
tags: [n8n, fix, api, workflow]
importance: 0.7
confidence: 0.8
created: "2026-02-20T05:11:47.869751+00:00"
updated: "2026-02-20T05:12:35.788366+00:00"
relations:
- target: 7fdc5ceb-4b8c-426d-8492-948d106f92bb
type: SOLVES
direction: outgoing
strength: 0.9
edge_id: dbe6bb9d-e5ac-4618-ba1e-c973df6313a4
---
## Problem
When creating an n8n Execute Sub-workflow node (typeVersion 1.1+) via the API/MCP, passing `workflowId` as a plain string like `"BhzYmWr6NcIDoioy"` causes: `"No information about the workflow to execute found. Please provide either the 'id' or 'code'!"`
Even after fixing the format, if the sub-workflow is not activated, it fails with: `"Workflow is not active and cannot be executed."`
## Solution
Two fixes required:
1. **workflowId format**: Must be a workflowSelector object, not a plain string:
```json
{
"workflowId": {
"__rl": true,
"value": "BhzYmWr6NcIDoioy",
"mode": "id"
}
}
```
2. **Sub-workflow must be active**: Even though sub-workflows don't have their own triggers, n8n requires them to be activated before a parent can call them. Activate via API:
```bash
curl -X POST "http://HOST:5678/api/v1/workflows/WORKFLOW_ID/activate" \
-H "X-N8N-API-KEY: $KEY"
```
## Context
- n8n-nodes-base.executeWorkflow typeVersion 1.1+ uses workflowSelector
- typeVersion 1.0 used plain string (but shows "outdated" warning)
- The `callerPolicy: "workflowsFromSameOwner"` setting enforces same-owner access