Workflow Structure Change Tracker using Google Sheets - n8n Workflow

Automatically monitor changes across your n8n instance. This n8n workflow tracks added or removed n8n nodes and connections, logging detailed history to Google Sheets for auditing and compliance.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

n8n Instance Administrators: To maintain oversight over shared automation environments.
Development Teams: To monitor changes made to critical n8n templates by collaborators.
Compliance & Audit Personnel: To keep a historical log of workflow revisions and deployment status.
n8n Power Users: Anyone running multiple, mission-critical n8n workflows who needs version control tracking.

Overview

Managing numerous n8n workflows, especially in shared or production environments, makes tracking structural changes difficult. This automation solves the problem of manual auditing by providing an automated, historical record of every change made to your n8n templates.

This robust n8n workflow uses self-referencing Execute Workflow nodes and the powerful Compare Datasets n8n node to perform a deep comparison between the current and previous versions of any n8n workflow JSON structure. It detects precisely which n8n node was added, which was removed, and any changes in connections. All these valuable audit details are stored persistently in Google Sheets, ensuring you never miss a modification to a critical n8n automation.

How it Works

This n8n workflow operates in two phases: the scheduled check (main workflow) and the change calculation (sub-workflow).


  1. Scheduled Trigger: The main n8n workflow starts with a Schedule Trigger, running daily or at a defined interval.

  2. Retrieve Workflows: The Get All Workflows n8n node queries the current n8n instance API to fetch the JSON structure of all existing n8n workflows.

  3. Loop and Check: The workflow enters a loop, processing each n8n workflow individually. It first extracts key data using the Get Values n8n node, simplifying the node and connection data for comparison.

  4. Google Sheets Lookup: It attempts to find a matching ID in the designated Google Sheet using the Get Row n8n node. If no entry exists, it means this is a new n8n workflow, and the Create New Entry Google Sheets n8n node establishes a baseline record.

  5. Change Detection: If a previous record exists, an If n8n node checks if the updatedAt timestamp has changed. If it has, the automation proceeds.

  6. Diff Calculation (Sub-Workflow): The Calculate Template Diffs n8n node uses the Execute Workflow function to call itself (the same n8n workflow template), passing the current and previous workflow data as input, triggering the 'diff' logic branch.

  7. Comparison Logic: In the sub-workflow, Compare Datasets n8n node is used twice: once to find differences in n8n nodes (comparing by type and name) and once to find differences in connections. This accurately identifies added and removed n8n node elements and connections.

  8. Report Generation: The changes are aggregated and merged into a structured JSON report detailing additions and removals.

  9. Update Google Sheets: Back in the main flow, if changes are detected by the Has Node or Connection Updates? n8n node, the Update Entry Google Sheets n8n node updates the row, storing the new workflow JSON, the current status, and a comprehensive summary of all modifications (including which specific n8n node or connection was affected).

Installation Guide

To deploy this powerful n8n workflow template, follow these steps:


  1. Import: Copy the provided n8n workflow JSON and paste it into your n8n instance via the 'New' menu -> 'Import from JSON'.

  2. n8n Credentials: Set up credentials for the n8n node (specifically the Get All Workflows node) to allow the workflow to query metadata about other n8n workflows on the instance.

  3. Google Sheets Setup: You will need to create a dedicated Google Sheet with columns matching the data fields required by the Google Sheets n8n node (e.g., id, name, status, last_updated, history, summary, nodes, connections).

  4. Google Sheets Credentials: Update the Google Sheets account credential in the Get Row, Create New Entry, and Update Entry n8n node instances to connect to your sheet.

  5. Configure Document ID: Ensure the Document ID and Sheet Name parameters are correctly set across all Google Sheets n8n node instances to point to your new tracking spreadsheet.

  6. Activate: Ensure the workflow is active so the Schedule Trigger can begin monitoring your n8n workflows.

Node Details

Schedule Trigger: The primary n8n trigger for the main workflow, configured to run the monitoring process periodically.
n8n Node (Get All Workflows): Fetches the current state (JSON) of all n8n workflows in the instance, providing the raw data for comparison.
Split In Batches (Loop Over Items): Essential for iteration, ensuring that the tracking logic is applied to every n8n workflow one by one.
Google Sheets Node (Get Row, Create New Entry, Update Entry): Manages the persistent storage of workflow history. It retrieves the previous state of the n8n workflow and logs the new state and change summary.
If Node (Row Exists?, Has UpdatedAt Changed?): Provides flow control to determine if a workflow is new, or if an existing n8n workflow requires a detailed change analysis.
Execute Workflow (Calculate Template Diffs): This critical n8n node calls the same n8n workflow template recursively, enabling a modular sub-workflow to handle the complex data comparison logic.


  • Compare Datasets Node (Compare Datasets, Compare Datasets1): The core analysis tool. This n8n node compares the flattened list of old n8n nodes/connections against the new list, reporting which items were added, removed, or changed. This is key to making this n8n workflow powerful.

Related n8n Workflows

Free

Nodes: 15 Nodes
Updated: December 26 2025
View all
Created by
Jimleuk
Jimleuk

Freelance consultant based in the UK specialising in AI-powered automations. I work with select clients tackling their most challenging projects. For business enquiries, send me an email at [email protected] LinkedIn: https://www.linkedin.com/in/jimleuk/ X/Twitter: https://x.com/jimle_uk

Featured*