{
  "id": "0FRA8csVHSMg0OikWjoJV",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Track and sync n8n workflow status in Notion",
  "tags": [
    {
      "id": "jWgFUu3hUGVZ3MPh",
      "name": "Notion",
      "createdAt": "2026-01-24T02:36:34.692Z",
      "updatedAt": "2026-01-24T02:36:48.999Z"
    }
  ],
  "nodes": [
    {
      "id": "26366a13-06a7-4ad3-a8ab-61c355e53661",
      "name": "Find Workflow in Notion (by ID)",
      "type": "n8n-nodes-base.notion",
      "position": [
        544,
        -880
      ],
      "parameters": {
        "filters": {
          "conditions": [
            {
              "key": "ID|rich_text",
              "condition": "equals",
              "richTextValue": "={{ $json.ID }}"
            }
          ]
        },
        "options": {},
        "resource": "databasePage",
        "operation": "getAll",
        "returnAll": true,
        "databaseId": {
          "__rl": true,
          "mode": "list",
          "value": "2848fa9d-4c4d-80cb-b593-cd9595a93464",
          "cachedResultUrl": "https://www.notion.so/2848fa9d4c4d80cbb593cd9595a93464",
          "cachedResultName": "Workflows"
        },
        "filterType": "manual"
      },
      "credentials": {
        "notionApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.2,
      "alwaysOutputData": true
    },
    {
      "id": "697cab53-0d8c-4478-b52c-2ac95f3b199d",
      "name": "Fetch All n8n Workflows",
      "type": "n8n-nodes-base.n8n",
      "position": [
        -400,
        -896
      ],
      "parameters": {
        "filters": {},
        "requestOptions": {}
      },
      "credentials": {
        "n8nApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "cfb5b2be-f11a-4d05-9e19-f610d60a0b9e",
      "name": "Daily Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -608,
        -896
      ],
      "parameters": {
        "rule": {
          "interval": [
            {}
          ]
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "ae0c9d7a-b34f-42f9-b41a-64bfc3e52c2e",
      "name": "Iterate Workflows",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -192,
        -896
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "904837ed-0440-4529-a75c-3a90b5f15e72",
      "name": "Map Workflow Metadata",
      "type": "n8n-nodes-base.set",
      "position": [
        64,
        -880
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "9d9e113c-f7b4-4401-88c9-843e39713431",
              "name": "Workflow Name",
              "type": "string",
              "value": "={{ $json.name }}"
            },
            {
              "id": "16b73feb-4314-4a30-b3bf-82476494ce82",
              "name": "Status",
              "type": "boolean",
              "value": "={{ $json.active }}"
            },
            {
              "id": "79b249fd-581f-45af-8745-4d79e4ea3a70",
              "name": "ID",
              "type": "string",
              "value": "={{ $json.id }}"
            },
            {
              "id": "6c37cf8e-66cf-40f2-a394-083577747b17",
              "name": "Created At",
              "type": "string",
              "value": "={{ $json.createdAt }}"
            },
            {
              "id": "d0301620-89b3-47cd-8d9d-852f612f81ca",
              "name": "Updated At",
              "type": "string",
              "value": "={{ $json.updatedAt }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "9bb75c03-a056-44c4-a7fe-21a5af613982",
      "name": "Normalize Workflow Status",
      "type": "n8n-nodes-base.code",
      "position": [
        304,
        -880
      ],
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "const status = $json.Status;\n\nconst isActive =\n  status === true ||\n  status === \"true\" ||\n  status === 1 ||\n  status === \"1\";\n\nreturn {\n  ...$json,\n  Status: isActive ? \"Active\" : \"Deactivated\"\n};\n"
      },
      "typeVersion": 2
    },
    {
      "id": "fb0e2c22-31dc-4d5d-906f-c5f5936cca55",
      "name": "Workflow Exists ?",
      "type": "n8n-nodes-base.if",
      "position": [
        784,
        -880
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "88e5bf62-4a2b-4bb8-8a13-499501180032",
              "operator": {
                "type": "string",
                "operation": "exists",
                "singleValue": true
              },
              "leftValue": "={{ $json.id }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "08aee4c1-0001-4a9e-82ca-c4de4b2771ff",
      "name": "Update Workflow Page",
      "type": "n8n-nodes-base.notion",
      "position": [
        1104,
        -864
      ],
      "parameters": {
        "pageId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $json.id }}"
        },
        "options": {},
        "resource": "databasePage",
        "operation": "update",
        "propertiesUi": {
          "propertyValues": [
            {
              "key": "Status|status",
              "statusValue": "={{ $('Normalize Workflow Status').item.json.Status }}"
            },
            {
              "key": "Name|title",
              "title": "={{ $('Normalize Workflow Status').item.json['Workflow Name'] }}"
            },
            {
              "key": "Created|date",
              "date": "={{ $('Normalize Workflow Status').item.json['Created At'] }}"
            },
            {
              "key": "Edited|date",
              "date": "={{ $('Normalize Workflow Status').item.json['Updated At'] }}"
            }
          ]
        }
      },
      "credentials": {
        "notionApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "a3028b87-cc34-4678-a536-2fdbebb58c3a",
      "name": "Create Workflow Page",
      "type": "n8n-nodes-base.notion",
      "position": [
        1120,
        -640
      ],
      "parameters": {
        "title": "={{ $('Normalize Workflow Status').item.json['Workflow Name'] }}",
        "options": {
          "icon": "\u2699\ufe0f"
        },
        "resource": "databasePage",
        "databaseId": {
          "__rl": true,
          "mode": "list",
          "value": "2848fa9d-4c4d-80cb-b593-cd9595a93464",
          "cachedResultUrl": "https://www.notion.so/2848fa9d4c4d80cbb593cd9595a93464",
          "cachedResultName": "Workflows"
        },
        "propertiesUi": {
          "propertyValues": [
            {
              "key": "Status|status",
              "statusValue": "={{ $('Normalize Workflow Status').item.json.Status }}"
            },
            {
              "key": "ID|rich_text",
              "textContent": "={{ $('Normalize Workflow Status').item.json.ID }}"
            },
            {
              "key": "Created|date",
              "date": "={{ $('Normalize Workflow Status').item.json['Created At'] }}"
            },
            {
              "key": "Edited|date",
              "date": "={{ $('Normalize Workflow Status').item.json['Updated At'] }}"
            }
          ]
        }
      },
      "credentials": {
        "notionApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "6de9a9b5-de76-455a-bb01-26cdb2e2d857",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1264,
        -1168
      ],
      "parameters": {
        "width": 592,
        "height": 640,
        "content": "## Workflow Overview\n\nThis workflow creates a centralized inventory of all n8n workflows in Notion.\n\nIt runs on a daily schedule and syncs workflow metadata from n8n\ninto a Notion database, allowing you to track workflow status,\ncreation date, and last modification date in one place.\n\n### How it works\n\u2022 Fetches all workflows from the n8n instance\n\u2022 Processes workflows one by one\n\u2022 Normalizes workflow status (Active / Deactivated)\n\u2022 Checks if the workflow already exists in Notion\n\u2022 Creates or updates Notion pages accordingly\n\n### Setup steps\n1. Connect your n8n API credentials\n2. Connect your Notion account\n3. Prepare your Notion database\nYour database must include:\n\u2022 Name (title)\n\u2022 ID (text)\n\u2022 Status (status) with these options : ( Active , Deactivated )\n\u2022 Created (date)\n\u2022 Edited (date)\n4. Activate the workflow\n5. Let it run on the daily schedule\n\nThis workflow is read-only and does not manage or modify n8n workflows.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "9069295c-0927-401b-9197-fb1d269da52d",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        976,
        -1136
      ],
      "parameters": {
        "width": 368,
        "height": 688,
        "content": "## \ud83d\udd04 Sync Strategy\nThe workflow uses the n8n Workflow ID\nas the unique identifier.\n\nLogic:\n\u2022 If the workflow ID exists in Notion \u2192 Update page\n\u2022 If it does not exist \u2192 Create new page\n\nThis prevents duplicate entries\nand keeps the database in sync.\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "9ea84d15-1bc6-40c3-8e31-c031a5a9465a",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1264,
        -512
      ],
      "parameters": {
        "color": 7,
        "width": 592,
        "height": 176,
        "content": "## \ud83d\udc4b Need help with n8n automations?\n\n## \ud83c\udf10 https://abdallahhussein.com\n## Automation & Workflow Consulting"
      },
      "typeVersion": 1
    },
    {
      "id": "14f03b5a-09a5-409b-b332-f3446f0dd750",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -464,
        -1072
      ],
      "parameters": {
        "width": 416,
        "height": 336,
        "content": "## Fetch workflows\n\nFetches all workflows from the n8n instance\nand processes them one by one.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "bcfa43b5-fbd3-482e-9200-f8e1859f36e7",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        -1072
      ],
      "parameters": {
        "width": 448,
        "height": 368,
        "content": "## Normalize workflow data\n\nMaps workflow fields and normalizes\nthe workflow status into readable values.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "40931e3e-1faa-4890-93b8-1a7b04a8c9c7",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        496,
        -1072
      ],
      "parameters": {
        "width": 416,
        "height": 368,
        "content": "## Check existing workflows\n\nUses the workflow ID to determine\nwhether the workflow already exists in Notion.\n"
      },
      "typeVersion": 1
    }
  ],
  "active": true,
  "settings": {
    "callerPolicy": "workflowsFromSameOwner",
    "errorWorkflow": "vPTHs8q7dSToQ0VR",
    "timeSavedMode": "fixed",
    "availableInMCP": false,
    "executionOrder": "v1"
  },
  "versionId": "4c4d27d3-40a4-4928-b78f-6803d62085c8",
  "connections": {
    "Daily Trigger": {
      "main": [
        [
          {
            "node": "Fetch All n8n Workflows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Iterate Workflows": {
      "main": [
        [],
        [
          {
            "node": "Map Workflow Metadata",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Workflow Exists ?": {
      "main": [
        [
          {
            "node": "Update Workflow Page",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create Workflow Page",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Workflow Page": {
      "main": [
        [
          {
            "node": "Iterate Workflows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Workflow Page": {
      "main": [
        [
          {
            "node": "Iterate Workflows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Map Workflow Metadata": {
      "main": [
        [
          {
            "node": "Normalize Workflow Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch All n8n Workflows": {
      "main": [
        [
          {
            "node": "Iterate Workflows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize Workflow Status": {
      "main": [
        [
          {
            "node": "Find Workflow in Notion (by ID)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Find Workflow in Notion (by ID)": {
      "main": [
        [
          {
            "node": "Workflow Exists ?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}