Framework guide
Handle 2FA and OTP codes in n8n automatically
Use an HTTP Request node to fetch the code mid-workflow and pass it to your browser or API step. OTPilot keeps the TOTP seed encrypted on its side; your n8n agent only ever receives the current code, its expiry and the next code.
n8n · json
{
"name": "OTPilot: get 2FA code",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "GET",
"url": "https://otpilot.vibiz.app/api/v1/codes/shopify",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"options": {}
},
"credentials": {
"httpHeaderAuth": { "name": "Authorization", "value": "Bearer otp_live_YOUR_KEY" }
}
}
// Output: {{ $json.code }} — use it in the next node.Why not put the seed in your n8n code?
- · A seed in an env var or prompt can generate codes forever — anyone who reads your logs, traces or repo can log in.
- · With OTPilot the agent holds a revocable, rate-limited key scoped to specific accounts. Revoke it and access ends instantly.
- · Each fetch is logged with the reason the agent gave, and sensitive accounts can require a human tap.
n8n 2FA guides by site
- Amazon 2FA with n8n→
- Amazon Web Services 2FA with n8n→
- Cloudflare 2FA with n8n→
- DigitalOcean 2FA with n8n→
- GitHub 2FA with n8n→
- GitLab 2FA with n8n→
- HubSpot 2FA with n8n→
- Microsoft Azure 2FA with n8n→
- PayPal 2FA with n8n→
- Shopify 2FA with n8n→
- Slack 2FA with n8n→
- Stripe 2FA with n8n→
Try it with your own secret — no signup
Paste a TOTP secret on the home page and get a live code plus a working API call in seconds.