Generate TOTP Codes Securely with n8n Automation

This unique n8n workflow automates the generation of Time-Based One-Time Passwords (TOTP), simplifying secure authentication for users. It saves manual effort and reduces errors by generating TOTP codes instantly upon a trigger.
manualTrigger
totp
Workflow Identifier: 2343
NODES in Use: Manual Trigger, TOTP

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

What this workflow does

This workflow generates a new Time-Based One-Time Password (TOTP) code automatically when triggered.

This stops manual copying of codes and gives a fresh code fast for secure logins.

It uses a saved TOTP secret key to make each code valid and accurate to your timezone.

You get the generated TOTP code immediately after running the workflow.


Who should use this workflow

This is for anyone who needs one-time 2FA codes often and finds it slow or error-prone to get them by hand.

It helps IT staff, admins, or users managing many 2FA accounts to save time and avoid login mistakes.


Tools and services used

  • n8n Automation Platform: To build and run the workflow.
  • TOTP node: Generates the one-time password codes inside n8n.
  • Manual Trigger node: Lets you start the code generation anytime you want.
  • n8n credentials system: Saves the secret key securely for the TOTP node.

Beginner step-by-step: How to use this workflow in n8n production

Step 1: Download and import the workflow

  1. Click the Download button on this page to get the workflow file.
  2. Open your n8n editor.
  3. Use the Import from File feature in n8n to load the downloaded workflow.

Step 2: Configure credentials and settings

  1. Go to the TOTP node in the workflow.
  2. Set or add TOTP credentials using your secret key.
  3. Update any IDs, emails, or channels if the workflow sends notifications (not in this basic example).
  4. Check your workflow timezone matches your local time.

Step 3: Test the workflow

  1. Click the run button on the Manual Trigger node.
  2. Look at the output panel to see the fresh TOTP code.

Step 4: Activate for production

  1. Switch the workflow to active mode so it can run on demand.
  2. Use the manual trigger button whenever you need a new code.

You can also add extra nodes later to send codes by email or chat, or trigger automatically on set times.

For private control, consider running self-host n8n.


Inputs, Processing, Output

  • Input: Manual trigger runs when you click a button.
  • Processing: The TOTP node uses stored secret keys and timezone to make a current valid code.
  • Output: Shows the fresh TOTP code immediately for secure login use.

Customization ideas

  • Use different TOTP credentials for multiple accounts.
  • Replace manual trigger with a Cron node to generate codes on a schedule.
  • Add a Code node after TOTP to format code or add messages.
  • Add email or chat nodes to send codes automatically.

Troubleshooting common issues

  • Issue: No or wrong TOTP code.
  • Cause: Wrong secret or timezone mismatch.
  • Fix: Check secret key and workflow timezone carefully.
  • Issue: Manual trigger does not start the workflow.
  • Cause: Nodes not connected or workflow inactive.
  • Fix: Connect Manual Trigger node to TOTP node and activate workflow.

Pre-production checklist

  • Make sure TOTP credentials are entered and saved correctly.
  • Test manual trigger to confirm valid TOTP code generation.
  • Verify timezone matches where you use the codes.
  • Backup workflow before changing important parts.

Deployment guide

Turn on the workflow by activating it in the n8n editor.

Now codes can be generated on demand with a click.

For better scale, add steps to send codes by notifications automatically.

Use n8n logs to track code generation and find errors fast.


Summary

✓ Saves time by automating TOTP code creation.

✓ Reduces mistakes from manual code copying and typing.

✓ Generates correct TOTP codes using secure credentials and local time.

✓ Easy to trigger manually or schedule for automatic code delivery.

→ Gives users quick and reliable 2FA codes for secure logins.


Promoted by BULDRR AI

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation Workflows in n8n

A complete beginner guide to building an AI SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free