Integrations / n8n
n8n
n8n Public API: list and inspect workflows, publish (activate) or deactivate them, review executions, and list credential names and tags on your n8n Cloud or self-hosted instance.
8 actions
API key
6 read2 write
Calls app.n8n.cloud
Connect
const conn = await setu.connections.initiate({ userId: "user_1", toolkit: "n8n" });
console.log(conn.connectUrl); // show this to your user
await conn.waitUntilActive();Permissions requested
This toolkit uses a single credential and requests no scopes.
Actions
Activate workflowwriten8n.activate_workflowActivate (publish) a workflow so its triggers start running. Newer n8n versions label this endpoint deprecated in favour of publish but still serve it.
| Input | Type | Description | |
|---|---|---|---|
workflow_id | string | Required | Workflow id |
await setu.execute({
userId: "user_1",
action: "n8n.activate_workflow",
input: {
"workflow_id": "<workflow_id>"
},
});Deactivate workflowwriten8n.deactivate_workflowDeactivate a workflow so its triggers stop running.
| Input | Type | Description | |
|---|---|---|---|
workflow_id | string | Required | Workflow id |
await setu.execute({
userId: "user_1",
action: "n8n.deactivate_workflow",
input: {
"workflow_id": "<workflow_id>"
},
});Get executionreadn8n.get_executionGet one execution by id: status, timing and, if requested, the full data of every node.
| Input | Type | Description | |
|---|---|---|---|
execution_id | integer | Required | Execution id |
include_data | boolean | Optional | Include the detailed run data (can be large) |
await setu.execute({
userId: "user_1",
action: "n8n.get_execution",
input: {
"execution_id": 1
},
});Get workflowreadn8n.get_workflowGet one workflow in full: its nodes, connections, settings and tags.
| Input | Type | Description | |
|---|---|---|---|
workflow_id | string | Required | Workflow id |
await setu.execute({
userId: "user_1",
action: "n8n.get_workflow",
input: {
"workflow_id": "<workflow_id>"
},
});List credentialsreadn8n.list_credentialsList credential names, types and ids (never the secrets). Only available to the instance owner or an admin.
| Input | Type | Description | |
|---|---|---|---|
limit | integer | Optional | Maximum items per page |
cursor | string | Optional | Cursor from a previous page's next_cursor |
await setu.execute({
userId: "user_1",
action: "n8n.list_credentials",
input: {},
});List executionsreadn8n.list_executionsList workflow runs, newest first, filtered by workflow or status (error, success, running, waiting, ...). Does not include run data.
| Input | Type | Description | |
|---|---|---|---|
workflow_id | string | Optional | Only executions of this workflow |
status | string | Optional | Only executions with this status |
started_after | string | Optional | Only runs started after this ISO 8601 time |
limit | integer | Optional | Maximum items per page |
cursor | string | Optional | Cursor from a previous page's next_cursor |
await setu.execute({
userId: "user_1",
action: "n8n.list_executions",
input: {},
});List tagsreadn8n.list_tagsList the tags used to organise workflows.
| Input | Type | Description | |
|---|---|---|---|
limit | integer | Optional | Maximum items per page |
cursor | string | Optional | Cursor from a previous page's next_cursor |
await setu.execute({
userId: "user_1",
action: "n8n.list_tags",
input: {},
});List workflowsreadn8n.list_workflowsList workflows on the n8n instance with their ids, names and active state; filter by name, active flag or tag.
| Input | Type | Description | |
|---|---|---|---|
active | boolean | Optional | Only active (true) or inactive (false) workflows |
name | string | Optional | Filter by workflow name |
tags | string | Optional | Comma-separated tag names |
limit | integer | Optional | Maximum items per page |
cursor | string | Optional | Cursor from a previous page's next_cursor |
await setu.execute({
userId: "user_1",
action: "n8n.list_workflows",
input: {},
});