{
  "name": "Automatically document n8n workflows directly in Notion database",
  "nodes": [
    {
      "id": "2c3549c1-99c1-4255-a02d-2f454e6ced5e",
      "name": "Every 15 minutes",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        560,
        340
      ]
    },
    {
      "id": "3380272e-5631-44aa-b7da-5e23e0966978",
      "name": "Get all workflows with tag",
      "type": "n8n-nodes-base.n8n",
      "position": [
        780,
        340
      ]
    },
    {
      "id": "d702f13e-8e93-4142-87c7-49fbb6031e19",
      "name": "Set fields",
      "type": "n8n-nodes-base.set",
      "position": [
        1000,
        340
      ]
    },
    {
      "id": "4527dc91-bad5-4214-b210-ea8f89504fbf",
      "name": "Get notion page with workflow id",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1220,
        340
      ]
    },
    {
      "id": "ced49644-b18f-4984-8dfd-199d88e3ded7",
      "name": "Map fields",
      "type": "n8n-nodes-base.set",
      "position": [
        1440,
        340
      ]
    },
    {
      "id": "b890dacf-2ac2-4802-b96a-5097119d35ee",
      "name": "if newly added workflow",
      "type": "n8n-nodes-base.if",
      "position": [
        1660,
        340
      ]
    },
    {
      "id": "86edfe55-9a88-49ed-82de-df0c44a65d53",
      "name": "Add to Notion",
      "type": "n8n-nodes-base.notion",
      "position": [
        1920,
        240
      ]
    },
    {
      "id": "9d547270-37dd-41ee-98b7-13001c954ffa",
      "name": "Update in Notion",
      "type": "n8n-nodes-base.notion",
      "position": [
        1920,
        440
      ]
    },
    {
      "id": "9e4d88f6-aff8-48f1-9470-8b18aae7b83a",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        540,
        100
      ],
      "parameters": {
        "width": 445.6145160912248,
        "height": 193.68880276091272,
        "content": "### 👨‍🎤 Setup\n1. Add your n8n api creds\n2. Add your notion creds\n3. create notion database with fields `env id` as `text`, `isActive (dev)` as `boolean`, `URL (dev)` as `url`, `Workflow created at` as"
      }
    },
    {
      "id": "c212f6ec-22e3-41cf-b1a5-03f261715444",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1000,
        540
      ],
      "parameters": {
        "width": 368.0997057335963,
        "height": 80,
        "content": "### 👆 Set instance url instead of `{{ $vars.instance_url }}` (or set the env variable if you have that feature)"
      }
    }
  ],
  "connections": {
    "Map fields": {
      "main": [
        [
          {
            "node": "if newly added workflow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set fields": {
      "main": [
        [
          {
            "node": "Get notion page with workflow id",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Every 15 minutes": {
      "main": [
        [
          {
            "node": "Get all workflows with tag",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "if newly added workflow": {
      "main": [
        [
          {
            "node": "Add to Notion",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update in Notion",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get all workflows with tag": {
      "main": [
        [
          {
            "node": "Set fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get notion page with workflow id": {
      "main": [
        [
          {
            "node": "Map fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}