Using the Pay-i n8n Migration Tool

n8n Migration Toolkit

The payi-n8n-toolkit is the fastest path to Pay-i adoption for existing n8n deployments. Two Python scripts scan your n8n instance and apply changes automatically; two shell scripts handle simpler credential redirects.

Scripts are available at https://github.com/Pay-i/utilities/tree/main/n8n-toolkit. Detailed usage is maintained alongside the scripts in that repo.

Prerequisites

  • Python 3.8+ (zero external dependencies)
  • n8n-nodes-payi v0.3.0+ installed in your n8n instance
export N8N_BASE_URL="http://localhost:5678"
export N8N_API_KEY=""
export PAYI_BASE_URL="https://api.yourcompany.pay-i.com"
export PAYI_API_KEY=""

Two Migration Strategies

StrategyWhat HappensWorks For
RedirectRewrites credential Base URL to Pay-i proxy. No workflow changes.OpenAI, Anthropic, Azure OpenAI
ReplaceCreates new workflow copies with Pay-i nodes. Originals preserved with (Pay-i) suffix.Bedrock, Databricks (no URL field to redirect)

Use --strategy both to apply both in a single pass — redirecting what can be redirected and replacing the rest.

Recommended Flow

  1. Backup — Export workflows and note current credential Base URLs.
  2. Auditpython3 audit-configure-payi-proxy.py --out ./audit.json (read-only).
  3. Review — Generate a Markdown report: --from-json ./audit.json --report-format md --out ./audit.md
  4. Dry runpython3 migrate-workflows-to-payi.py --dry-run
  5. Applypython3 migrate-workflows-to-payi.py --strategy both
  6. Validate — Check Pay-i dashboard for requests, enable Debug Logging on a Pay-i node.

Provider Compatibility

ProviderRedirectReplaceNotes
OpenAIYesYes
AnthropicYesYes
Azure OpenAIYesYesEmbeddings nodes detected but not auto-migrated
AWS BedrockNoYesIAM keys have no URL field
DatabricksNoYesRequires v0.3.0+

Shell Script Alternatives

For credential-only redirects without Python:

  • migrate-to-payi.sh — Redirects OpenAI, Anthropic, and Azure OpenAI credentials via curl. Prompts for provider API keys.
  • migrate-openai-to-payi.sh — OpenAI credentials only.

These Scripts do not produce audit reports or replace nodes.

Rolling Back

Redirect: Restore original Base URL on the credential in Settings > Credentials. For Anthropic, also remove the xProxy-api-key header.

Replace: Deactivate the (Pay-i) workflow copies and re-activate the originals. Originals are never deleted.