For the complete documentation index, see llms.txt. This page is also available as Markdown.

Workflow

Operations about workflows

Retrieve all workflows

get

Retrieve all workflows from your instance.

Authorizations
X-N8N-API-KEYstringRequired
Query parameters
activebooleanOptionalExample: true
tagsstringOptionalExample: test,production
namestringOptionalExample: My Workflow
projectIdstringOptionalExample: VmwOO9HeTEj20kxM
excludePinnedDatabooleanOptional

Set this to avoid retrieving pinned data

Example: true
limitnumber · max: 250Optional

The maximum number of items to return.

Default: 100Example: 100
cursorstringOptional

Paginate by setting the cursor parameter to the nextCursor attribute returned by the previous request's response. Default value fetches the first "page" of the collection. See pagination for more detail.

Responses
200

Operation successful.

application/json
nextCursorstring · nullableOptional

Paginate through workflows by setting the cursor parameter to a nextCursor attribute returned by a previous request. Default value fetches the first "page" of the collection.

Example: MTIzZTQ1NjctZTg5Yi0xMmQzLWE0NTYtNDI2NjE0MTc0MDA
get/workflows

Create a workflow

post

Create a workflow in your instance.

Authorizations
X-N8N-API-KEYstringRequired
Body
idstringRead-onlyOptionalExample: 2tUt1wbLX592XDdX
namestringRequiredExample: Workflow 1
activebooleanRead-onlyOptional
createdAtstring · date-timeRead-onlyOptional
updatedAtstring · date-timeRead-onlyOptional
isArchivedbooleanRead-onlyOptional
versionIdstringRead-onlyOptional

Current version identifier used for optimistic locking

triggerCountintegerRead-onlyOptional

Number of active trigger nodes in the workflow

connectionsobjectRequiredExample: {"Jira":{"main":[[{"node":"Jira","type":"main","index":0}]]}}
staticDataany ofOptionalExample: {"lastId":1}
string · jsonString · nullableOptional
or
object · nullableOptional
pinDataobject · nullableOptional

Pinned sample data for nodes, keyed by node name

projectIdstringOptional

Target project to create the workflow in. Defaults to the user's personal project.

Example: VmwOO9HeTEj20kxM
Responses
200

A workflow object

application/json
idstringRead-onlyOptionalExample: 2tUt1wbLX592XDdX
namestringRequiredExample: Workflow 1
descriptionstringOptional

Description of the workflow

Example: My workflow description
activebooleanRead-onlyOptional
createdAtstring · date-timeRead-onlyOptional
updatedAtstring · date-timeRead-onlyOptional
isArchivedbooleanRead-onlyOptional
versionIdstringRead-onlyOptional

Current version identifier used for optimistic locking

triggerCountintegerRead-onlyOptional

Number of active trigger nodes in the workflow

connectionsobjectRequiredExample: {"Jira":{"main":[[{"node":"Jira","type":"main","index":0}]]}}
staticDataany ofOptionalExample: {"lastId":1}
string · jsonString · nullableOptional
or
object · nullableOptional
pinDataobject · nullableOptional

Pinned sample data for nodes, keyed by node name

post/workflows

Retrieve a workflow

get

Retrieve a workflow.

Authorizations
X-N8N-API-KEYstringRequired
Path parameters
idstringRequired

The ID of the workflow.

Query parameters
excludePinnedDatabooleanOptional

Set this to avoid retrieving pinned data

Example: true
Responses
200

Operation successful.

application/json
idstringRead-onlyOptionalExample: 2tUt1wbLX592XDdX
namestringRequiredExample: Workflow 1
descriptionstringOptional

Description of the workflow

Example: My workflow description
activebooleanRead-onlyOptional
createdAtstring · date-timeRead-onlyOptional
updatedAtstring · date-timeRead-onlyOptional
isArchivedbooleanRead-onlyOptional
versionIdstringRead-onlyOptional

Current version identifier used for optimistic locking

triggerCountintegerRead-onlyOptional

Number of active trigger nodes in the workflow

connectionsobjectRequiredExample: {"Jira":{"main":[[{"node":"Jira","type":"main","index":0}]]}}
staticDataany ofOptionalExample: {"lastId":1}
string · jsonString · nullableOptional
or
object · nullableOptional
pinDataobject · nullableOptional

Pinned sample data for nodes, keyed by node name

get/workflows/{id}

Update a workflow

put

Update a workflow. If the workflow is published, the updated version will be automatically re-published.

Authorizations
X-N8N-API-KEYstringRequired
Path parameters
idstringRequired

The ID of the workflow.

Body
idstringRead-onlyOptionalExample: 2tUt1wbLX592XDdX
namestringRequiredExample: Workflow 1
descriptionstringOptional

Description of the workflow

Example: My workflow description
activebooleanRead-onlyOptional
createdAtstring · date-timeRead-onlyOptional
updatedAtstring · date-timeRead-onlyOptional
isArchivedbooleanRead-onlyOptional
versionIdstringRead-onlyOptional

