{
  "nodes": [
    {
      "id": "77258fdc-d5a6-436a-9f62-a27198c6f260",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -416,
        400
      ],
      "parameters": {
        "rule": {
          "interval": [
            {}
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "4fd61bbf-3610-40f2-9382-3f7db4781d5a",
      "name": "When clicking \u2018Execute workflow\u2019",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -416,
        576
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "598ff657-359e-47c3-b129-47bde05253f9",
      "name": "Get All Workflows",
      "type": "n8n-nodes-base.n8n",
      "position": [
        -128,
        400
      ],
      "parameters": {
        "filters": {},
        "requestOptions": {}
      },
      "credentials": {
        "n8nApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "46e7b134-ecbf-4700-aa78-a1df918fbd78",
      "name": "Loop Through Each Workflow",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        96,
        400
      ],
      "parameters": {
        "options": {}
      },
      "executeOnce": false,
      "typeVersion": 3
    },
    {
      "id": "d9d2e331-2711-42a4-8c01-e76a27adfdf5",
      "name": "Extract Workflow Details",
      "type": "n8n-nodes-base.code",
      "position": [
        304,
        496
      ],
      "parameters": {
        "jsCode": "// Loop over input items and add a new field called 'myNewField' to the JSON of each one\nlet info = {\n  name: $input.first().json.name,\n  id: $input.first().json.id,\n  tags: $input.first().json.tags.map(ar => ar.name).join(\"\\n\")\n}\n  \nlet nodeTypes = {}\nfor (const node of $input.first().json.nodes) {\n  nodeTypes[node.type] = 1\n}\nlet nodes = Object.keys(nodeTypes).join(\"\\n\");\nreturn {nodes, info }"
      },
      "typeVersion": 2
    },
    {
      "id": "0b00faee-6d4f-45a1-a80b-a7dfba598410",
      "name": "Add/Update Row in Google Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        512,
        496
      ],
      "parameters": {
        "columns": {
          "value": {
            "id": "={{ $json.info.id }}",
            "link": "=https://n8n.pollup.net/workflow/{{ $json.info.id }}",
            "tags": "={{ $json.info.tags }}",
            "nodes": "={{ $json.nodes }}",
            "title": "={{ $json.info.name }}",
            "Active": "={{ $('Loop Through Each Workflow').item.json.active }}",
            "Archived": "={{ $('Loop Through Each Workflow').item.json.isArchived }}",
            "CreatedAt": "={{ $('Loop Through Each Workflow').item.json.createdAt }}",
            "UpdatedAt": "={{ $('Loop Through Each Workflow').item.json.updatedAt }}"
          },
          "schema": [
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "id",
              "defaultMatch": true,
              "canBeUsedToMatch": true
            },
            {
              "id": "title",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "link",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "link",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "tags",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "tags",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "nodes",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "nodes",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "CreatedAt",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "CreatedAt",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "UpdatedAt",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "UpdatedAt",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Active",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Active",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Archived",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Archived",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1eDe3oYL2WVw3t20xqEc9lLx6BIfATIxtKLike5e5QzE/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1eDe3oYL2WVw3t20xqEc9lLx6BIfATIxtKLike5e5QzE",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1eDe3oYL2WVw3t20xqEc9lLx6BIfATIxtKLike5e5QzE/edit?usp=drivesdk",
          "cachedResultName": "Techical list of n8n workflows"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "0bbf1258-df8b-47cf-abad-b8552bceca64",
      "name": "Pause to Avoid Rate Limits",
      "type": "n8n-nodes-base.wait",
      "position": [
        720,
        496
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "16fe9a20-47d1-4d7a-a258-f5417ba094b2",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -672,
        -96
      ],
      "parameters": {
        "width": 704,
        "height": 208,
        "content": "## Workflow Inventory in Google Sheets\nThis workflow creates a centralized inventory of all your n8n workflows in a Google Sheet.\n\n**Setup Steps:**\n1. **Get All Workflows Node:** Add your n8n API credentials.\n2. **Google Sheet Node:** Add your Google Sheets credentials and enter your Spreadsheet ID and Sheet Name.\n3. **Activate:** Choose either the manual or scheduled trigger and activate the workflow."
      },
      "typeVersion": 1
    },
    {
      "id": "c2d22c7d-87ee-4d30-90e7-c27b1546d034",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -672,
        208
      ],
      "parameters": {
        "color": 7,
        "width": 448,
        "height": 528,
        "content": "## Trigger Choice\nUse one of these triggers to run the workflow.\n\n- **Scheduled Start:** Runs automatically at a set interval.\n- **Manual Start:** Runs only when you click 'Execute Workflow'.\n\nYou can delete the one you don't need."
      },
      "typeVersion": 1
    },
    {
      "id": "74f65a95-8664-4c54-9773-c832aa440cbb",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        528,
        208
      ],
      "parameters": {
        "color": 7,
        "width": 352,
        "height": 192,
        "content": "## Google Sheets Configuration\n**CRITICAL:**\nIn the 'Columns' section, make sure to set `id` as the \"Matching Column\".\n\nThis allows the node to find existing rows and update them instead of creating duplicates.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "2564a727-da3c-4f08-933f-0bb6d99a3f4b",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        240,
        160
      ],
      "parameters": {
        "color": 7,
        "height": 480,
        "content": "## Customization Tip\nWant to track more data?\n\nYou can edit this code to extract additional details from the workflow JSON (e.g., specific node settings, email addresses from triggers, etc.). Just be sure to add a matching column in your Google Sheet!"
      },
      "typeVersion": 1
    },
    {
      "id": "a8f58c9f-88d3-466e-ad24-7a74438dcd9c",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -672,
        752
      ],
      "parameters": {
        "width": 460,
        "height": 196,
        "content": "## Contact me\n- If you need any modification to this workflow\n- if you need some help with this workflow\n- Or if you need any workflow in n8n, Make, or Langchain / Langgraph\n\nWrite to me: [thomas@pollup.net](mailto:thomas@pollup.net)\n"
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Get All Workflows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get All Workflows": {
      "main": [
        [
          {
            "node": "Loop Through Each Workflow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Workflow Details": {
      "main": [
        [
          {
            "node": "Add/Update Row in Google Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Through Each Workflow": {
      "main": [
        [],
        [
          {
            "node": "Extract Workflow Details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Pause to Avoid Rate Limits": {
      "main": [
        [
          {
            "node": "Loop Through Each Workflow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add/Update Row in Google Sheet": {
      "main": [
        [
          {
            "node": "Pause to Avoid Rate Limits",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \u2018Execute workflow\u2019": {
      "main": [
        [
          {
            "node": "Get All Workflows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}