{
  "name": "Track and sync workflow status in Notion from the n8n API",
  "nodes": [
    {
      "id": "26366a13-06a7-4ad3-a8ab-61c355e53661",
      "name": "Find Workflow in Notion (by ID)",
      "type": "n8n-nodes-base.notion",
      "position": [
        544,
        -880
      ]
    },
    {
      "id": "697cab53-0d8c-4478-b52c-2ac95f3b199d",
      "name": "Fetch All n8n Workflows",
      "type": "n8n-nodes-base.n8n",
      "position": [
        -400,
        -896
      ]
    },
    {
      "id": "cfb5b2be-f11a-4d05-9e19-f610d60a0b9e",
      "name": "Daily Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -608,
        -896
      ]
    },
    {
      "id": "ae0c9d7a-b34f-42f9-b41a-64bfc3e52c2e",
      "name": "Iterate Workflows",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -192,
        -896
      ]
    },
    {
      "id": "904837ed-0440-4529-a75c-3a90b5f15e72",
      "name": "Map Workflow Metadata",
      "type": "n8n-nodes-base.set",
      "position": [
        64,
        -880
      ]
    },
    {
      "id": "9bb75c03-a056-44c4-a7fe-21a5af613982",
      "name": "Normalize Workflow Status",
      "type": "n8n-nodes-base.code",
      "position": [
        304,
        -880
      ]
    },
    {
      "id": "fb0e2c22-31dc-4d5d-906f-c5f5936cca55",
      "name": "Workflow Exists ?",
      "type": "n8n-nodes-base.if",
      "position": [
        784,
        -880
      ]
    },
    {
      "id": "08aee4c1-0001-4a9e-82ca-c4de4b2771ff",
      "name": "Update Workflow Page",
      "type": "n8n-nodes-base.notion",
      "position": [
        1104,
        -864
      ]
    },
    {
      "id": "a3028b87-cc34-4678-a536-2fdbebb58c3a",
      "name": "Create Workflow Page",
      "type": "n8n-nodes-base.notion",
      "position": [
        1120,
        -640
      ]
    },
    {
      "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 y"
      }
    },
    {
      "id": "9069295c-0927-401b-9197-fb1d269da52d",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        976,
        -1136
      ],
      "parameters": {
        "width": 368,
        "height": 688,
        "content": "## 🔄 Sync Strategy\nThe workflow uses the n8n Workflow ID\nas the unique identifier.\n\nLogic:\n• If the workflow ID exists in Notion → Update page\n• If it does not exist → Create new page\n\nThis prevents d"
      }
    },
    {
      "id": "9ea84d15-1bc6-40c3-8e31-c031a5a9465a",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1264,
        -512
      ],
      "parameters": {
        "width": 592,
        "height": 176,
        "content": "## 👋 Need help with n8n automations?\n\n## 🌐 https://abdallahhussein.com\n## Automation & Workflow Consulting"
      }
    },
    {
      "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"
      }
    },
    {
      "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"
      }
    },
    {
      "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"
      }
    }
  ],
  "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
          }
        ]
      ]
    }
  }
}