Current version identifier used for optimistic locking

triggerCountintegerRead-onlyOptional

Number of active trigger nodes in the workflow

connectionsobjectRequiredExample: {"Jira":{"main":[[{"node":"Jira","type":"main","index":0}]]}}
staticDataany ofOptionalExample: {"lastId":1}
string · jsonString · nullableOptional
or
object · nullableOptional
pinDataobject · nullableOptional

Pinned sample data for nodes, keyed by node name

Responses
200

Workflow object

application/json
idstringRead-onlyOptionalExample: 2tUt1wbLX592XDdX
namestringRequiredExample: Workflow 1
descriptionstringOptional

Description of the workflow

Example: My workflow description
activebooleanRead-onlyOptional
createdAtstring · date-timeRead-onlyOptional
updatedAtstring · date-timeRead-onlyOptional
isArchivedbooleanRead-onlyOptional
versionIdstringRead-onlyOptional

Current version identifier used for optimistic locking

triggerCountintegerRead-onlyOptional

Number of active trigger nodes in the workflow

connectionsobjectRequiredExample: {"Jira":{"main":[[{"node":"Jira","type":"main","index":0}]]}}
staticDataany ofOptionalExample: {"lastId":1}
string · jsonString · nullableOptional
or
object · nullableOptional
pinDataobject · nullableOptional

Pinned sample data for nodes, keyed by node name

put/workflows/{id}

Delete a workflow

delete

Delete a workflow.

Authorizations
X-N8N-API-KEYstringRequired
Path parameters
idstringRequired

The ID of the workflow.

Responses
200

Operation successful.

application/json
idstringRead-onlyOptionalExample: 2tUt1wbLX592XDdX
namestringRequiredExample: Workflow 1
descriptionstringOptional

Description of the workflow

Example: My workflow description
activebooleanRead-onlyOptional
createdAtstring · date-timeRead-onlyOptional
updatedAtstring · date-timeRead-onlyOptional
isArchivedbooleanRead-onlyOptional
versionIdstringRead-onlyOptional

Current version identifier used for optimistic locking

triggerCountintegerRead-onlyOptional

Number of active trigger nodes in the workflow

connectionsobjectRequiredExample: {"Jira":{"main":[[{"node":"Jira","type":"main","index":0}]]}}
staticDataany ofOptionalExample: {"lastId":1}
string · jsonString · nullableOptional
or
object · nullableOptional
pinDataobject · nullableOptional

Pinned sample data for nodes, keyed by node name

delete/workflows/{id}

Retrieves a specific version of a workflow

get

Retrieves a specific version of a workflow from workflow history.

Authorizations
X-N8N-API-KEYstringRequired
Path parameters
idstringRequired

The ID of the workflow.

versionIdstringRequired

The version ID to retrieve

Example: abc123-def456-ghi789
Responses
200

Operation successful.

application/json
versionIdstringRead-onlyRequired

The version ID of this workflow snapshot

Example: abc123-def456
workflowIdstringRead-onlyRequired

The workflow ID this version belongs to

Example: 2tUt1wbLX592XDdX
connectionsobjectRead-onlyRequired

Connections as they were in this version

Example: {"Jira":{"main":[[{"node":"Jira","type":"main","index":0}]]}}
authorsstringRead-onlyRequired

Authors who created this version

Example: John Doe
namestring · nullableOptional

Workflow name at this version

Example: Workflow 1
descriptionstring · nullableOptional

Workflow description at this version

createdAtstring · date-timeRead-onlyOptional

When this version was created

updatedAtstring · date-timeRead-onlyOptional

When this version was last updated

get/workflows/{id}/{versionId}

Publish a workflow

post

Publish a workflow. In n8n v1, this action was termed activating a workflow.

Authorizations
X-N8N-API-KEYstringRequired
Path parameters
idstringRequired

The ID of the workflow.

Body
versionIdstringOptional

The specific version ID to activate or publish. If not provided, the latest version is used.

namestringOptional

Optional name for the workflow version during activation.

descriptionstringOptional

Optional description for the workflow version during activation.

Responses
200

Workflow object

application/json
idstringRead-onlyOptionalExample: 2tUt1wbLX592XDdX
namestringRequiredExample: Workflow 1
descriptionstringOptional

Description of the workflow

Example: My workflow description
activebooleanRead-onlyOptional
createdAtstring · date-timeRead-onlyOptional
updatedAtstring · date-timeRead-onlyOptional
isArchivedbooleanRead-onlyOptional
versionIdstringRead-onlyOptional

Current version identifier used for optimistic locking

triggerCountintegerRead-onlyOptional

Number of active trigger nodes in the workflow

connectionsobjectRequiredExample: {"Jira":{"main":[[{"node":"Jira","type":"main","index":0}]]}}
staticDataany ofOptionalExample: {"lastId":1}
string · jsonString · nullableOptional
or
object · nullableOptional
pinDataobject · nullableOptional

Pinned sample data for nodes, keyed by node name

