TOTP VALIDATION (WITHOUT CREATING CREDENTIAL)
This workflow provides an efficient dynamic one-time password (TOTP) verification solution without the need for additional credentials. By using the TOTP key and verification code input by the user, the system can instantly validate the effectiveness of the code, making it suitable for two-factor authentication and security-related automation processes. This solution reduces integration complexity and security risks while enhancing the convenience and accuracy of verification, making it particularly suitable for developers, operations personnel, and security teams.

Workflow Name
TOTP VALIDATION (WITHOUT CREATING CREDENTIAL)
Key Features and Highlights
This workflow implements dynamic Time-based One-Time Password (TOTP) validation using a Python code node, without the need to create additional credentials. By inputting the user's TOTP secret key and verification code, it instantly determines the validity of the code. It is well-suited for integration into various authentication and two-factor authentication (2FA) systems.
Core Problem Addressed
It solves the challenge of quickly verifying a user-provided 6-digit TOTP code within automated processes, eliminating the dependency on external credential management. This reduces integration complexity and security risks while enhancing the convenience and accuracy of secondary verification.
Use Cases
- Two-factor authentication (2FA) during user login
- Verification of dynamic codes by system administrators or developers within automated workflows
- Security-related automation scenarios requiring embedded TOTP validation logic in workflows
Main Process Steps
- The workflow execution is manually triggered by the user via the “Test workflow” action.
- Example TOTP secret key and verification code are set in the “EXAMPLE FIELDS” node.
- The “TOTP VALIDATION” node runs a Python script that generates and validates the code based on the TOTP algorithm.
- The “IF CODE IS VALID” node evaluates whether the code is correct and branches the subsequent logic accordingly.
- Different flows can be executed based on the validation result (not detailed in the example).
Involved Systems or Services
- Built-in n8n nodes: Manual Trigger, Set, Code, and If nodes
- Pure code implementation of the TOTP algorithm without relying on third-party services or external API calls
Target Users and Value
- Developers and operations personnel: Quickly integrate secure TOTP validation into automated workflows
- Security teams: Build verification mechanisms compliant with two-factor authentication standards
- Product designers: Enhance user account security with a convenient verification experience
- Anyone needing to implement dynamic code validation within n8n workflows
This workflow template provides a concise and practical TOTP validation solution, enabling users to easily implement time-based one-time password verification to safeguard system identity security. It is simple to operate, customizable, and extensible.