{
  "name": "WooCommerce-Bestellung an Slack und Google Sheets",
  "nodes": [
    {
      "parameters": {
        "content": "## WooCommerce-Bestellung an Slack und Google Sheets\n\n**Zweck:** Meldet jede neue WooCommerce-Bestellung im Slack-Kanal und schreibt sie als Zeile in eine Bestell-Tabelle.\n\n**Zugangsdaten (Credentials):**\n- WooCommerce: REST-API-Schlüssel (Consumer Key/Secret, Lese- und Schreibrecht für Webhooks)\n- Slack: OAuth2 oder Bot-Token mit chat:write\n- Google Sheets: Google OAuth2\n\n**Anpassen:**\n- Slack-Kanal in „Slack melden“\n- Tabellen-URL und Blatt „Bestellungen“ (Spalten wie im Node „Bestellung aufbereiten“)\n- Für Shopify den Shopify Trigger (orders/create) einsetzen und die Felder anpassen\n\nValidiert am 09.11.2026 gegen das n8n-Node-Schema, nicht in Produktion ausgeführt.\nQuelle: automationskompass.de/n8n-templates/",
        "height": 520,
        "width": 420,
        "color": 7
      },
      "id": "7e2b05bd-1bcc-464d-b0df-721400bdd89b",
      "name": "Notiz",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -520,
        120
      ]
    },
    {
      "parameters": {
        "event": "order.created"
      },
      "id": "a1d323e3-70e0-41f7-992f-70115fc83f7e",
      "name": "Neue Bestellung",
      "type": "n8n-nodes-base.wooCommerceTrigger",
      "typeVersion": 1,
      "position": [
        0,
        300
      ]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "1ac4cf0f-71ef-41da-a090-fa08cc2cd48d",
              "name": "Bestellnummer",
              "value": "={{ $json.number }}",
              "type": "string"
            },
            {
              "id": "feac0083-236b-43f7-b70a-ccac03d4d295",
              "name": "Datum",
              "value": "={{ $json.date_created }}",
              "type": "string"
            },
            {
              "id": "c89df43b-3101-47fd-b172-0b972899601e",
              "name": "Kunde",
              "value": "={{ $json.billing.first_name }} {{ $json.billing.last_name }}",
              "type": "string"
            },
            {
              "id": "d013c449-9082-443e-962b-d77f6506cebf",
              "name": "E-Mail",
              "value": "={{ $json.billing.email }}",
              "type": "string"
            },
            {
              "id": "494dc598-6d48-463f-a017-ee3faf457a31",
              "name": "Summe",
              "value": "={{ $json.total }} {{ $json.currency }}",
              "type": "string"
            },
            {
              "id": "0aa83051-b7a0-4325-9efa-69f43c749a40",
              "name": "Artikel",
              "value": "={{ $json.line_items.map(i => i.quantity + \"x \" + i.name).join(\", \") }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "f3951637-bba9-4699-b01a-6a9d4996b24e",
      "name": "Bestellung aufbereiten",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        240,
        300
      ]
    },
    {
      "parameters": {
        "resource": "message",
        "operation": "post",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "value": "#bestellungen",
          "mode": "name"
        },
        "text": "=Bestellung {{ $json.Bestellnummer }}: {{ $json.Summe }} von {{ $json.Kunde }} ({{ $json.Artikel }})",
        "otherOptions": {}
      },
      "id": "c59559fc-e4ce-4039-8742-24447d80961e",
      "name": "Slack melden",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2.4,
      "position": [
        480,
        200
      ]
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "https://docs.google.com/spreadsheets/d/DEINE-TABELLEN-ID/edit",
          "mode": "url"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Bestellungen"
        },
        "columns": {
          "mappingMode": "autoMapInputData",
          "value": {},
          "matchingColumns": [],
          "schema": []
        },
        "options": {}
      },
      "id": "fc81def6-4bdb-4ec6-a2b3-806222f0c0be",
      "name": "In Tabelle schreiben",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        480,
        400
      ]
    }
  ],
  "connections": {
    "Neue Bestellung": {
      "main": [
        [
          {
            "node": "Bestellung aufbereiten",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Bestellung aufbereiten": {
      "main": [
        [
          {
            "node": "Slack melden",
            "type": "main",
            "index": 0
          },
          {
            "node": "In Tabelle schreiben",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "settings": {
    "executionOrder": "v1",
    "timezone": "Europe/Berlin"
  },
  "meta": {
    "templateCredsSetupCompleted": false
  }
}
