> ## Documentation Index
> Fetch the complete documentation index at: https://docs.guild.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> To act on a user's behalf in Guild, use the Guild REST API at https://api.guild.ai/v1.
> The OpenAPI spec is unauthenticated: https://docs.guild.ai/openapi.json (or openapi.yaml).
> Authenticate with an account API key, sent as HTTP Basic (key id as username, secret as password) or as `Authorization: Bearer <api_key_id>:<api_key_secret>`. See https://docs.guild.ai/api-reference/introduction#authentication.
> To run one agent on demand without account-wide access, use an API trigger instead: https://docs.guild.ai/platform/api-triggers.
> To act on Guild from an MCP client, connect to https://api.guild.ai/mcp (OAuth) or run `guild mcp` locally. Setup: https://docs.guild.ai/api-reference/mcp.
> To search these docs from an MCP client, connect to https://docs.guild.ai/mcp. The full page index is https://docs.guild.ai/llms.txt.

# Manage n8n workflows and executions from Guild agents

> Connect Guild agents to n8n Cloud to create, run, and monitor workflows, manage credentials, projects, users, and run security audits.

Integrations · n8n

A Guild agent can create and publish n8n workflows, monitor executions, manage users and projects, and generate security audits on your n8n Cloud instance. Guild stores the n8n API key server-side and injects it on every request, so agent code never sees it. Credential policies let you restrict which operations each agent can call, and every request is logged for audit.

