ランダム文字列ジェネレーター

中級

これはEngineering, Building Blocks分野の自動化ワークフローで、8個のノードを含みます。主にSet, Form, Html, Crypto, Summarizeなどのノードを使用。 インタラクティブフォームを使ってカスタマイズ可能なランダム文字列を生成する

前提条件
  • 特別な前提条件なし、インポートしてすぐに使用可能
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
  "id": "43hulIlfnB1UAXxn",
  "meta": {
    "instanceId": "135b9ed6d0f8a3f531d9011b0173000ad0dac1ffc90258e867f38c270f30c9dc",
    "templateCredsSetupCompleted": true
  },
  "name": "random-string-generator",
  "tags": [],
  "nodes": [
    {
      "id": "9025bee8-18c5-4e9f-be2d-50ec77ba1730",
      "name": "ランダム文字列を生成",
      "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
      ],
      "webhookId": "7e236f55-0d8a-4f7f-b4a2-ac0ae7db691d",
      "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": "結果を表示",
      "type": "n8n-nodes-base.form",
      "position": [
        1080,
        -20
      ],
      "webhookId": "0bfef085-f443-41ff-84da-811f21e7200e",
      "parameters": {
        "operation": "completion",
        "respondWith": "showText",
        "responseText": "={{ $json.html }}"
      },
      "typeVersion": 1
    },
    {
      "id": "2d8f8a46-8260-4f03-b48a-aff708c17297",
      "name": "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": "アイテムを連結",
      "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": "アイテムをフォーマット",
      "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": "付箋メモ",
      "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,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "b5495b3b-4ce9-4050-a952-6403342eb547",
  "connections": {
    "2a9c823c-8fdc-42a3-8787-384373cb695d": {
      "main": [
        [
          {
            "node": "9025bee8-18c5-4e9f-be2d-50ec77ba1730",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "5373a3a2-fe56-4278-95f5-ddee17ad2e5c": {
      "main": [
        [
          {
            "node": "8a133d07-aad9-4b34-94f2-dfe624602a3d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "2d8f8a46-8260-4f03-b48a-aff708c17297": {
      "main": [
        [
          {
            "node": "042211a5-364c-43d5-a4e1-d3842c3c90d3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "8a133d07-aad9-4b34-94f2-dfe624602a3d": {
      "main": [
        [
          {
            "node": "2d8f8a46-8260-4f03-b48a-aff708c17297",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "f82ca3f1-25b8-4d84-8dc9-055364aac3a7": {
      "main": [
        [
          {
            "node": "2a9c823c-8fdc-42a3-8787-384373cb695d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "9025bee8-18c5-4e9f-be2d-50ec77ba1730": {
      "main": [
        [
          {
            "node": "5373a3a2-fe56-4278-95f5-ddee17ad2e5c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
よくある質問

このワークフローの使い方は?

上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。

このワークフローはどんな場面に適していますか?

中級 - エンジニアリング, ビルディングブロック

有料ですか?

このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。

ワークフロー情報
難易度
中級
ノード数8
カテゴリー2
ノードタイプ7
難易度説明

経験者向け、6-15ノードの中程度の複雑さのワークフロー

作成者
Ger Longstacks

Ger Longstacks

@dims3body

DevOps expert passionate with automation, be it infrastructure provisioning, cloud operation, or workflow.

外部リンク
n8n.ioで表示

このワークフローを共有

カテゴリー

カテゴリー: 34