Complete Guide to Setting Up and Generating TOTP Codes in n8n 🔐

For n8n, this automated workflow generates TOTP codes on demand, enhancing security by providing time-based one-time passwords. Triggered manually, it simplifies the process of accessing secure systems, ensuring quick and reliable authentication.

7/4/2025
2 nodes
Simple
manualsimpletotp
Categories:
Manual TriggeredSimple Workflow
Integrations:
Totp

Target Audience

This workflow is ideal for:
- Developers looking to implement TOTP (Time-based One-Time Password) for secure authentication in their applications.
- IT Administrators who need to set up two-factor authentication for internal tools and services.
- Security Enthusiasts interested in enhancing security measures for personal projects or small businesses.
- Technical Users who are familiar with n8n and want to automate the generation of TOTP codes.

Problem Solved

This workflow addresses the need for generating TOTP codes, which are essential for two-factor authentication (2FA). By automating the process, users can effortlessly obtain secure codes without manual entry, reducing the risk of human error and increasing overall security for sensitive applications.

Workflow Steps

  • Manual Trigger: The workflow starts when the user clicks the ‘Test workflow’ button. This initiates the process.
    2. TOTP Node: The TOTP node generates a time-based one-time password using the specified credentials. This ensures that the code is valid for a limited time, enhancing security.
    3. Output: The generated TOTP code can be used for authentication purposes, allowing users to log in securely to their accounts or applications.
  • Customization Guide

    Users can customize this workflow by:
    - Changing Credentials: Update the TOTP credentials in the TOTP node to connect to a different account or service.
    - Modifying Node Parameters: Adjust any parameters within the TOTP node to fit specific requirements, such as changing the time step or the number of digits in the generated code.
    - Adding Additional Nodes: Integrate other nodes to expand the workflow, such as sending the generated TOTP code via email or logging it for auditing purposes.