Automatic Documentation Sync to Notion Database - n8n Workflow

Use this reliable n8n workflow to automatically synchronize metadata for tagged n8n templates and workflows directly into a Notion database for centralized management and governance.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Automation Managers: Users needing a centralized, up-to-date inventory of all deployed n8n workflows.

  • System Administrators: Those who require governance and monitoring over active n8n instances.

  • Developers: Teams that need automated documentation of their deployed n8n templates and workflows.

  • n8n Power Users: Anyone running critical n8n automations that need status tracking.

Overview

Managing documentation and tracking the status of numerous deployed n8n workflows can be challenging. This expert n8n workflow solves this by leveraging the internal n8n API to pull metadata (such as name, active status, creation date, and URL) for specific workflows tagged with sync-to-notion. This information is then automatically pushed to a dedicated Notion database.

By using this specialized n8n template, users gain real-time governance, ensuring their Notion documentation always reflects the current state of their automations. If a workflow is new, it creates an entry; if it exists, it updates the status. This powerful n8n node combination ensures data accuracy with minimal manual effort.

How it Works

This n8n workflow operates on a 15-minute scheduled n8n trigger, ensuring frequent synchronization of your documentation.


  1. Scheduled Activation: The n8n trigger initiates the entire process every 15 minutes.

  2. Fetch Workflow Data: An internal n8n node connects via API credentials to query the hosting n8n instance, retrieving all workflows specifically tagged with sync-to-notion. This allows for selective documentation of critical n8n templates.

  3. Prepare Metadata: A subsequent Set n8n node extracts vital details from the retrieved workflow JSON, including the active status, creation/update timestamps, workflow name, and constructs a unique identifier (envId) and the external URL (note: the sticky note highlights the need to configure your instance URL here).

  4. Check Notion Existence: An HTTP Request n8n node queries the configured Notion database, searching for an existing entry matching the newly created envId (the unique workflow ID).

  5. Flow Control: An If n8n node checks the results of the Notion lookup. If no results are returned, it determines this is a newly added n8n workflow.

  6. Create or Update:

If New: The flow proceeds to the Notion n8n node, which creates a brand new page in the database, populating all metadata fields.
If Existing: The flow proceeds to the Notion n8n node configured for 'Update', refreshing key attributes like the active status and the updated timestamp to reflect the current state of the n8n workflow instance.

Installation Guide

To install and utilize this robust n8n workflow, follow these steps:


  1. Import the n8n Template: Copy the provided JSON data and paste it into your n8n canvas using the 'New' -> 'Import from JSON' option.

  2. n8n API Credentials Setup: You must configure the internal 'Get all workflows with tag' n8n node with credentials that have permission to read your n8n instance's workflow data. This is typically an n8n admin account API key.

  3. Notion Database Setup: Create a new Notion database specifically for tracking these workflows. It must contain the following fields exactly as configured in the Notion n8n nodes:

Name (Title)
env id (Text)
URL (dev) (URL)
isActive (dev) (Checkbox)
Workflow created at (Date)
Workflow updated at (Date)
* Error workflow setup (Checkbox)

  1. Notion Credentials: Update the Notion API credentials used in the HTTP Request, Add to Notion, and Update in Notion n8n nodes. Ensure the Integration has access to the database created in step 3.

  2. Configure Instance URL: Review the 'Set fields' n8n node and manually replace the placeholder {{ $vars.instance_url }} with the actual base URL of your n8n instance to ensure the saved URL is correct.

  3. Tag Workflows: Tag any n8n workflow you wish to document with the tag sync-to-notion.

Node Details

Every 15 minutes (Schedule Trigger n8n trigger):
Function: Starts the n8n workflow execution periodically.
Key Configuration: Set to run every 15 minutes.
Get all workflows with tag (n8n node):
Function: Queries the internal n8n API to retrieve JSON data for all active n8n workflows bearing the tag sync-to-notion.
Key Configuration: Filters workflows based on the tags: "sync-to-notion" parameter.
Set fields (Set n8n node):
Function: Prepares and normalizes the incoming workflow data into specific fields (e.g., active, url, envId, name) for easier mapping to Notion fields.
Key Configuration: Constructs the unique envId as internal-{{ $json.id }} and the full workflow URL.
Get notion page with workflow id (HTTP Request n8n node):
Function: Performs a POST query against the Notion API database to determine if a page corresponding to the specific n8n workflow ID already exists.
Key Configuration: Uses the envId property in the JSON query body.
if newly added workflow (If n8n node):
Function: Controls the flow path, checking if the Notion query returned an empty result set (meaning the workflow is new).
Key Configuration: Checks if the array {{ $json.results }} is empty.
Add to Notion (Notion n8n node):
Function: If the workflow is new, this n8n node creates a new database page with all the extracted metadata.
Key Configuration: Operation set to create databasePage using input data for all property values.
Update in Notion (Notion n8n node):
Function: If the workflow already exists, this n8n node updates the relevant fields (like status and update date) on the existing Notion page.
* Key Configuration: Operation set to update, targets the existing pageId, and updates fields like isActive (dev).

Related n8n Workflows

Free

Nodes: 7 Nodes
Updated: December 26 2025
View all
Created by

Team lead @ n8n

Featured*