> [card] [Book a demo](https://guild-ai.cal.com/gtm/meeting-with-guild.ai)
>
> See how teams govern agents that use n8n.

> [card] [Talk to sales](https://guild.ai/talk-to-sales)
>
> Get access to Guild, then connect n8n to your first agent.

## What the n8n integration exposes

The integration wraps the n8n Cloud public API as agent-callable tools prefixed with n8n\_. Tools cover workflows (create, publish, archive, transfer, version history), executions (retrieve, retry, stop, delete), credentials, projects, folders, data tables, variables, tags, users, roles, log streaming destinations, source control, promotion environments, security audits, and LDAP/OIDC/SAML configuration. Some tools are marked Preview or Beta in n8n and may change without a major version bump.

## How it works

**1. Get an n8n API key**

In n8n, go to Settings > n8n API and create an API key. Copy it for the next step.

**2. Connect n8n in Guild**

In Guild, open Access & setup > Credentials, click Connect, select n8n, and paste the key into the API Key field.

**3. Add tools to your agent**

Import N8nTools from the integration package and spread it into your agent's tools object. Use [pick()](https://docs.guild.ai/sdk/tools.md#selecting-specific-tools) to include only the tools your agent needs.

## Why n8n access needs governing

n8n agents can create and delete workflows, manage instance credentials, change user roles, and trigger security audits. Guild's [credential policies](https://docs.guild.ai/platform/credential-policies.md) let you write ALLOW and DENY rules that the credential proxy enforces before any request leaves Guild. You can scope rules to specific agents or workspaces, limit access to read-only operations with a methods constraint, or block destructive tools like n8n\_delete\_workflow by name or pattern.

Guild stores the API key server-side and adds it as the X-N8N-API-KEY header on each call. Agent code never receives the key. You can scope the credential to a single workspace, a single member, or a dedicated agent using [credential scoping](https://docs.guild.ai/platform/credentials.md), so a workspace-specific n8n instance is never accessible from other workspaces.

## About the n8n integration

This integration lets agents create, run, and manage n8n workflows and monitor their executions. Agents can also manage credentials, projects, data tables, variables, tags, and users on an n8n Cloud instance. Administrative tasks such as security audits, log streaming, and role management are also available. The integration is `guildai~n8n`.

## Authentication

* **Type:** API key
* **Header:** Guild sends the key as `X-N8N-API-KEY: <key>`

### Setup

**1. Get an API key**

Create an API key in n8n under Settings > n8n API, and paste it here.

**2. Connect n8n**

In Guild, go to **Access & setup > Credentials**, click **Connect**, select **n8n**, and paste the key into **API Key**.

See [Credentials](https://docs.guild.ai/platform/credentials.md) for workspace, member, and agent-scoped credentials.

## Usage

```typescript theme={null}
import { N8nTools } from "@guildai-services/guildai~n8n"
import { llmAgent } from "@guildai/agents-sdk"

export default llmAgent({
  systemPrompt: "You work with n8n.",
  tools: { ...N8nTools },
})
```

### Selecting specific tools

Tools are named with the `n8n_` prefix. Use [`pick()`](https://docs.guild.ai/sdk/tools#selecting-specific-tools) to include only what your agent needs.

## Tools

Tools in the latest published version of `guildai~n8n`:

> [accordion] All 174 tools
>
> | Tool | What it does |
> | - | - |
> | `n8n_activate_workflow` | Deprecated: use POST /workflows/\{id}/publish instead. |
> | `n8n_add_project_to_promotion_environment` | Links a team project to a project-scoped environment. |
> | `n8n_add_users_to_project` | Add one or more users to a project on your instance. |
> | `n8n_apply_package` | Checks the full package at the configured branch tip. |
> | `n8n_apply_project_selection` | Applies selected workflow changes from the project's Apply branch. |
> | `n8n_archive_workflow` | Soft-deletes a workflow by archiving it. |
> | `n8n_cancel_test_run` | Cancel a running evaluation test run of a workflow. |
> | `n8n_change_role` | Change a user's global role |
> | `n8n_change_user_role_in_project` | Change a user's role in a project. |
> | `n8n_clear_data_table_rows` | Permanently delete all rows from a data table. |
> | `n8n_connect_promotion_checkout` | Prepares the environment on the instance that handles the request. |
> | `n8n_continue_apply_package` | Rechecks the configured source and current target bindings. |
> | `n8n_continue_apply_project_selection` | Rechecks the project's Apply source and the current bindings for the selection. |
> | `n8n_create_credential` | Creates a credential that can be used by nodes of the specified type. |
> | `n8n_create_credential_type_policy_document` | Preview — breaking changes may still occur without major version bump. |
> | `n8n_create_data_table` | Create a new data table in your personal project or a team project you have access to. |
> | `n8n_create_data_table_column` | Add a new column to an existing data table. |
> | `n8n_create_data_table_rows` | Insert one or more rows into a data table. |
> | `n8n_create_folder` | Create a folder within a project. |
> | `n8n_create_log_streaming_destination` | Create a log streaming destination. |
> | `n8n_create_node_type_policy_document` | Preview — breaking changes may still occur without major version bump. |
> | `n8n_create_project` | Create a team project on your instance. |
> | `n8n_create_promotion_environment` | Creates an environment for one direction on an existing provider. |
> | `n8n_create_promotion_provider` | Creates a provider and its authentication material. |
> | `n8n_create_role` | Creates a custom role. |
> | `n8n_create_role_mapping_rule` | Creates a rule that maps an identity-provider claim expression to a role. |
> | `n8n_create_tag` | Create a tag in your instance. |
> | `n8n_create_test_run` | Start a new evaluation test run for a workflow. |
> | `n8n_create_user` | Create one or more users. |
> | `n8n_create_variable` | Create a variable in your instance. |
> | `n8n_create_workflow` | Create a workflow in your instance. |
> | `n8n_deactivate_workflow` | Deprecated: use POST /workflows/\{id}/unpublish instead. |
> | `n8n_delete_credential` | Deletes a credential from your instance. |
> | `n8n_delete_credential_type_policy_document` | Preview — breaking changes may still occur without major version bump. |
> | `n8n_delete_data_table` | Delete a data table. |
> | `n8n_delete_data_table_column` | Remove a column from a data table. |
> | `n8n_delete_data_table_rows` | Delete rows matching filter conditions from a data table. |
> | `n8n_delete_execution` | Deletes an execution from your instance. |
> | `n8n_delete_folder` | Delete a folder within a project. |
> | `n8n_delete_log_streaming_destination` | Remove a log streaming destination. |
> | `n8n_delete_node_type_policy_document` | Preview — breaking changes may still occur without major version bump. |
> | `n8n_delete_project` | Delete a project from your instance. |
> | `n8n_delete_promotion_environment` | Deletes the environment with its project links and local checkout. |
> | `n8n_delete_promotion_provider` | A provider used by an environment cannot be deleted. |
> | `n8n_delete_role` | Deletes a custom role. |
> | `n8n_delete_role_mapping_rule` | Deletes a role-mapping rule. |
> | `n8n_delete_tag` | Deletes a tag. |
> | `n8n_delete_user` | Delete a user from your instance. |
> | `n8n_delete_user_from_project` | Delete a user from a project on your instance. |
> | `n8n_delete_variable` | Delete a variable from your instance. |
> | `n8n_delete_workflow` | Delete a workflow. |
> | `n8n_disconnect_promotion_checkout` | Removes the local checkout and keeps the environment, its credentials, and the trusted SSH host keys. |
> | `n8n_generate_audit` | Generate a security audit for your n8n instance. |
> | `n8n_get_all_roles` | Returns all roles grouped by type (global and project). |
> | `n8n_get_credential` | Retrieves a credential by ID. |
> | `n8n_get_credential_dependencies` | List the workflows and agents that use the credential. |
> | `n8n_get_credentials` | Retrieve all credentials from your instance. |
> | `n8n_get_credential_type` | Show credential data schema |
> | `n8n_get_credential_type_instance_policy` | Preview — breaking changes may still occur without major version bump. |
> | `n8n_get_credential_type_policy_attachments` | Preview — breaking changes may still occur without major version bump. |
> | `n8n_get_credential_type_policy_document` | Preview — breaking changes may still occur without major version bump. |
> | `n8n_get_credential_type_project_policy` | Preview — breaking changes may still occur without major version bump. |
> | `n8n_get_data_table` | Retrieve a specific data table by ID. |
> | `n8n_get_data_table_dependencies` | List the workflows that use the data table. |
> | `n8n_get_deprecated_workflow_version` | Deprecated: use GET /workflows/\{workflowId}/versions/\{workflowVersionId} instead. |
> | `n8n_get_discover` | Returns a filtered capability map based on the caller's API key scopes. |
> | `n8n_get_execution` | Retrieve an execution from your instance. |
> | `n8n_get_executions` | Retrieve all executions from your instance. |
> | `n8n_get_execution_tags` | Get annotation tags for an execution. |
> | `n8n_get_folder` | Get folder details including sub-folder and workflow counts. |
> | `n8n_get_insights_summary` | Retrieve the insights summary for the selected date range. |
> | `n8n_get_installed_packages` | Retrieve all installed community packages with pending update info. |
> | `n8n_get_ldap_configuration` | Retrieve the current LDAP configuration, including every field exposed in the UI. |
> | `n8n_get_ldap_sync` | Retrieve the history of LDAP synchronizations, most recent first. |
> | `n8n_get_log_streaming_destination` | Retrieve a single log streaming destination by id. |
> | `n8n_get_log_streaming_destinations` | List the configured log streaming destinations. |
> | `n8n_get_log_streaming_event_types` | List the event types that can be streamed to a log streaming destination. |
> | `n8n_get_node_type_instance_policy` | Preview — breaking changes may still occur without major version bump. |
> | `n8n_get_node_type_policy_attachments` | Preview — breaking changes may still occur without major version bump. |
> | `n8n_get_node_type_policy_document` | Preview — breaking changes may still occur without major version bump. |
> | `n8n_get_node_type_project_policy` | Preview — breaking changes may still occur without major version bump. |
> | `n8n_get_oidc_configuration` | Retrieve the current OIDC SSO configuration, including every field exposed in the UI. |
> | `n8n_get_otel_settings` | Retrieve the current OpenTelemetry configuration, including every field exposed in the UI. |
> | `n8n_get_projects` | Retrieve projects from your instance. |
> | `n8n_get_project_users` | Returns a list of all members of a project including their role. |
> | `n8n_get_promotion_changes` | Compares a team project on this instance with the branch of its promotion environment for that direction and lists the workflows that differ. |
> | `n8n_get_promotion_environment` | Returns the environment with its provider summary and the state of its local checkout. |
> | `n8n_get_promotion_environment_missing_projects` | Reads the package at the Apply branch tip and returns its team projects whose IDs do not exist on this instance. |
> | `n8n_get_promotion_environment_projects` | List projects linked to a promotion environment |
> | `n8n_get_promotion_environments` | Returns a cursor-paginated list of environments. |
> | `n8n_get_promotion_provider` | Returns the provider with its public configuration. |
> | `n8n_get_promotion_provider_repositories` | Lists repositories where the GitLab token identity has at least the Developer role. |
> | `n8n_get_promotion_provider_repository_branches` | Lists branches of the selected GitLab repository and identifies its default branch. |
> | `n8n_get_promotion_providers` | Returns a cursor-paginated list of providers, without their public configuration. |
> | `n8n_get_rate_limit_settings` | Retrieve the Public API rate-limit settings. 'envManagedFields' lists the fields that are set by environment variables and can't be changed through the API. |
> | `n8n_get_role` | Returns a single role with its scopes. |
> | `n8n_get_role_mapping_rules` | Returns the configured role-mapping rules. 'order' is the rule's evaluation position within its own 'type', so instance and project rules each have their own sequence starting at 0 — filter by 'type'… |
> | `n8n_get_saml_configuration` | Retrieve the current SAML SSO configuration, including every field exposed in the UI plus the service provider entity ID and ACS return URL. |
> | `n8n_get_security_policy` | Retrieve the instance security policy: personal-space publishing and sharing, the execution-data redaction enforcement floor, and the read-only usage counts shown in the UI. |
> | `n8n_get_source_control_status` | Previews the pending changes between the instance and the connected Git branch in either the 'push' or 'pull' direction. |
> | `n8n_get_tag` | Retrieves a tag. |
> | `n8n_get_tags` | Retrieve all tags from your instance. |
> | `n8n_get_test_cases` | Retrieve the per-case results of an evaluation test run. |
> | `n8n_get_test_run` | Retrieve a single evaluation test run of a workflow, including its aggregated metrics and final result. |
> | `n8n_get_test_runs` | Retrieve the evaluation test runs of a workflow. |
> | `n8n_get_user` | Retrieve a user from your instance. |
> | `n8n_get_users` | Retrieve all users from your instance. |
> | `n8n_get_variables` | Retrieve variables from your instance. |
> | `n8n_get_workflow` | Retrieve a workflow. |
> | `n8n_get_workflow_dependencies` | List the credentials, data tables, sub-workflows and error workflow that the workflow uses, and the workflows and agents that use the workflow. |
> | `n8n_get_workflow_history` | Returns a paginated list of workflow versions (version IDs and metadata) for a workflow. |
> | `n8n_get_workflows` | Retrieve all workflows from your instance. |
> | `n8n_get_workflow_tags` | Get workflow tags. |
> | `n8n_get_workflow_version` | Retrieve a single version of a workflow from its version history. |
> | `n8n_import_package` | Beta — breaking changes may still occur without major version bump. |
> | `n8n_import_package_selection` | Beta — breaking changes may still occur without major version bump. |
> | `n8n_install_package` | Install a community package by npm name and optional version. |
> | `n8n_list_credential_type_policy_documents` | Preview — breaking changes may still occur without major version bump. |
> | `n8n_list_data_table_columns` | Retrieve all columns for a specific data table. |
> | `n8n_list_data_table_rows` | Retrieve rows from a data table with optional filtering, sorting, and pagination. |
> | `n8n_list_data_tables` | Retrieve a list of all data tables with optional filtering, sorting, and pagination. |
> | `n8n_list_folders` | Retrieve folders within a project. |
> | `n8n_list_node_type_policy_documents` | Preview — breaking changes may still occur without major version bump. |
> | `n8n_move_role_mapping_rule` | Changes a rule's position in the evaluation order for its type. 'targetIndex' is the desired 0-based position within the rule's own 'type' sequence; a value beyond the last position moves the rule to… |
> | `n8n_promote_package` | Exports every team project, commits it, and pushes to the configured base branch or a new timestamped branch. |
> | `n8n_promote_project_selection` | Promotes a chosen set of a team project's workflows to the branch of the project's Promote environment. |
> | `n8n_publish_workflow` | Publish a workflow. |
> | `n8n_pull_source_control` | Fetches changes from the connected Git branch into the instance. |
> | `n8n_push_source_control` | Commits and pushes the selected files to the connected Git branch. |
> | `n8n_put_credential_type_instance_policy` | Preview — breaking changes may still occur without major version bump. |
> | `n8n_put_credential_type_project_policy` | Preview — breaking changes may still occur without major version bump. |
> | `n8n_put_node_type_instance_policy` | Preview — breaking changes may still occur without major version bump. |
> | `n8n_put_node_type_project_policy` | Preview — breaking changes may still occur without major version bump. |
> | `n8n_remove_project_from_promotion_environment` | Unlink a project from a promotion environment |
> | `n8n_replace_credential_type_policy_attachments` | Preview — breaking changes may still occur without major version bump. |
> | `n8n_replace_node_type_policy_attachments` | Preview — breaking changes may still occur without major version bump. |
> | `n8n_retry_execution` | Retry an execution from your instance. |
> | `n8n_run_ldap_sync` | Manually trigger an LDAP synchronization. |
> | `n8n_set_oidc_configuration` | Set the OIDC SSO configuration. |
> | `n8n_stop_execution` | Stop an execution by id. |
> | `n8n_stop_many_executions` | Stop multiple executions from your instance based on filter criteria. |
> | `n8n_test_credential` | Tests a credential by ID using the stored credential data. |
> | `n8n_test_log_streaming_destination` | Send a test message to the destination to verify it is reachable and configured correctly. |
> | `n8n_test_otel_trace` | Send a single test span to the given OTLP collector and report whether it was accepted. |
> | `n8n_transfer_credential` | Transfer a credential to another project. |
> | `n8n_transfer_workflow` | Transfer a workflow to another project. |
> | `n8n_unarchive_workflow` | Restores an archived workflow. |
> | `n8n_uninstall_package` | Uninstall a community package by name. |
> | `n8n_unpublish_workflow` | Unpublish a workflow. |
> | `n8n_update_credential` | Updates an existing credential. |
> | `n8n_update_credential_type_policy_document` | Preview — breaking changes may still occur without major version bump. |
> | `n8n_update_data_table` | Update a data table's name. |
> | `n8n_update_data_table_column` | Rename and/or reorder a column in a data table. |
> | `n8n_update_data_table_rows` | Update rows matching filter conditions in a data table. |
> | `n8n_update_execution_tags` | Update annotation tags of an execution. |
> | `n8n_update_folder` | Update folder name or parent folder. |
> | `n8n_update_ldap_configuration` | Replace the LDAP configuration with the provided full object (partial updates are not supported). |
> | `n8n_update_log_streaming_destination` | Replace an existing log streaming destination. |
> | `n8n_update_node_type_policy_document` | Preview — breaking changes may still occur without major version bump. |
> | `n8n_update_otel_settings` | Set the OpenTelemetry configuration. |
> | `n8n_update_package` | Update an installed community package to a new version. |
> | `n8n_update_project` | Update a project on your instance. |
> | `n8n_update_promotion_environment` | Updates the name, provider, remote, or settings. |
> | `n8n_update_promotion_provider` | Renames the provider, and replaces its credentials when 'auth' is sent. |
> | `n8n_update_rate_limit_settings` | Set the Public API rate-limit settings. |
> | `n8n_update_role` | Replaces a custom role's display name, description, and scopes. |
> | `n8n_update_role_mapping_rule` | Updates a rule's claim expression, role, and/or project assignments. |
> | `n8n_update_saml_configuration` | Replace the SAML SSO configuration with the provided full object. |
> | `n8n_update_security_policy` | Replace the instance security policy with the provided full object. |
> | `n8n_update_tag` | Update a tag. |
> | `n8n_update_variable` | Update a variable from your instance. |
> | `n8n_update_workflow` | Update a workflow. |
> | `n8n_update_workflow_tags` | Update tags of a workflow. |
> | `n8n_upsert_data_table_row` | Update an existing row, or insert a new one if no row matches the filter conditions. |

## Frequently asked questions

> [accordion] Can an agent respond to n8n webhook events automatically?
>
> No. The catalog entry for `guildai~n8n` lists no webhook events, so the integration does not deliver n8n events to agents. Agents can poll executions and workflows using the retrieval tools.

> [accordion] How does Guild keep the n8n API key secret from agents?
>
> Guild injects the key as the X-N8N-API-KEY header server-side after the credential policy check passes. The key is never passed to agent code.

> [accordion] Can I limit an agent to read-only n8n operations?
>
> Yes. A [credential policy](https://docs.guild.ai/platform/credential-policies.md) with a methods resource constraint set to GET blocks mutating calls. You can also list specific operations like n8n\_get\_workflows or use a pattern such as n8n\_get\_\* in an ALLOW rule and deny everything else.

> [accordion] Can I give one workspace a different n8n account than the rest of my organization?
>
> Yes. Connect a second n8n credential scoped to that workspace from the workspace's Credentials page. Guild resolves workspace-scoped credentials ahead of the account default, so agents in that workspace use the workspace credential. See [Credentials](https://docs.guild.ai/platform/credentials.md) for the full resolution order.

## Put a governed agent on n8n this week

> [card] [Book a demo](https://guild-ai.cal.com/gtm/meeting-with-guild.ai)
>
> See how teams govern agents that use n8n.

> [card] [Talk to sales](https://guild.ai/talk-to-sales)
>
> Get access to Guild, then connect n8n to your first agent.

## Related

**Also runs on Guild:** [Calendly](https://docs.guild.ai/integrations/calendly.md) · [Coda](https://docs.guild.ai/integrations/coda-openapi.md) · [Confluence](https://docs.guild.ai/integrations/confluence.md) · [Fathom](https://docs.guild.ai/integrations/fathom.md)

**Read:** Docs: [Credential policies](https://docs.guild.ai/platform/credential-policies.md) · [Credentials](https://docs.guild.ai/platform/credentials.md) · [Tools in agents](https://docs.guild.ai/sdk/tools.md)
