TOTP VALIDATION (WITHOUT CREATING CREDENTIAL)

TOTP VALIDATION (WITHOUT CREATING CREDENTIAL)

Manual
Medium
5
Nodes
Manual
Trigger
Medium
Complexity
7/22/2025
Added

Workflow Overview

Total Nodes
5
Node Types
5

Node Types

manual Trigger
When clicking ‘Test workflow’
1 node
code
TOTP VALIDATION
1 node
if
IF CODE IS VALID
1 node
sticky Note
Sticky Note
1 node
set
EXAMPLE FIELDS
1 node

Workflow JSON

5.49 KB
{
  "name": "TOTP VALIDATION (WITHOUT CREATING CREDENTIAL)",
  "nodes": [
    {
      "id": "56f102c4-5b84-4e30-955c-0ea1221c328f",
      "name": "When clicking ‘Test workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        480,
        680
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "4f562819-ee42-42ad-b821-aff2cbebbc0f",
      "name": "TOTP VALIDATION",
      "type": "n8n-nodes-base.code",
      "position": [
        920,
        680
      ],
      "parameters": {
        "language": "python",
        "pythonCode": "import hmac\nimport hashlib\nimport time\nimport base64\n\ndef base32_decode(key):\n    \"\"\"Decodes a base32 key into bytes\"\"\"\n    key += '=' * (-len(key) % 8)  # Add necessary '=' for valid length\n    return base64.b32decode(key.upper(), casefold=True)\n\ndef generate_totp(secret, interval=30, digits=6):\n    \"\"\"Generates a TOTP code based on a secret key\"\"\"\n    interval_count = int(time.time...

Showing first 1000 characters. Click "Expand" to view the full JSON.