post/workflows/{id}/activate

Deactivate a workflow

post

Deactivate a workflow.

Authorizations
X-N8N-API-KEYstringRequired
Path parameters
idstringRequired

The ID of the workflow.

Responses
200

Workflow object

application/json
idstringRead-onlyOptionalExample: 2tUt1wbLX592XDdX
namestringRequiredExample: Workflow 1
descriptionstringOptional

Description of the workflow

Example: My workflow description
activebooleanRead-onlyOptional
createdAtstring · date-timeRead-onlyOptional
updatedAtstring · date-timeRead-onlyOptional
isArchivedbooleanRead-onlyOptional
versionIdstringRead-onlyOptional

Current version identifier used for optimistic locking

triggerCountintegerRead-onlyOptional

Number of active trigger nodes in the workflow

connectionsobjectRequiredExample: {"Jira":{"main":[[{"node":"Jira","type":"main","index":0}]]}}
staticDataany ofOptionalExample: {"lastId":1}
string · jsonString · nullableOptional
or
object · nullableOptional
pinDataobject · nullableOptional

Pinned sample data for nodes, keyed by node name

post/workflows/{id}/deactivate

Archive a workflow

post

Soft-deletes a workflow by archiving it. Idempotent: archiving an already archived workflow returns 200 with the current workflow.

Requires API key scope workflow:delete.

Authorizations
X-N8N-API-KEYstringRequired
Path parameters
idstringRequired

The ID of the workflow.

Responses
200

Archived workflow

application/json
idstringRead-onlyOptionalExample: 2tUt1wbLX592XDdX
namestringRequiredExample: Workflow 1
descriptionstringOptional

Description of the workflow

Example: My workflow description
activebooleanRead-onlyOptional
createdAtstring · date-timeRead-onlyOptional
updatedAtstring · date-timeRead-onlyOptional
isArchivedbooleanRead-onlyOptional
versionIdstringRead-onlyOptional

Current version identifier used for optimistic locking

triggerCountintegerRead-onlyOptional

Number of active trigger nodes in the workflow

connectionsobjectRequiredExample: {"Jira":{"main":[[{"node":"Jira","type":"main","index":0}]]}}
staticDataany ofOptionalExample: {"lastId":1}
string · jsonString · nullableOptional
or
object · nullableOptional
pinDataobject · nullableOptional

Pinned sample data for nodes, keyed by node name

post/workflows/{id}/archive

Unarchive a workflow

post

Restores an archived workflow.

Requires API key scope workflow:delete.

Authorizations
X-N8N-API-KEYstringRequired
Path parameters
idstringRequired

The ID of the workflow.

Responses
200

Unarchived workflow

application/json
idstringRead-onlyOptionalExample: 2tUt1wbLX592XDdX
namestringRequiredExample: Workflow 1
descriptionstringOptional

Description of the workflow

Example: My workflow description
activebooleanRead-onlyOptional
createdAtstring · date-timeRead-onlyOptional
updatedAtstring · date-timeRead-onlyOptional
isArchivedbooleanRead-onlyOptional
versionIdstringRead-onlyOptional

Current version identifier used for optimistic locking

triggerCountintegerRead-onlyOptional

Number of active trigger nodes in the workflow

connectionsobjectRequiredExample: {"Jira":{"main":[[{"node":"Jira","type":"main","index":0}]]}}
staticDataany ofOptionalExample: {"lastId":1}
string · jsonString · nullableOptional
or
object · nullableOptional
pinDataobject · nullableOptional

Pinned sample data for nodes, keyed by node name

post/workflows/{id}/unarchive

Transfer a workflow to another project

put

Transfer a workflow to another project

Authorizations
X-N8N-API-KEYstringRequired
Path parameters
idstringRequired

The ID of the workflow.

Body
destinationProjectIdstringRequired

The ID of the project to transfer the workflow to.

Responses
200

Operation successful.

No content

put/workflows/{id}/transfer

No content

Get workflow tags

get

Get workflow tags.

Authorizations
X-N8N-API-KEYstringRequired
Path parameters
idstringRequired

The ID of the workflow.

Responses
200

List of tags

application/json
idstringRead-onlyOptionalExample: 2tUt1wbLX592XDdX
namestringRequiredExample: Production
createdAtstring · date-timeRead-onlyOptional
updatedAtstring · date-timeRead-onlyOptional
get/workflows/{id}/tags

Update tags of a workflow

put

Update tags of a workflow.

Authorizations
X-N8N-API-KEYstringRequired
Path parameters
idstringRequired

The ID of the workflow.

Bodyobject[]
idstringRequiredExample: 2tUt1wbLX592XDdX
Responses
200

List of tags after add the tag

application/json
idstringRead-onlyOptionalExample: 2tUt1wbLX592XDdX
namestringRequiredExample: Production
createdAtstring · date-timeRead-onlyOptional
updatedAtstring · date-timeRead-onlyOptional
put/workflows/{id}/tags

Last updated

Was this helpful?