Générateur de chaînes de caractères aléatoires

Intermédiaire

Ceci est unEngineering, Building Blocksworkflow d'automatisation du domainecontenant 8 nœuds.Utilise principalement des nœuds comme Set, Form, Html, Crypto, Summarize. Générer des chaînes de caractères aléatoires personnalisables via des formulaires interactifs

Prérequis
  • Aucun prérequis spécial, prêt à l'emploi après importation
Aperçu du workflow
Visualisation des connexions entre les nœuds, avec support du zoom et du déplacement
Exporter le workflow
Copiez la configuration JSON suivante dans n8n pour importer et utiliser ce workflow
{
  "id": "43hulIlfnB1UAXxn",
  "meta": {
    "instanceId": "135b9ed6d0f8a3f531d9011b0173000ad0dac1ffc90258e867f38c270f30c9dc",
    "templateCredsSetupCompleted": true
  },
  "name": "random-string-generator",
  "tags": [],
  "nodes": [
    {
      "id": "9025bee8-18c5-4e9f-be2d-50ec77ba1730",
      "name": "Générer une chaîne aléatoire",
      "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": "Afficher les résultats",
      "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": "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": "concaténer les éléments",
      "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": "formater un élément",
      "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,
  "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
          }
        ]
      ]
    }
  }
}
Foire aux questions

Comment utiliser ce workflow ?

Copiez le code de configuration JSON ci-dessus, créez un nouveau workflow dans votre instance n8n et sélectionnez "Importer depuis le JSON", collez la configuration et modifiez les paramètres d'authentification selon vos besoins.

Dans quelles scénarios ce workflow est-il adapté ?

Intermédiaire - Ingénierie, Blocs de construction

Est-ce payant ?

Ce workflow est entièrement gratuit et peut être utilisé directement. Veuillez noter que les services tiers utilisés dans le workflow (comme l'API OpenAI) peuvent nécessiter un paiement de votre part.

Informations sur le workflow
Niveau de difficulté
Intermédiaire
Nombre de nœuds8
Catégorie2
Types de nœuds7
Description de la difficulté

Adapté aux utilisateurs expérimentés, avec des workflows de complexité moyenne contenant 6-15 nœuds

Auteur
Ger Longstacks

Ger Longstacks

@dims3body

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

Liens externes
Voir sur n8n.io

Partager ce workflow

Catégories

Catégories: 34