Démarrer automatiquement les workflows marqués après le déploiement via l'API n8n

Débutant

Ceci est unEngineeringworkflow d'automatisation du domainecontenant 5 nœuds.Utilise principalement des nœuds comme If, N8n, ManualTrigger. Démarrer automatiquement les workflows marqués après le déploiement via l'API n8n

Prérequis
  • Aucun prérequis spécial, prêt à l'emploi après importation

Nœuds utilisés (5)

Catégorie

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
{
  "nodes": [
    {
      "id": "142277c6-73a5-4b99-9e94-72655bbe0ea8",
      "name": "n8n",
      "type": "n8n-nodes-base.n8n",
      "position": [
        -420,
        -120
      ],
      "parameters": {
        "filters": {},
        "requestOptions": {}
      },
      "credentials": {
        "n8nApi": {
          "id": "4v19HuBPwx43oswi",
          "name": "n8n account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "6adf03cb-4194-4616-99d0-6495a660c283",
      "name": "TAG? Démarrage auto",
      "type": "n8n-nodes-base.if",
      "position": [
        -180,
        -120
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "03241d00-9ec1-4215-8036-2d219a7874cb",
              "operator": {
                "type": "array",
                "operation": "contains",
                "rightType": "any"
              },
              "leftValue": "={{ $json.tags.map((obj) => obj.name) }}",
              "rightValue": "Auto start"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "8bd4868a-6dec-48b9-8593-36badf42d7ff",
      "name": "n8n1",
      "type": "n8n-nodes-base.n8n",
      "position": [
        100,
        -120
      ],
      "parameters": {
        "operation": "activate",
        "workflowId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $json.id }}"
        },
        "requestOptions": {}
      },
      "credentials": {
        "n8nApi": {
          "id": "4v19HuBPwx43oswi",
          "name": "n8n account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "c2b7a716-ab5f-4e49-b340-eab6721c52e4",
      "name": "Quand on clique sur 'Tester le workflow'",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -640,
        -120
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "0090a343-73fd-4c53-b80b-27dd2789a849",
      "name": "Note adhésive4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -680,
        -580
      ],
      "parameters": {
        "color": 5,
        "width": 620,
        "height": 420,
        "content": "# Auto Starter\n\nOn importing workflows these will not be auto started, even if the old version was running. To fix this we created this workflow that can be run after n8n starts. It fits in our auto deploy pipeline and modified n8n container that will import workflows, start n8n and start the tagged workflows.\n\n- Start this workflow after n8n starts.\n- It will get all workflows in the running n8n instance.\n- If the files have a tag **'Auto start'** the workflow will be started.\n\n\n**Configuration**\n- You need a a **n8n api key** configured."
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "142277c6-73a5-4b99-9e94-72655bbe0ea8": {
      "main": [
        [
          {
            "node": "6adf03cb-4194-4616-99d0-6495a660c283",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "6adf03cb-4194-4616-99d0-6495a660c283": {
      "main": [
        [
          {
            "node": "8bd4868a-6dec-48b9-8593-36badf42d7ff",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c2b7a716-ab5f-4e49-b340-eab6721c52e4": {
      "main": [
        [
          {
            "node": "142277c6-73a5-4b99-9e94-72655bbe0ea8",
            "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é ?

Débutant - Ingénierie

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é
Débutant
Nombre de nœuds5
Catégorie1
Types de nœuds4
Description de la difficulté

Adapté aux nouveaux utilisateurs de n8n, avec des workflows simples contenant 1-5 nœuds

Auteur
Klaasjan te Voortwis

Klaasjan te Voortwis

@voortwis

Hosting to Backend to Frontend engineer, creating software that works for People, listening to the workforce and management.

Liens externes
Voir sur n8n.io

Partager ce workflow

Catégories

Catégories: 34