{
  "nodes": [
    {
      "id": "4e670880-61cf-4870-8d29-525f4e677162",
      "name": "When clicking \"Execute Workflow\"",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -40,
        600
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "cd21e063-59fe-42a5-87c7-b4d63df2e2b7",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        500,
        480
      ],
      "parameters": {
        "width": 682,
        "height": 280,
        "content": "## Save SQL table as a CSV file\n### You can send it via e-mail, upload to the file storage or download on your computer.\n### Just connect one or two extra n8n Nodes here!"
      },
      "typeVersion": 1
    },
    {
      "id": "f960451e-d04e-4023-aed2-e039898b7cab",
      "name": "TableName",
      "type": "n8n-nodes-base.set",
      "position": [
        160,
        600
      ],
      "parameters": {
        "values": {
          "string": [
            {
              "name": "TableName",
              "value": "SalesLT.ProductCategory"
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "e2b4f557-663e-4b1c-b90e-9fde44dcd63a",
      "name": "LoadMSSQLData",
      "type": "n8n-nodes-base.microsoftSql",
      "position": [
        340,
        600
      ],
      "parameters": {
        "query": "=SELECT * FROM {{ $json[\"TableName\"] }}",
        "operation": "executeQuery"
      },
      "typeVersion": 1
    },
    {
      "id": "cec2452f-e3e9-47ad-bcc6-4d411b1cd532",
      "name": "SaveCSV",
      "type": "n8n-nodes-base.spreadsheetFile",
      "position": [
        760,
        600
      ],
      "parameters": {
        "options": {
          "fileName": "={{ $('TableName').first().json.TableName }}.{{ $parameter[\"fileFormat\"] }}"
        },
        "operation": "toFile",
        "fileFormat": "csv"
      },
      "typeVersion": 1
    },
    {
      "id": "b63e46f2-47ad-54c4-a4cb-e4d02f1357ed",
      "name": "Publication · Overview and setup",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -840,
        0
      ],
      "parameters": {
        "content": "# Save SQL table as a CSV file\n\n## Purpose and structure\nThis folder contains the **Save SQL table as a CSV file** workflow. Its executable nodes use `manualTrigger`, `microsoftSql`, `set`, `spreadsheetFile`. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.\n\n## Setup\nImport inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.\n\n## Entry points\nWhen clicking \"Execute Workflow\"\n\n## Verification\nSanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.\n\n## Attribution\nhttps://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Manual/0303_Manual_Stickynote_Export_Triggered.json\nMIT; preserve source notices.",
        "width": 700,
        "height": 800,
        "color": 1
      }
    }
  ],
  "connections": {
    "TableName": {
      "main": [
        [
          {
            "node": "LoadMSSQLData",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "LoadMSSQLData": {
      "main": [
        [
          {
            "node": "SaveCSV",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \"Execute Workflow\"": {
      "main": [
        [
          {
            "node": "TableName",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false
}
