AutomationFlowsGeneral › Generate Customizable Random Strings with Interactive Forms

Generate Customizable Random Strings with Interactive Forms

ByGer Longstacks @dims3body on n8n.io

input: length of the strings and number of copies output: random strings as specified. randomness determined by Crypto node (generate/base64) Import the workflow into your n8n project Click the Form Trigger to specify the length of the strings and how many copies to generate The…

Event trigger★★★★☆ complexity8 nodesCryptoForm TriggerForm
General Trigger: Event Nodes: 8 Complexity: ★★★★☆ Added:

This workflow corresponds to n8n.io template #4710 — we link there as the canonical source.

This workflow follows the Form → Form Trigger recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "43hulIlfnB1UAXxn",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "random-string-generator",
  "tags": [],
  "nodes": [
    {
      "id": "9025bee8-18c5-4e9f-be2d-50ec77ba1730",
      "name": "Generate a random string",
      "type": "n8n-nodes-base.crypto",
      "position": [
        200,
        -20
      ],
      "parameters": {
        "action": "generate",
        "encodingType": "base64",
        "stringLength": "={{ $('rand_generator_form').item.json.length }}"
      },
      "executeOnce": false,
      "retryOnFail": false,
      "typeVersion": 1,
      "alwaysOutputData": true
    },
    {
      "id": "f82ca3f1-25b8-4d84-8dc9-055364aac3a7",
      "name": "rand_generator_form",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -240,
        -20
      ],
      "parameters": {
        "options": {
          "buttonLabel": "Generate now"
        },
        "formTitle": "rand pass generator",
        "formFields": {
          "values": [
            {
              "fieldType": "number",
              "fieldLabel": "length",
              "placeholder": "16",
              "requiredField": true
            },
            {
              "fieldType": "number",
              "fieldLabel": "copies",
              "placeholder": "5",
              "requiredField": true
            }
          ]
        },
        "responseMode": "lastNode"
      },
      "typeVersion": 2.2
    },
    {
      "id": "042211a5-364c-43d5-a4e1-d3842c3c90d3",
      "name": "Display results",
      "type": "n8n-nodes-base.form",
      "position": [
        1080,
        -20
      ],
      "parameters": {
        "operation": "completion",
        "respondWith": "showText",
        "responseText": "={{ $json.html }}"
      },
      "typeVersion": 1
    },
    {
      "id": "2d8f8a46-8260-4f03-b48a-aff708c17297",
      "name": "format into html",
      "type": "n8n-nodes-base.html",
      "position": [
        860,
        -20
      ],
      "parameters": {
        "html": "<!DOCTYPE html>\n\n<html>\n<head>\n  <meta charset=\"UTF-8\" />\n  <title>random strings</title>\n</head>\n<body>\n  <div class=\"container\">\n  <h2>{{ $('rand_generator_form').item.json.copies }}X {{ $('rand_generator_form').item.json.length }}-char random strings</H2>\n  \n  <ul>{{ $json.concatenated_data }}</ul>\n  </div>\n</body>\n</html>\n\n<style>\ncontainer {\n  background-color: #ffffff;\n  text-align: center;\n  padding: 16px;\n  border-radius: 8px;\n}\n\nh1 {\n  color: #ff6d5a;\n  font-size: 24px;\n  font-weight: bold;\n  padding: 8px;\n}\n\nh2 {\n  color: #909399;\n  font-size: 18px;\n  font-weight: bold;\n  padding: 8px;\n}\n</style>\n\n<script>\nconsole.log(\"Hello World!\");\n</script>"
      },
      "typeVersion": 1.2
    },
    {
      "id": "8a133d07-aad9-4b34-94f2-dfe624602a3d",
      "name": "concatenate items",
      "type": "n8n-nodes-base.summarize",
      "position": [
        640,
        -20
      ],
      "parameters": {
        "options": {},
        "fieldsToSummarize": {
          "values": [
            {
              "field": "data",
              "separateBy": "\n",
              "aggregation": "concatenate"
            }
          ]
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "5373a3a2-fe56-4278-95f5-ddee17ad2e5c",
      "name": "format an item",
      "type": "n8n-nodes-base.set",
      "position": [
        420,
        -20
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "ac0116d7-11bb-4a51-8660-d4c276e52ba3",
              "name": "data",
              "type": "string",
              "value": "=<li>{{ $json.data }}</li>"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "2a9c823c-8fdc-42a3-8787-384373cb695d",
      "name": "duplicates",
      "type": "n8n-nodes-base.set",
      "position": [
        -20,
        -20
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": []
        },
        "duplicateItem": true,
        "duplicateCount": "={{ $json.copies -1}}"
      },
      "typeVersion": 3.4
    },
    {
      "id": "fdcbc663-20b4-4d19-ad61-a28b92f1c137",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -360,
        -180
      ],
      "parameters": {
        "width": 1640,
        "height": 600,
        "content": "## random-string generator\n\n### Summary\nThis n8n workflow generates random strings containing only alphanumeric characters. \nYou can specify the length of the string and how many copies you like to generate.\n\n\n\n\n\n\n\n\n\n\n\n### Nodes used\n* formTrigger\n* set\n* crypto\n* summarize (concatenate)\n* HTML\n* form (form ending)\n\n### Notes\n* Dups operation is used to generate multipe copies as specified.\n* n8n Form apparently can't display HTML properly yet."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "b5495b3b-4ce9-4050-a952-6403342eb547",
  "connections": {
    "duplicates": {
      "main": [
        [
          {
            "node": "Generate a random string",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "format an item": {
      "main": [
        [
          {
            "node": "concatenate items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "format into html": {
      "main": [
        [
          {
            "node": "Display results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "concatenate items": {
      "main": [
        [
          {
            "node": "format into html",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "rand_generator_form": {
      "main": [
        [
          {
            "node": "duplicates",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate a random string": {
      "main": [
        [
          {
            "node": "format an item",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

input: length of the strings and number of copies output: random strings as specified. randomness determined by Crypto node (generate/base64) Import the workflow into your n8n project Click the Form Trigger to specify the length of the strings and how many copies to generate The…

Source: https://n8n.io/workflows/4710/ — original creator credit. Request a take-down →

More General workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

General

Waitlist Form Stored In Googlesheet With Email Verification Step. Uses googleSheets, emailSend, form, stickyNote. Event-driven trigger; 19 nodes.

Google Sheets, Email Send, Form +2
General

This interactive tutorial teaches you how to build in n8n from scratch, using a live walkthrough with real-time examples. Rather than static documentation, this guided workflow explains key n8n concep

Form Trigger, Form
General

This workflow contains community nodes that are only compatible with the self-hosted version of n8n.

Form Trigger, n8n, Form +2
General

Credentials Transfer. Uses form, httpRequest, executeCommand, readWriteFile. Event-driven trigger; 22 nodes.

Form, HTTP Request, Execute Command +2
General

xSend and check TTS (Text-to-speech) voice calls end email verification. Uses stickyNote, httpRequest, formTrigger, emailSend. Event-driven trigger; 19 nodes.

HTTP Request, Form Trigger, Email Send +1