N8N Credential Api Creator

Create n8n credentials programmatically via REST API, including a workaround for the cryptic allOf validation bug that blocks OAuth2 credential creation.

Install
cmdop skills install agensi-n8n-credential-api-creator

N8N Credential API Creator is a skill that automates the creation of n8n credentials through the n8n REST API, removing the need to configure credentials manually in the n8n UI. This is particularly useful in CI/CD pipelines, multi-tenant n8n deployments, and infrastructure-as-code workflows where manual UI interaction is not viable.

The skill addresses a specific and documented issue in the n8n API: the allOf schema validation bug, which causes cryptic errors when creating OAuth2 credentials. n8n’s OpenAPI validation requires hidden fields such as serverUrl to be present even when empty, and standard API calls omitting these fields will fail. This skill embeds the correct request structure to satisfy those requirements.

Supported credential types include OAuth2 variants for Google Sheets, Google Drive, and Gmail, as well as HTTP Header Auth and Basic Auth. The skill provides implementation patterns in both shell (cURL) and Python, so it can be integrated into existing automation scripts or deployment tooling without introducing new dependencies.

On successful execution, the API calls return n8n’s standard credential metadata: the credential ID, creation and update timestamps, and credential type. The skill is intended for developers who need repeatable, scriptable credential provisioning rather than one-off manual setup. It is not a general-purpose n8n workflow management tool and does not cover workflow creation, execution, or credential deletion.

Use cases

  • Provision n8n OAuth2 credentials for Google Sheets, Drive, or Gmail in a CI/CD pipeline without touching the UI
  • Automate credential setup across multiple n8n instances in a multi-tenant environment
  • Create HTTP Header Auth or Basic Auth credentials as part of an infrastructure-as-code deployment script
  • Bypass the allOf schema validation bug when scripting OAuth2 credential creation via the n8n REST API
  • Migrate credentials between n8n environments using Python or cURL scripts
  • Generate reproducible credential provisioning scripts for team onboarding or environment replication

When to use it

  • Deploying n8n credentials automatically in CI/CD or IaC pipelines
  • Managing credentials across multiple n8n instances without manual UI steps
  • Scripting OAuth2 credential creation where the allOf validation bug would otherwise cause failures
  • Building repeatable environment setup scripts using cURL or Python

When not to use it

  • Managing n8n workflows, executions, or nodes — this skill only covers credential creation
  • Deleting or updating existing credentials
  • Environments that do not use the n8n REST API
  • Use cases requiring credential types outside OAuth2, HTTP Header Auth, or Basic Auth