Automated Workflow Activation Post-Deployment - n8n Workflow

Use this powerful n8n workflow to automatically start designated n8n templates after deployment or container restart, ensuring tagged workflows are always active using the n8n API.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

DevOps Engineers: Managing automated n8n deployments (e.g., using Docker or CI/CD) who need consistency in workflow activation. n8n Power Users: Anyone who frequently imports n8n templates or updates their n8n instance and needs certain critical n8n workflow automations to restart automatically.* System Administrators: Individuals responsible for maintaining the operational status of multiple n8n instances and ensuring high uptime for crucial n8n triggers.

Overview

When deploying n8n or restarting the service after importing new n8n templates (especially in containerized environments), workflows that were previously active often default back to an inactive state. Manually starting dozens of n8n workflow nodes is inefficient and error-prone.

This robust n8n workflow solves this operational challenge. By leveraging the n8n API via the dedicated n8n node, the automation quickly scans every existing workflow. It uses a filtering condition to check for the presence of the 'Auto start' tag. Any n8n workflow meeting this condition is instantly activated, ensuring business logic remains functional immediately post-deployment. This is an essential automation for large-scale or frequently updated n8n systems.

How it Works

This automation is typically run manually or linked to a post-deployment script after the n8n service starts. It operates in three distinct phases:


  1. Retrieve All Workflows: The initial Manual Trigger starts the execution. The first n8n node connects to the local n8n API (requires a configured n8n API credential) and retrieves a list of all currently registered n8n workflows and their metadata (including tags and status).

  2. Filter by Tag: The workflow proceeds to the IF n8n node. This node evaluates the metadata for each retrieved workflow. The core condition checks if the array of workflow tags contains the specific string 'Auto start'. Only workflows passing this condition are passed down the 'True' branch.

  3. Activate Workflow: The final n8n node receives the filtered list of workflows. It is configured to use the activate operation. It uses the ID of the filtered n8n workflow ({{ $json.id }}) to instruct the n8n API to start that specific n8n workflow, ensuring the desired n8n triggers are running.

Installation Guide


  1. Import the JSON: Copy the provided n8n workflow JSON data and paste it into your n8n instance by clicking 'New' > 'Import from JSON'.

  2. Configure n8n API Credential: This n8n workflow requires credentials for the n8n node to interact with the API.

Go to 'Credentials' and create a new 'n8n API' credential.
Generate a new API key within your n8n user settings and input it into the credential setup.
* Attach this credential to both n8n nodes in the workflow.

  1. Tag Your Target Workflows: Before running this starter n8n workflow, ensure that every critical n8n workflow or n8n template you wish to auto-start has the tag 'Auto start' applied.

  2. Run: Execute the workflow manually via the 'Test workflow' button after a deployment cycle is complete.

Node Details

This n8n template relies heavily on the internal n8n node to manage the automation platform itself:

When clicking ‘Test workflow’ (Manual Trigger): The starting point for this specific n8n workflow. It is designed to be executed on demand, typically after an environment setup.

n8n (n8n Node - Get All):
Function: Retrieves a comprehensive list of all installed n8n workflow items, along with their associated metadata (IDs, tags, status).
Key Configuration: Uses the configured n8n API credential to perform the internal GET request.

TAG? Auto start (IF Node):
Function: Filters the stream of workflows to isolate only those designated for automatic startup.
Key Configuration: Condition checks if tags.map((obj) => obj.name) contains the string 'Auto start'.

n8n1 (n8n Node - Activate):
Function: Activates the filtered n8n workflow using its specific ID.
Key Configuration: Operation set to activate. Workflow ID parameter dynamically pulls the ID from the incoming JSON item: {{ $json.id }}.

Related n8n Workflows

Free

Nodes: 4 Nodes
Updated: December 26 2025
View all
Created by
Klaasjan te Voortwis
Klaasjan te Voortwis

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

Featured*