Summary
The tags query parameter in the GET /api/v1/workflows endpoint does not filter workflows as documented. When requesting workflows with specific tags, the API returns all workflows including those with no tags at all.
Environment
- n8n version: 1.112.0
- API endpoint:
GET /api/v1/workflows - Deployment: Docker (self-hosted)
Steps to Reproduce
- Create 3 workflows in n8n:
- Workflow A: tagged with “approvals”
- Workflow B: tagged with “approvals”
- Workflow C: no tags
- Make API request with tags filter:
curl -H "X-N8N-API-KEY: <your-api-key>" \
"http://localhost:5678/api/v1/workflows?active=true&projectId=<project-id>&tags=approvals"
Expected Behavior
The API should return only Workflow A and Workflow B (workflows tagged with “approvals”).
Actual Behavior
The API returns all 3 workflows, including Workflow C which has no tags.
From the response, I can confirm all workflows are returned:
{
"data": [
{"id": "...", "name": "Workflow A", "tags": [{"name": "approvals"}]},
{"id": "...", "name": "Workflow B", "tags": [{"name": "approvals"}]},
{"id": "...", "name": "Workflow C", "tags": []}
]
}
API Documentation Reference
According to the OpenAPI spec (n8n-public-api.yaml lines 476-484), the tags parameter is documented as:
- name: tags
in: query
required: false
explode: false
allowReserved: true
schema:
type: string
examples:
- test,production
Impact
This makes the tags parameter unusable for filtering workflows by domain/category. Users must fetch all workflows and filter client-side, which is inefficient for large workflow collections.
Workaround
Currently implementing client-side filtering after fetching all workflows from the API.