Block 1 - When clicking ‘Test workflow’
- Type / Role
- n8n-nodes-base.manualTrigger - manualTrigger
- Config choices
- Version 1
This workflow is provided as-is. Please review and test before using in production.
TOTP Validation with Function Node This template allows you to verify if a 6 digit TOTP code is valid using the corresponding TOTP secret. It can be used in an authentication system. The inputs nee...
n8n-nodes-base.manualtrigger, n8n-nodes-base.code, n8n-nodes-base.if, n8n-nodes-base.stickynote, n8n-nodes-base.set
This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Bazhard.
Original n8n.io sourceThis template allows you to verify if a 6-digit TOTP code is valid using the corresponding TOTP secret. It can be used in an authentication system. The inputs need to be:
++Important:++ The 6-digit code must be in text format. If the code starts with zeros and is treated as a number, it could cause validation issues.
The function node will generate a 6-digit code from the TOTP secret, then compare it with the provided code. If they match, it will return 1 otherwise, it will return 0.
You only need the ==TOTP VALIDATION== node.
==You will need to modify lines 39 and 40== of the node with the correct values for your specific context.
You can define a sample secret and code in the EXAMPLE FIELDS node of the template, then click "Test Workflow".
If the code is valid for the provided secret, the flow will proceed to the true branch of the IF CODE IS VALID node. Otherwise, it will go to the false branch.
This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.
| Workflow | Validate TOTP token (without creating a credential) |
|---|---|
| Complexity | intermediate |
| Nodes | 5 |
| Categories | SecOps |
| Author | Bazhard |
| Published | 14 Aug 2024 |
Use the JSON export at /data/workflows/2379/2379.json as the source template for this automation.
Open n8n, import the downloaded JSON, and review each node before activating the workflow.
Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.
Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.
Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.
Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.
Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.
TOTP Validation with Function Node This template allows you to verify if a 6 digit TOTP code is valid using the corresponding TOTP secret. It can be used in an authentication system. The inputs nee...
Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.
Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your SecOps use case.