{
  "name": "Route email actions from Notion with Gmail, Slack, and Jira",
  "nodes": [
    {
      "id": "7ba71607-e9ac-4683-bb26-dc2a5d41385e",
      "name": "Poll Email Intelligence",
      "type": "n8n-nodes-base.notion",
      "position": [
        -704,
        384
      ]
    },
    {
      "id": "a4f10c46-8477-4d70-8e80-c3d263a5e5e1",
      "name": "Extract Email Data",
      "type": "n8n-nodes-base.code",
      "position": [
        -464,
        384
      ]
    },
    {
      "id": "1ee4f539-b4b5-4ae8-87e9-c5e5236d082c",
      "name": "Switch by Status",
      "type": "n8n-nodes-base.switch",
      "position": [
        -208,
        384
      ]
    },
    {
      "id": "9dc43a16-a312-42f1-af19-c33788264b84",
      "name": "Gmail Send Reply",
      "type": "n8n-nodes-base.gmail",
      "position": [
        80,
        80
      ]
    },
    {
      "id": "87bd0854-cac2-45f6-b81c-5333042656e9",
      "name": "Update Status - Responded",
      "type": "n8n-nodes-base.notion",
      "position": [
        368,
        80
      ]
    },
    {
      "id": "641b81b1-56a6-4f81-9c4d-967f2f25e6ca",
      "name": "Gmail Forward",
      "type": "n8n-nodes-base.gmail",
      "position": [
        64,
        272
      ]
    },
    {
      "id": "75fb5e4c-8499-40ab-8762-85be5790221c",
      "name": "Slack DM Delegate",
      "type": "n8n-nodes-base.slack",
      "position": [
        384,
        272
      ]
    },
    {
      "id": "a9e5f12d-1a8e-4f16-a860-645d37554ce3",
      "name": "Update Status - Delegated",
      "type": "n8n-nodes-base.notion",
      "position": [
        592,
        272
      ]
    },
    {
      "id": "41810ba1-f295-4604-84ca-8637e63619e8",
      "name": "Switch by Route Destination",
      "type": "n8n-nodes-base.switch",
      "position": [
        64,
        448
      ]
    },
    {
      "id": "4f27d4c7-986f-4d7f-a5a0-b91ef6395130",
      "name": "Prepare Route Data",
      "type": "n8n-nodes-base.code",
      "position": [
        352,
        464
      ]
    },
    {
      "id": "5c7d3e10-bd4d-4f91-81cd-cfbb43251a33",
      "name": "Create in Signal Stream",
      "type": "n8n-nodes-base.notion",
      "position": [
        592,
        464
      ]
    },
    {
      "id": "77c86b00-18a4-4956-a634-9a53f47ad81d",
      "name": "Update Status - Routed",
      "type": "n8n-nodes-base.notion",
      "position": [
        832,
        464
      ]
    },
    {
      "id": "7063c624-77a6-4620-9ca3-3696c1708d04",
      "name": "Prepare Archive Labels",
      "type": "n8n-nodes-base.code",
      "position": [
        64,
        704
      ]
    },
    {
      "id": "5808aefb-de5b-4138-a2ec-20be8630212e",
      "name": "Update Status - Archived",
      "type": "n8n-nodes-base.notion",
      "position": [
        400,
        704
      ]
    },
    {
      "id": "d38e9a6a-6589-43d3-91b3-2215814453da",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1248,
        -112
      ],
      "parameters": {
        "width": 420,
        "height": 400,
        "content": "## How it works\n\nWhen you set an email's status in Notion (Responded, Delegated, Routed, or Archived), this workflow executes the action: sends the reply, forwards to a delegate, routes to Jira/backlo"
      }
    },
    {
      "id": "b601a2c3-e9af-4bdb-bda6-60b0ba4d7f6f",
      "name": "Sticky Note - Routes",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -800,
        -112
      ],
      "parameters": {
        "width": 1112,
        "height": 984,
        "content": "## Action Router\n\n4-way switch: Responded sends the draft reply via Gmail thread, Delegated forwards + Slack DMs the delegate, Routed creates items in destination DBs, Archived applies Gmail labels."
      }
    },
    {
      "id": "2c4e0b5a-3691-4f1d-8841-7165583508dd",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        320,
        -112
      ],
      "parameters": {
        "width": 768,
        "height": 992,
        "content": "## Closed Loop\n\nAfter each action, updates the Email Intelligence entry in Notion to 'Processed' with a timestamp and reference."
      }
    }
  ],
  "connections": {
    "Gmail Forward": {
      "main": [
        [
          {
            "node": "Slack DM Delegate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gmail Send Reply": {
      "main": [
        [
          {
            "node": "Update Status - Responded",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch by Status": {
      "main": [
        [
          {
            "node": "Gmail Send Reply",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Gmail Forward",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Switch by Route Destination",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Prepare Archive Labels",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Slack DM Delegate": {
      "main": [
        [
          {
            "node": "Update Status - Delegated",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Email Data": {
      "main": [
        [
          {
            "node": "Switch by Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Route Data": {
      "main": [
        [
          {
            "node": "Create in Signal Stream",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Archive Labels": {
      "main": [
        [
          {
            "node": "Update Status - Archived",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create in Signal Stream": {
      "main": [
        [
          {
            "node": "Update Status - Routed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Poll Email Intelligence": {
      "main": [
        [
          {
            "node": "Extract Email Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch by Route Destination": {
      "main": [
        [
          {
            "node": "Prepare Route Data",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Prepare Route Data",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Prepare Route Data",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Prepare Route Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}