{
  "name": "Readable workflow export & deployment pipeline for multi-environment CI/CD",
  "nodes": [
    {
      "id": "84883c25-ad4f-4b18-a227-609815a9024b",
      "name": "Remove root node",
      "type": "n8n-nodes-base.set",
      "position": [
        780,
        -680
      ]
    },
    {
      "id": "de5315d0-447e-4740-966a-f2fa711f54a4",
      "name": "TAG? Auto deploy to dev",
      "type": "n8n-nodes-base.if",
      "position": [
        1060,
        -340
      ]
    },
    {
      "id": "82f0885b-ab23-4472-89d4-0a3c79ec3efb",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1060,
        -780
      ],
      "parameters": {
        "width": 520,
        "height": 280,
        "content": "## export\nadd the data in exports folder with readable names"
      }
    },
    {
      "id": "aa297fef-b961-435d-ba78-05cb73fd03f7",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -140,
        -780
      ],
      "parameters": {
        "width": 380,
        "height": 280,
        "content": "## n8n export workflows\nadd the data in exports folder per workflow"
      }
    },
    {
      "id": "1c3188c5-9913-4c28-ae48-3cb79ae3dabd",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1300,
        -460
      ],
      "parameters": {
        "width": 520,
        "height": 280,
        "content": "## export\nadd files to the import-dev folder if they should auto deploy to dev"
      }
    },
    {
      "id": "78a8be19-93cf-4a36-aaed-70ff29ae5e9e",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1300,
        -140
      ],
      "parameters": {
        "width": 520,
        "height": 280,
        "content": "## export\nadd files to the import-dev folder if they should auto deploy to dev"
      }
    },
    {
      "id": "b7aa0923-340b-4be8-805a-f5f1dbe73af3",
      "name": "TAG? Auto deploy to PROD",
      "type": "n8n-nodes-base.if",
      "position": [
        1060,
        -20
      ]
    },
    {
      "id": "1f8086d4-c318-4eb4-b8ba-8e196bbd944d",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -360,
        -1220
      ],
      "parameters": {
        "width": 620,
        "height": 420,
        "content": "# Export workflows\n\n- All workflows will be stored, first with their ID as name.\n- These files will be processed and stored again with a readbable filename in the format **WorkflowName (ID).json**\n- I"
      }
    },
    {
      "id": "e132b429-ce1e-4dea-bc0d-856e4a547203",
      "name": "Start export workflows",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -300,
        -680
      ]
    },
    {
      "id": "d7f06044-52a4-4a1e-86ba-019b832bcbe8",
      "name": "Create folders and run n8n cli",
      "type": "n8n-nodes-base.executeCommand",
      "position": [
        -100,
        -680
      ]
    },
    {
      "id": "41ffdc1d-59ce-411d-9542-1c5cdcc43e35",
      "name": "load exported workflows",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        360,
        -680
      ]
    },
    {
      "id": "ff01046f-66f5-462f-af84-dc59d00b51d6",
      "name": "parse workflow",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        580,
        -680
      ]
    },
    {
      "id": "920c1ea4-650a-4a37-a907-6e4d9c661b7e",
      "name": "Create JSON  file with readable name",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        1100,
        -680
      ]
    },
    {
      "id": "0ea7c70b-2cdb-4edb-84a1-54742c1e7c5b",
      "name": "Store named workflow",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        1340,
        -680
      ]
    },
    {
      "id": "3989b580-5525-4666-bc17-f40675bc56be",
      "name": "Create JSON  file with readable name (dev)",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        1360,
        -360
      ]
    },
    {
      "id": "dcf2ea35-5214-4328-bced-ba3ee6d9f813",
      "name": "Create JSON  file with readable name (prod)",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        1360,
        -40
      ]
    },
    {
      "id": "fa94f550-6367-4a8b-b55b-bcd217078985",
      "name": "Store named workflow (dev)",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        1580,
        -360
      ]
    },
    {
      "id": "72efde7d-8ac1-41e4-b823-621fd5effebf",
      "name": "Store named workflow (prod)",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        1580,
        -40
      ]
    },
    {
      "id": "1a5ad014-7fc7-41d5-b576-26e65bcf48a5",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -360,
        -320
      ],
      "parameters": {
        "width": 880,
        "height": 460,
        "content": "## Dockerfile\n```\nFROM docker.io/n8nio/n8n:stable\n \n# Some default n8n settings\nENV N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true\nENV N8N_RUNNERS_ENABLED=true\n \n# Add new entrypoint for auto importing cr"
      }
    },
    {
      "id": "e14394da-d144-463e-af5f-fba4e6dffc20",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -360,
        160
      ],
      "parameters": {
        "width": 1400,
        "height": 1000,
        "content": "## docker-files/importing-docker-entrypoint.sh\n```\n#!/bin/sh\n \n# https://github.com/n8n-io/n8n/blob/master/docker/images/n8n\n \n# mount this file in /importing-docker-entrypoint.sh and override the com"
      }
    },
    {
      "id": "dcc9029e-8d83-4e26-a5c5-e55e53248af1",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -360,
        -420
      ],
      "parameters": {
        "width": 880,
        "height": 80,
        "content": "# Example files for us in a delivery pipeline"
      }
    }
  ],
  "connections": {
    "parse workflow": {
      "main": [
        [
          {
            "node": "Remove root node",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Remove root node": {
      "main": [
        [
          {
            "node": "Create JSON  file with readable name",
            "type": "main",
            "index": 0
          },
          {
            "node": "TAG? Auto deploy to dev",
            "type": "main",
            "index": 0
          },
          {
            "node": "TAG? Auto deploy to PROD",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Start export workflows": {
      "main": [
        [
          {
            "node": "Create folders and run n8n cli",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "TAG? Auto deploy to dev": {
      "main": [
        [
          {
            "node": "Create JSON  file with readable name (dev)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "load exported workflows": {
      "main": [
        [
          {
            "node": "parse workflow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "TAG? Auto deploy to PROD": {
      "main": [
        [
          {
            "node": "Create JSON  file with readable name (prod)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create folders and run n8n cli": {
      "main": [
        [
          {
            "node": "load exported workflows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create JSON  file with readable name": {
      "main": [
        [
          {
            "node": "Store named workflow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create JSON  file with readable name (dev)": {
      "main": [
        [
          {
            "node": "Store named workflow (dev)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create JSON  file with readable name (prod)": {
      "main": [
        [
          {
            "node": "Store named workflow (prod)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}