AutomationFlowsGeneral › Auto-start Tagged Workflows Using N8n API After Deployment

Auto-start Tagged Workflows Using N8n API After Deployment

ByKlaasjan te Voortwis @voortwis on n8n.io

Auto Starter

Event trigger★★☆☆☆ complexity5 nodesn8n
General Trigger: Event Nodes: 5 Complexity: ★★☆☆☆ Added:

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

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
{
  "nodes": [
    {
      "id": "142277c6-73a5-4b99-9e94-72655bbe0ea8",
      "name": "n8n",
      "type": "n8n-nodes-base.n8n",
      "position": [
        -420,
        -120
      ],
      "parameters": {
        "filters": {},
        "requestOptions": {}
      },
      "credentials": {
        "n8nApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "6adf03cb-4194-4616-99d0-6495a660c283",
      "name": "TAG? Auto start",
      "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": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "c2b7a716-ab5f-4e49-b340-eab6721c52e4",
      "name": "When clicking \u2018Test workflow\u2019",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -640,
        -120
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "0090a343-73fd-4c53-b80b-27dd2789a849",
      "name": "Sticky Note4",
      "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": {
    "n8n": {
      "main": [
        [
          {
            "node": "TAG? Auto start",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "TAG? Auto start": {
      "main": [
        [
          {
            "node": "n8n1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \u2018Test workflow\u2019": {
      "main": [
        [
          {
            "node": "n8n",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

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

About this workflow

Auto Starter

Source: https://n8n.io/workflows/3996/ — 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

If you have multiple users managing workflows, there may come a time where a user “accidentally” turns off a workflow. Or, if you have workflows that automatically turn off other workflows, that code

n8n
General

Back up n8n workflows to Google Drive automatically This workflow provides a robust solution for backing up your n8n workflows to Google Drive. It is designed to handle backups for multiple n8n instan

Execute Workflow Trigger, n8n, Google Drive
General

This workflow automates the daily backup of all your n8n workflows to a designated folder in Nextcloud. It ensures that you always have the last 7 days of backups available while automatically deletin

n8n, Next Cloud
General

This workflow takes off the task of backing up workflows regularly on Github and uses Google Drive as the main tool to host these.

n8n, Google Drive
General

Convert Docx From Url To Pdf Using Convertapi. Uses manualTrigger, httpRequest, readWriteFile, stickyNote. Event-driven trigger; 6 nodes.

HTTP Request, Read Write File