{
  "name": "01 - Data Flow and Expressions",
  "nodes": [
    {
      "parameters": {
        "content": "## 01 Data Flow and Expressions\n1. Click Execute workflow\n2. Open each node and see INPUT vs OUTPUT\n3. Note: 3 items go in, the Set node runs once PER item\n4. Read every expression in Expressions Demo",
        "height": 220,
        "width": 420
      },
      "id": "01000000-0000-4000-8000-000000000000",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [-60, -280]
    },
    {
      "parameters": {},
      "id": "01000000-0000-4000-8000-000000000001",
      "name": "Start",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [0, 0]
    },
    {
      "parameters": {
        "jsCode": "// Returns 3 items. Every next node runs once per item.\nreturn [\n  { json: { user: 'Asha', chatInput: 'create a Jira ticket with VWO-123' } },\n  { json: { user: 'Ravi', chatInput: 'bug in login, see vwo-45' } },\n  { json: { user: 'Meena', chatInput: 'no key in this message' } }\n];"
      },
      "id": "01000000-0000-4000-8000-000000000002",
      "name": "Sample Data",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [220, 0]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "01a00000-0000-4000-8000-000000000001",
              "name": "issueKey",
              "value": "={{ ($json.chatInput.toUpperCase().match(/[A-Z][A-Z0-9]+-\\d+/) || [''])[0] }}",
              "type": "string"
            },
            {
              "id": "01a00000-0000-4000-8000-000000000002",
              "name": "greeting",
              "value": "=Hi {{ $json.user }}",
              "type": "string"
            },
            {
              "id": "01a00000-0000-4000-8000-000000000003",
              "name": "firstUserFromEarlierNode",
              "value": "={{ $('Sample Data').first().json.user }}",
              "type": "string"
            },
            {
              "id": "01a00000-0000-4000-8000-000000000004",
              "name": "messageLength",
              "value": "={{ $json.chatInput.length }}",
              "type": "number"
            },
            {
              "id": "01a00000-0000-4000-8000-000000000005",
              "name": "processedAt",
              "value": "={{ $now.toFormat('yyyy-MM-dd HH:mm') }}",
              "type": "string"
            }
          ]
        },
        "includeOtherFields": true,
        "options": {}
      },
      "id": "01000000-0000-4000-8000-000000000003",
      "name": "Expressions Demo",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [440, 0]
    }
  ],
  "connections": {
    "Start": { "main": [[{ "node": "Sample Data", "type": "main", "index": 0 }]] },
    "Sample Data": { "main": [[{ "node": "Expressions Demo", "type": "main", "index": 0 }]] }
  },
  "pinData": {},
  "settings": { "executionOrder": "v1" },
  "active": false
}
