{
  "name": "email_classifier_L2",
  "nodes": [
    {
      "parameters": {
        "pollTimes": {
          "item": [
            {
              "mode": "everyHour"
            }
          ]
        },
        "simple": false,
        "filters": {
          "readStatus": "both",
          "sender": ""
        },
        "options": {}
      },
      "type": "n8n-nodes-base.gmailTrigger",
      "typeVersion": 1.2,
      "position": [
        420,
        160
      ],
      "id": "050cec50-da4f-41c8-a429-3e61389ed55e",
      "name": "Gmail Trigger",
      "credentials": {
        "gmailOAuth2": {
          "id": "1QYU7PMD6HPRubyk",
          "name": "Gmail account"
        }
      }
    },
    {
      "parameters": {
        "inputText": "=email subject: {{ $json.subject }}\nemail contents: {{ $json.text }}",
        "categories": {
          "categories": [
            {
              "category": "Sales",
              "description": "the sender demonstrates buying intent or a desire to establish a business relationship around the purchase of our products. Examples of these requests might be: interest in buying wine, exploring a distribution relationship, joining the wine club, making a reservation for one of our experiences. Do not consider an unsolicited sales pitch where they are seeking to sell their services/products or an ask for a call/meeting as buying intent. "
            },
            {
              "category": "Support - Tier 1",
              "description": "the request is basic in nature, seeking surface level information that is easily answered by our team. Examples of these requests might be: whether we can ship to their state, what our hours of operations are, what our prices are (for wine or experiences), where we are located, what types of products/services we offer."
            },
            {
              "category": "Support - Tier 2",
              "description": "the request likely requires human intervention or the subject line or email contents are likely from an existing customer. Examples of these requests might be: a question about an existing wine club (shipment/order/perk/benefit), a minor issue with an order (asking about timing, delivery requirements, confirmation of an order, confirmation of a refund or cancellation), a change of address request, a change of billing information, a request for a tracking number, an issue logging into their account on our website, anything else that might be a simple action from our team."
            },
            {
              "category": "Support - Tier 3",
              "description": "the request is urgent or critical in nature, likely warranting the involvement of management or immediate response. Examples of these requests might be: a customer is very angry, a customer had a very bad in-person interaction with our team, there is an urgent food allergy on site, there has been or was an injury on site, a customer order was broken or delivered incorrectly, the order delivered contained the wrong items, a customer will not be able to receive a delivery and is requesting help, or some other request warranting immediate attention from our team to avoid further damage or alleviate significant customer dissatisfaction. "
            },
            {
              "category": "Events",
              "description": "the request is related to an event in the past, present, or future. Examples of these requests might be: interest in booking an event at one of our locations, interest in partnering on an event with us, interest in our wine for an event, questions about an upcoming or past event, issues with a ticket for an event, a need for last minute directions, or anything else that might be related to an event we are hosting, will host or planning. "
            }
          ]
        },
        "options": {
          "fallback": "other",
          "systemPromptTemplate": "You are an experienced executive assistant to fortune 500 executives. Your task is to triage a high volume of incoming emails and select the most appropriate category of email, so that an automated system can apply the correct label to the thread. Your response is only the category you’ve selected from the {categories}. The categories are listed below with quotes, but you should not include any formatting in your output, only the category you have selected.\n##Core Responsibilities##\n###Email Analysis###\nReview incoming emails thoroughlyIdentify key points, requests, and urgency levelEvaluate the tone and sentiment of the messagePick the most likely category of the email content based strictly on the Categorization Protocol.\n###Response Evaluation###\nDetermine if categorization is needed based on these criteria: \n*Skip automated notifications, marketing emails, and newsletters\n*Prioritize customer support messages, partnership opportunities, and sales inquiries\n*Flag urgent matters that require the recipient’s immediate attentionIgnore automated requests from platforms like LinkedIn, Microsoft 365/Office, and Commerce7. "
        }
      },
      "type": "@n8n/n8n-nodes-langchain.textClassifier",
      "typeVersion": 1,
      "position": [
        880,
        160
      ],
      "id": "0a8398e0-ed63-429e-8f8d-2e29756c2fda",
      "name": "Text Classifier"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "gpt-4o",
          "mode": "list",
          "cachedResultName": "gpt-4o"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        980,
        380
      ],
      "id": "c306ce8b-dc0a-4fb6-90db-d92fb2db07e3",
      "name": "OpenAI Chat Model",
      "credentials": {
        "openAiApi": {
          "id": "fMKMaLtllDstvzWd",
          "name": "OpenAi account"
        }
      }
    },
    {
      "parameters": {
        "resource": "thread",
        "operation": "addLabels",
        "threadId": "={{ $json.threadId }}",
        "labelIds": [
          "Label_7951112386492637760"
        ]
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "position": [
        1500,
        -140
      ],
      "id": "f09c2c07-f92e-40aa-a1d6-280ed06b8342",
      "name": "support1_label",
      "webhookId": "4bd0c65d-d379-426a-a02f-bc381098da24",
      "credentials": {
        "gmailOAuth2": {
          "id": "1QYU7PMD6HPRubyk",
          "name": "Gmail account"
        }
      },
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "resource": "thread",
        "operation": "addLabels",
        "threadId": "={{ $json.threadId }}",
        "labelIds": [
          "Label_864228326480651248"
        ]
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "position": [
        1500,
        -340
      ],
      "id": "b574aa8d-c90d-4639-b176-17a16e654c0e",
      "name": "sales_label",
      "webhookId": "e8d04dfe-a2fb-4bcf-bfb2-c99c205a2061",
      "credentials": {
        "gmailOAuth2": {
          "id": "1QYU7PMD6HPRubyk",
          "name": "Gmail account"
        }
      }
    },
    {
      "parameters": {
        "resource": "thread",
        "operation": "addLabels",
        "threadId": "={{ $json.threadId }}",
        "labelIds": [
          "Label_7865285053597781876"
        ]
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "position": [
        1500,
        40
      ],
      "id": "8cb5c49b-e2e9-4891-a6ed-0d26f833a1af",
      "name": "support2_label",
      "webhookId": "c0d92117-ba3f-4184-bc66-2bfc21f088fd",
      "credentials": {
        "gmailOAuth2": {
          "id": "1QYU7PMD6HPRubyk",
          "name": "Gmail account"
        }
      }
    },
    {
      "parameters": {
        "resource": "thread",
        "operation": "addLabels",
        "threadId": "={{ $json.threadId }}",
        "labelIds": [
          "Label_2706412583500707335"
        ]
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "position": [
        1500,
        200
      ],
      "id": "7cd89f22-323d-4cb4-b10e-38617a6246e5",
      "name": "support3_label",
      "webhookId": "5700024d-8a8a-4ab1-98cf-26fe08201eab",
      "credentials": {
        "gmailOAuth2": {
          "id": "1QYU7PMD6HPRubyk",
          "name": "Gmail account"
        }
      }
    },
    {
      "parameters": {
        "resource": "thread",
        "operation": "addLabels",
        "threadId": "={{ $json.threadId }}",
        "labelIds": [
          "Label_505619501978125129"
        ]
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "position": [
        1500,
        360
      ],
      "id": "9d1b7e78-c1ff-4422-953d-2b5e8e2eca3c",
      "name": "events_label",
      "webhookId": "7d6195b8-b6a6-4b4e-8d74-e01a1eb257ba",
      "credentials": {
        "gmailOAuth2": {
          "id": "1QYU7PMD6HPRubyk",
          "name": "Gmail account"
        }
      }
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "822b972e-24f1-4f76-a4e8-0044ee6796e6",
              "name": "threadId",
              "value": "={{ $json.threadId }}",
              "type": "string"
            },
            {
              "id": "99503849-d11b-4c5a-8382-3fb43ae3caf9",
              "name": "subject",
              "value": "={{ $json.subject }}",
              "type": "string"
            },
            {
              "id": "4819df04-5262-44e0-806f-cf108cb14c25",
              "name": "date",
              "value": "={{ $json.date }}",
              "type": "string"
            },
            {
              "id": "6534427b-2a57-477c-94a0-0efda5b71ba4",
              "name": "to.value[0].address",
              "value": "={{ $json.to.value[0].address }}",
              "type": "string"
            },
            {
              "id": "3ae4b794-93fb-45c4-a855-ed6882b47137",
              "name": "from.value[0].address",
              "value": "={{ $json.from.value[0].address }}",
              "type": "string"
            },
            {
              "id": "0f05db85-4edb-48b3-a5fa-d9a87b05c4a2",
              "name": "from.value[0].name",
              "value": "={{ $json.from.value[0].name }}",
              "type": "string"
            },
            {
              "id": "b584d685-39e4-428a-b4e1-4bf8d30dd88e",
              "name": "text",
              "value": "={{ $json.text }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        660,
        160
      ],
      "id": "97f9ccb7-62d5-44ee-a111-ee88daa7a4d3",
      "name": "Edit Fields"
    },
    {
      "parameters": {
        "resource": "draft",
        "subject": "=",
        "message": "={{ $json.choices[0].message.content }}",
        "options": {
          "threadId": "={{ $('Text Classifier').item.json.threadId }}",
          "sendTo": "={{ $('Text Classifier').item.json.from.value[0].address }}"
        }
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "position": [
        2260,
        0
      ],
      "id": "22bf7c53-bca1-43a5-a7de-19c7b97b0196",
      "name": "Gmail",
      "webhookId": "60a54004-20a2-4519-846c-401a9d597a92",
      "credentials": {
        "gmailOAuth2": {
          "id": "1QYU7PMD6HPRubyk",
          "name": "Gmail account"
        }
      }
    },
    {
      "parameters": {
        "resource": "draft",
        "subject": "=",
        "message": "={{ $json.choices[0].message.content }}",
        "options": {
          "threadId": "={{ $('Text Classifier').item.json.threadId }}",
          "sendTo": "={{ $('Text Classifier').item.json.from.value[0].address }}"
        }
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "position": [
        2260,
        -180
      ],
      "id": "760ba425-5be2-4e94-a378-25ca267bf423",
      "name": "Gmail1",
      "webhookId": "56b2c99a-d1b8-44ec-b363-dd68ad751c9f",
      "credentials": {
        "gmailOAuth2": {
          "id": "1QYU7PMD6HPRubyk",
          "name": "Gmail account"
        }
      }
    },
    {
      "parameters": {
        "resource": "draft",
        "subject": "=",
        "message": "={{ $json.choices[0].message.content }}",
        "options": {
          "threadId": "={{ $('Text Classifier').item.json.threadId }}",
          "sendTo": "={{ $('Text Classifier').item.json.from.value[0].address }}"
        }
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "position": [
        2260,
        200
      ],
      "id": "e59ce9a8-4c27-43cf-83b6-bad1170c6549",
      "name": "Gmail2",
      "webhookId": "1a7d656e-68d1-4dce-8720-a09b000c4de6",
      "credentials": {
        "gmailOAuth2": {
          "id": "1QYU7PMD6HPRubyk",
          "name": "Gmail account"
        }
      }
    },
    {
      "parameters": {
        "resource": "draft",
        "subject": "=",
        "message": "={{ $json.choices[0].message.content }}",
        "options": {
          "threadId": "={{ $('Text Classifier').item.json.threadId }}",
          "sendTo": "={{ $('Text Classifier').item.json.from.value[0].address }}"
        }
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "position": [
        2040,
        380
      ],
      "id": "9b72e25c-0675-4db6-860b-9441a89a02fe",
      "name": "Gmail3",
      "webhookId": "202ef178-9ae4-479e-9340-46e1053dfe3f",
      "credentials": {
        "gmailOAuth2": {
          "id": "1QYU7PMD6HPRubyk",
          "name": "Gmail account"
        }
      }
    },
    {
      "parameters": {
        "resource": "draft",
        "subject": "=",
        "message": "={{ $json.choices[0].message.content }}",
        "options": {
          "threadId": "={{ $('Text Classifier').item.json.threadId }}",
          "sendTo": "={{ $('Text Classifier').item.json.from.value[0].address }}"
        }
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "position": [
        2020,
        -460
      ],
      "id": "5ca4a87b-ce92-409d-ad5a-12560738d12c",
      "name": "Gmail4",
      "webhookId": "acfea4eb-f476-4a5d-81e6-6c90149bf77f",
      "credentials": {
        "gmailOAuth2": {
          "id": "1QYU7PMD6HPRubyk",
          "name": "Gmail account"
        }
      }
    },
    {
      "parameters": {
        "operation": "create",
        "base": {
          "__rl": true,
          "value": "appPmBn3i3tT4utYf",
          "mode": "list",
          "cachedResultName": "email_classifier_v0",
          "cachedResultUrl": "https://airtable.com/appPmBn3i3tT4utYf"
        },
        "table": {
          "__rl": true,
          "value": "tblOVsyCHRosVJr9n",
          "mode": "list",
          "cachedResultName": "emails_wk2",
          "cachedResultUrl": "https://airtable.com/appPmBn3i3tT4utYf/tblOVsyCHRosVJr9n"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "draft_text": "={{ $('draft_support1').item.json.choices[0].message.content }}",
            "subject": "={{ $('Text Classifier').item.json.subject }}",
            "original_text": "={{ $('Text Classifier').item.json.text }}",
            "category": "support_tier1",
            "status": "todo"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "id",
              "displayName": "id",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": true,
              "removed": true
            },
            {
              "id": "subject",
              "displayName": "subject",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "original_text",
              "displayName": "original_text",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "category",
              "displayName": "category",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "options",
              "options": [
                {
                  "name": "sales",
                  "value": "sales"
                },
                {
                  "name": "support_tier1",
                  "value": "support_tier1"
                },
                {
                  "name": "support_tier2",
                  "value": "support_tier2"
                },
                {
                  "name": "support_tier3",
                  "value": "support_tier3"
                },
                {
                  "name": "events",
                  "value": "events"
                },
                {
                  "name": "other",
                  "value": "other"
                }
              ],
              "readOnly": false,
              "removed": false
            },
            {
              "id": "category_rating",
              "displayName": "category_rating",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "options",
              "options": [
                {
                  "name": "1",
                  "value": "1"
                },
                {
                  "name": "2",
                  "value": "2"
                },
                {
                  "name": "3",
                  "value": "3"
                }
              ],
              "readOnly": false,
              "removed": false
            },
            {
              "id": "draft_text",
              "displayName": "draft_text",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "draft_rating",
              "displayName": "draft_rating",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "options",
              "options": [
                {
                  "name": "1",
                  "value": "1"
                },
                {
                  "name": "2",
                  "value": "2"
                },
                {
                  "name": "3",
                  "value": "3"
                }
              ],
              "readOnly": false,
              "removed": false
            },
            {
              "id": "created_at",
              "displayName": "created_at",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": true,
              "removed": true
            },
            {
              "id": "status",
              "displayName": "status",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "options",
              "options": [
                {
                  "name": "todo",
                  "value": "todo"
                },
                {
                  "name": "in review",
                  "value": "in review"
                },
                {
                  "name": "done",
                  "value": "done"
                }
              ],
              "readOnly": false,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.airtable",
      "typeVersion": 2.1,
      "position": [
        2480,
        -180
      ],
      "id": "b2f57871-c9bf-499b-b532-97d6804c89b9",
      "name": "support_1",
      "credentials": {
        "airtableTokenApi": {
          "id": "lgeboDAENVQSj11S",
          "name": "NVL_Airtable"
        }
      }
    },
    {
      "parameters": {
        "operation": "create",
        "base": {
          "__rl": true,
          "value": "appPmBn3i3tT4utYf",
          "mode": "list",
          "cachedResultName": "email_classifier_v0",
          "cachedResultUrl": "https://airtable.com/appPmBn3i3tT4utYf"
        },
        "table": {
          "__rl": true,
          "value": "tblOVsyCHRosVJr9n",
          "mode": "list",
          "cachedResultName": "emails_wk2",
          "cachedResultUrl": "https://airtable.com/appPmBn3i3tT4utYf/tblOVsyCHRosVJr9n"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "draft_text": "={{ $('draft_sales').item.json.choices[0].message.content }}",
            "subject": "={{ $('Text Classifier').item.json.subject }}",
            "original_text": "={{ $('Text Classifier').item.json.text }}",
            "category": "sales"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "id",
              "displayName": "id",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": true,
              "removed": true
            },
            {
              "id": "subject",
              "displayName": "subject",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "original_text",
              "displayName": "original_text",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "category",
              "displayName": "category",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "options",
              "options": [
                {
                  "name": "sales",
                  "value": "sales"
                },
                {
                  "name": "support_tier1",
                  "value": "support_tier1"
                },
                {
                  "name": "support_tier2",
                  "value": "support_tier2"
                },
                {
                  "name": "support_tier3",
                  "value": "support_tier3"
                },
                {
                  "name": "events",
                  "value": "events"
                },
                {
                  "name": "other",
                  "value": "other"
                }
              ],
              "readOnly": false,
              "removed": false
            },
            {
              "id": "category_rating",
              "displayName": "category_rating",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "options",
              "options": [
                {
                  "name": "1",
                  "value": "1"
                },
                {
                  "name": "2",
                  "value": "2"
                },
                {
                  "name": "3",
                  "value": "3"
                }
              ],
              "readOnly": false,
              "removed": false
            },
            {
              "id": "draft_text",
              "displayName": "draft_text",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "draft_rating",
              "displayName": "draft_rating",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "options",
              "options": [
                {
                  "name": "1",
                  "value": "1"
                },
                {
                  "name": "2",
                  "value": "2"
                },
                {
                  "name": "3",
                  "value": "3"
                }
              ],
              "readOnly": false,
              "removed": false
            },
            {
              "id": "created_at",
              "displayName": "created_at",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": true,
              "removed": true
            },
            {
              "id": "status",
              "displayName": "status",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "options",
              "options": [
                {
                  "name": "todo",
                  "value": "todo"
                },
                {
                  "name": "in review",
                  "value": "in review"
                },
                {
                  "name": "done",
                  "value": "done"
                }
              ],
              "readOnly": false,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.airtable",
      "typeVersion": 2.1,
      "position": [
        2240,
        -460
      ],
      "id": "23b9cb2a-fc6c-4bbe-a070-a27c874c84d6",
      "name": "sales",
      "credentials": {
        "airtableTokenApi": {
          "id": "lgeboDAENVQSj11S",
          "name": "NVL_Airtable"
        }
      }
    },
    {
      "parameters": {
        "operation": "create",
        "base": {
          "__rl": true,
          "value": "appPmBn3i3tT4utYf",
          "mode": "list",
          "cachedResultName": "email_classifier_v0",
          "cachedResultUrl": "https://airtable.com/appPmBn3i3tT4utYf"
        },
        "table": {
          "__rl": true,
          "value": "tblOVsyCHRosVJr9n",
          "mode": "list",
          "cachedResultName": "emails_wk2",
          "cachedResultUrl": "https://airtable.com/appPmBn3i3tT4utYf/tblOVsyCHRosVJr9n"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "draft_text": "={{ $('draft_support2').item.json.choices[0].message.content }}",
            "subject": "={{ $('Text Classifier').item.json.subject }}",
            "original_text": "={{ $('Text Classifier').item.json.text }}",
            "category": "support_tier3"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "id",
              "displayName": "id",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": true,
              "removed": true
            },
            {
              "id": "subject",
              "displayName": "subject",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "original_text",
              "displayName": "original_text",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "category",
              "displayName": "category",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "options",
              "options": [
                {
                  "name": "sales",
                  "value": "sales"
                },
                {
                  "name": "support_tier1",
                  "value": "support_tier1"
                },
                {
                  "name": "support_tier2",
                  "value": "support_tier2"
                },
                {
                  "name": "support_tier3",
                  "value": "support_tier3"
                },
                {
                  "name": "events",
                  "value": "events"
                },
                {
                  "name": "other",
                  "value": "other"
                }
              ],
              "readOnly": false,
              "removed": false
            },
            {
              "id": "category_rating",
              "displayName": "category_rating",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "options",
              "options": [
                {
                  "name": "1",
                  "value": "1"
                },
                {
                  "name": "2",
                  "value": "2"
                },
                {
                  "name": "3",
                  "value": "3"
                }
              ],
              "readOnly": false,
              "removed": false
            },
            {
              "id": "draft_text",
              "displayName": "draft_text",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "draft_rating",
              "displayName": "draft_rating",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "options",
              "options": [
                {
                  "name": "1",
                  "value": "1"
                },
                {
                  "name": "2",
                  "value": "2"
                },
                {
                  "name": "3",
                  "value": "3"
                }
              ],
              "readOnly": false,
              "removed": false
            },
            {
              "id": "created_at",
              "displayName": "created_at",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": true,
              "removed": true
            },
            {
              "id": "status",
              "displayName": "status",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "options",
              "options": [
                {
                  "name": "todo",
                  "value": "todo"
                },
                {
                  "name": "in review",
                  "value": "in review"
                },
                {
                  "name": "done",
                  "value": "done"
                }
              ],
              "readOnly": false,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.airtable",
      "typeVersion": 2.1,
      "position": [
        2480,
        0
      ],
      "id": "450724d7-2a03-4e8d-b8c1-e03d8f0c7b4f",
      "name": "support_2",
      "credentials": {
        "airtableTokenApi": {
          "id": "lgeboDAENVQSj11S",
          "name": "NVL_Airtable"
        }
      }
    },
    {
      "parameters": {
        "operation": "create",
        "base": {
          "__rl": true,
          "value": "appPmBn3i3tT4utYf",
          "mode": "list",
          "cachedResultName": "email_classifier_v0",
          "cachedResultUrl": "https://airtable.com/appPmBn3i3tT4utYf"
        },
        "table": {
          "__rl": true,
          "value": "tblOVsyCHRosVJr9n",
          "mode": "list",
          "cachedResultName": "emails_wk2",
          "cachedResultUrl": "https://airtable.com/appPmBn3i3tT4utYf/tblOVsyCHRosVJr9n"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "draft_text": "={{ $('draft_support3').item.json.choices[0].message.content }}",
            "subject": "={{ $('Text Classifier').item.json.subject }}",
            "original_text": "={{ $('Text Classifier').item.json.text }}",
            "category": "support_tier3"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "id",
              "displayName": "id",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": true,
              "removed": true
            },
            {
              "id": "subject",
              "displayName": "subject",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "original_text",
              "displayName": "original_text",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "category",
              "displayName": "category",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "options",
              "options": [
                {
                  "name": "sales",
                  "value": "sales"
                },
                {
                  "name": "support_tier1",
                  "value": "support_tier1"
                },
                {
                  "name": "support_tier2",
                  "value": "support_tier2"
                },
                {
                  "name": "support_tier3",
                  "value": "support_tier3"
                },
                {
                  "name": "events",
                  "value": "events"
                },
                {
                  "name": "other",
                  "value": "other"
                }
              ],
              "readOnly": false,
              "removed": false
            },
            {
              "id": "category_rating",
              "displayName": "category_rating",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "options",
              "options": [
                {
                  "name": "1",
                  "value": "1"
                },
                {
                  "name": "2",
                  "value": "2"
                },
                {
                  "name": "3",
                  "value": "3"
                }
              ],
              "readOnly": false,
              "removed": false
            },
            {
              "id": "draft_text",
              "displayName": "draft_text",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "draft_rating",
              "displayName": "draft_rating",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "options",
              "options": [
                {
                  "name": "1",
                  "value": "1"
                },
                {
                  "name": "2",
                  "value": "2"
                },
                {
                  "name": "3",
                  "value": "3"
                }
              ],
              "readOnly": false,
              "removed": false
            },
            {
              "id": "created_at",
              "displayName": "created_at",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": true,
              "removed": true
            },
            {
              "id": "status",
              "displayName": "status",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "options",
              "options": [
                {
                  "name": "todo",
                  "value": "todo"
                },
                {
                  "name": "in review",
                  "value": "in review"
                },
                {
                  "name": "done",
                  "value": "done"
                }
              ],
              "readOnly": false,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.airtable",
      "typeVersion": 2.1,
      "position": [
        2700,
        200
      ],
      "id": "824ff0b5-a081-4138-b303-4d566fba0f56",
      "name": "support_3",
      "credentials": {
        "airtableTokenApi": {
          "id": "lgeboDAENVQSj11S",
          "name": "NVL_Airtable"
        }
      }
    },
    {
      "parameters": {
        "operation": "create",
        "base": {
          "__rl": true,
          "value": "appPmBn3i3tT4utYf",
          "mode": "list",
          "cachedResultName": "email_classifier_v0",
          "cachedResultUrl": "https://airtable.com/appPmBn3i3tT4utYf"
        },
        "table": {
          "__rl": true,
          "value": "tblOVsyCHRosVJr9n",
          "mode": "list",
          "cachedResultName": "emails_wk2",
          "cachedResultUrl": "https://airtable.com/appPmBn3i3tT4utYf/tblOVsyCHRosVJr9n"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "draft_text": "={{ $('draft_events').item.json.choices[0].message.content }}",
            "subject": "={{ $('Text Classifier').item.json.subject }}",
            "original_text": "={{ $('Text Classifier').item.json.text }}",
            "category": "events",
            "status": "todo"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "id",
              "displayName": "id",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": true,
              "removed": true
            },
            {
              "id": "subject",
              "displayName": "subject",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "original_text",
              "displayName": "original_text",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "category",
              "displayName": "category",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "options",
              "options": [
                {
                  "name": "sales",
                  "value": "sales"
                },
                {
                  "name": "support_tier1",
                  "value": "support_tier1"
                },
                {
                  "name": "support_tier2",
                  "value": "support_tier2"
                },
                {
                  "name": "support_tier3",
                  "value": "support_tier3"
                },
                {
                  "name": "events",
                  "value": "events"
                },
                {
                  "name": "other",
                  "value": "other"
                }
              ],
              "readOnly": false,
              "removed": false
            },
            {
              "id": "category_rating",
              "displayName": "category_rating",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "options",
              "options": [
                {
                  "name": "1",
                  "value": "1"
                },
                {
                  "name": "2",
                  "value": "2"
                },
                {
                  "name": "3",
                  "value": "3"
                }
              ],
              "readOnly": false,
              "removed": false
            },
            {
              "id": "draft_text",
              "displayName": "draft_text",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "draft_rating",
              "displayName": "draft_rating",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "options",
              "options": [
                {
                  "name": "1",
                  "value": "1"
                },
                {
                  "name": "2",
                  "value": "2"
                },
                {
                  "name": "3",
                  "value": "3"
                }
              ],
              "readOnly": false,
              "removed": false
            },
            {
              "id": "created_at",
              "displayName": "created_at",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": true,
              "removed": true
            },
            {
              "id": "status",
              "displayName": "status",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "options",
              "options": [
                {
                  "name": "todo",
                  "value": "todo"
                },
                {
                  "name": "in review",
                  "value": "in review"
                },
                {
                  "name": "done",
                  "value": "done"
                }
              ],
              "readOnly": false,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.airtable",
      "typeVersion": 2.1,
      "position": [
        2260,
        380
      ],
      "id": "bbfbe411-ebef-4863-9feb-df0370e99bb5",
      "name": "events",
      "credentials": {
        "airtableTokenApi": {
          "id": "lgeboDAENVQSj11S",
          "name": "NVL_Airtable"
        }
      }
    },
    {
      "parameters": {
        "operation": "create",
        "base": {
          "__rl": true,
          "value": "appPmBn3i3tT4utYf",
          "mode": "list",
          "cachedResultName": "email_classifier_v0",
          "cachedResultUrl": "https://airtable.com/appPmBn3i3tT4utYf"
        },
        "table": {
          "__rl": true,
          "value": "tblOVsyCHRosVJr9n",
          "mode": "list",
          "cachedResultName": "emails_wk2",
          "cachedResultUrl": "https://airtable.com/appPmBn3i3tT4utYf/tblOVsyCHRosVJr9n"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "subject": "={{ $('Text Classifier').item.json.subject }}",
            "original_text": "={{ $('Text Classifier').item.json.text }}",
            "category": "other",
            "status": "todo"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "id",
              "displayName": "id",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": true,
              "removed": true
            },
            {
              "id": "subject",
              "displayName": "subject",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "original_text",
              "displayName": "original_text",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "category",
              "displayName": "category",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "options",
              "options": [
                {
                  "name": "sales",
                  "value": "sales"
                },
                {
                  "name": "support_tier1",
                  "value": "support_tier1"
                },
                {
                  "name": "support_tier2",
                  "value": "support_tier2"
                },
                {
                  "name": "support_tier3",
                  "value": "support_tier3"
                },
                {
                  "name": "events",
                  "value": "events"
                },
                {
                  "name": "other",
                  "value": "other"
                }
              ],
              "readOnly": false,
              "removed": false
            },
            {
              "id": "category_rating",
              "displayName": "category_rating",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "options",
              "options": [
                {
                  "name": "1",
                  "value": "1"
                },
                {
                  "name": "2",
                  "value": "2"
                },
                {
                  "name": "3",
                  "value": "3"
                }
              ],
              "readOnly": false,
              "removed": true
            },
            {
              "id": "draft_text",
              "displayName": "draft_text",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "draft_rating",
              "displayName": "draft_rating",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "options",
              "options": [
                {
                  "name": "1",
                  "value": "1"
                },
                {
                  "name": "2",
                  "value": "2"
                },
                {
                  "name": "3",
                  "value": "3"
                }
              ],
              "readOnly": false,
              "removed": true
            },
            {
              "id": "created_at",
              "displayName": "created_at",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": true,
              "removed": true
            },
            {
              "id": "status",
              "displayName": "status",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "options",
              "options": [
                {
                  "name": "todo",
                  "value": "todo"
                },
                {
                  "name": "in review",
                  "value": "in review"
                },
                {
                  "name": "done",
                  "value": "done"
                }
              ],
              "readOnly": false,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.airtable",
      "typeVersion": 2.1,
      "position": [
        1500,
        600
      ],
      "id": "c7358247-aa62-4c0f-8831-f710b0308d33",
      "name": "other",
      "credentials": {
        "airtableTokenApi": {
          "id": "lgeboDAENVQSj11S",
          "name": "NVL_Airtable"
        }
      }
    },
    {
      "parameters": {
        "modelId": {
          "__rl": true,
          "value": "o1-mini",
          "mode": "list",
          "cachedResultName": "O1-MINI"
        },
        "messages": {
          "values": [
            {
              "content": "You are a friendly, helpful customer support agent. You excel at making people feel heard and pride yourself on the accuracy of your responses. You will receive the contents of an email and draft a situationally appropriate email reply. Before responding you will take the following steps:\n1. Ensure you understand the contents and tone of the message.\n2. Determine what information you need to respond appropriately. \n3. Get the information you need.\n\nOnce you have completed the above steps, you may proceed with drafting your response. \nYour response should be professional, helpful and well-informed. If you do not have, or are uncertain about, the information you need for the response, you may leave placeholder text to be filled in with the proper information later. No matter what, you should always draft a situationally-appropriate response. You never need to include a subject line as your response will always be used as a reply to the same thread.\n\nIn no circumstances should you ever include explainer text that is not intended for the recipient of the email. ",
              "role": "assistant"
            },
            {
              "content": "=Here is the email.\nsubject:  {{ $('Text Classifier').item.json.subject }}\nname of sender: {{ $('Text Classifier').item.json.from.value[0].name }}\nemail text: {{ $json.messages[0].snippet }}"
            }
          ]
        },
        "simplify": false,
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.8,
      "position": [
        1900,
        -180
      ],
      "id": "f3ac4b71-34cd-4a20-b1fe-1fa35c98ca22",
      "name": "draft_support1",
      "alwaysOutputData": true,
      "credentials": {
        "openAiApi": {
          "id": "fMKMaLtllDstvzWd",
          "name": "OpenAi account"
        }
      }
    },
    {
      "parameters": {
        "modelId": {
          "__rl": true,
          "value": "o1-mini",
          "mode": "list",
          "cachedResultName": "O1-MINI"
        },
        "messages": {
          "values": [
            {
              "content": "You are a friendly, helpful customer support agent. You excel at making people feel heard and pride yourself on the accuracy of your responses. You will receive the contents of an email and draft a situationally appropriate email reply. Before responding you will take the following steps:\n1. Ensure you understand the contents and tone of the message.\n2. Determine what information you need to respond appropriately. \n3. Get the information you need.\n\nOnce you have completed the above steps, you may proceed with drafting your response. \nYour response should be professional, helpful and well-informed. If you do not have, or are uncertain about, the information you need for the response, you may leave placeholder text to be filled in with the proper information later. No matter what, you should always draft a situationally-appropriate response. You never need to include a subject line as your response will always be used as a reply to the same thread.\n\nIn no circumstances should you ever include explainer text that is not intended for the recipient of the email. ",
              "role": "assistant"
            },
            {
              "content": "=Here is the email.\nsubject:  {{ $('Text Classifier').item.json.subject }}\nname of sender: {{ $('Text Classifier').item.json.from.value[0].name }}\nemail text: {{ $json.messages[0].snippet }}"
            }
          ]
        },
        "simplify": false,
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.8,
      "position": [
        1900,
        0
      ],
      "id": "c90d05b8-8c32-4508-9541-45ea1cb1ad91",
      "name": "draft_support2",
      "alwaysOutputData": true,
      "credentials": {
        "openAiApi": {
          "id": "fMKMaLtllDstvzWd",
          "name": "OpenAi account"
        }
      }
    },
    {
      "parameters": {
        "modelId": {
          "__rl": true,
          "value": "o1-mini",
          "mode": "list",
          "cachedResultName": "O1-MINI"
        },
        "messages": {
          "values": [
            {
              "content": "You are a friendly, helpful customer support agent. You excel at making people feel heard and pride yourself on the accuracy of your responses. You will receive the contents of an email and draft a situationally appropriate email reply. Before responding you will take the following steps:\n1. Ensure you understand the contents and tone of the message.\n2. Determine what information you need to respond appropriately. \n3. Get the information you need.\n\nOnce you have completed the above steps, you may proceed with drafting your response. \nYour response should be professional, helpful and well-informed. If you do not have, or are uncertain about, the information you need for the response, you may leave placeholder text to be filled in with the proper information later. No matter what, you should always draft a situationally-appropriate response. You never need to include a subject line as your response will always be used as a reply to the same thread.\n\nIn no circumstances should you ever include explainer text that is not intended for the recipient of the email. ",
              "role": "assistant"
            },
            {
              "content": "=Here is the email.\nsubject:  {{ $('Text Classifier').item.json.subject }}\nname of sender: {{ $('Text Classifier').item.json.from.value[0].name }}\nemail text: {{ $json.messages[0].snippet }}"
            }
          ]
        },
        "simplify": false,
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.8,
      "position": [
        1900,
        200
      ],
      "id": "82584d29-66c8-44a5-9848-4ffc7c38e66a",
      "name": "draft_support3",
      "alwaysOutputData": true,
      "credentials": {
        "openAiApi": {
          "id": "fMKMaLtllDstvzWd",
          "name": "OpenAi account"
        }
      }
    },
    {
      "parameters": {
        "modelId": {
          "__rl": true,
          "value": "o1-mini",
          "mode": "list",
          "cachedResultName": "O1-MINI"
        },
        "messages": {
          "values": [
            {
              "content": "You are a friendly, helpful customer support agent. You excel at making people feel heard and pride yourself on the accuracy of your responses. You will receive the contents of an email and draft a situationally appropriate email reply. Before responding you will take the following steps:\n1. Ensure you understand the contents and tone of the message.\n2. Determine what information you need to respond appropriately. \n3. Get the information you need.\n\nOnce you have completed the above steps, you may proceed with drafting your response. \nYour response should be professional, helpful and well-informed. If you do not have, or are uncertain about, the information you need for the response, you may leave placeholder text to be filled in with the proper information later. No matter what, you should always draft a situationally-appropriate response. You never need to include a subject line as your response will always be used as a reply to the same thread.\n\nIn no circumstances should you ever include explainer text that is not intended for the recipient of the email. ",
              "role": "assistant"
            },
            {
              "content": "=Here is the email.\nsubject:  {{ $('Text Classifier').item.json.subject }}\nname of sender: {{ $('Text Classifier').item.json.from.value[0].name }}\nemail text: {{ $json.messages[0].snippet }}"
            }
          ]
        },
        "simplify": false,
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.8,
      "position": [
        1680,
        380
      ],
      "id": "bbe1457f-3aee-4f76-acfa-b40ce918f708",
      "name": "draft_events",
      "alwaysOutputData": true,
      "credentials": {
        "openAiApi": {
          "id": "fMKMaLtllDstvzWd",
          "name": "OpenAi account"
        }
      }
    },
    {
      "parameters": {
        "modelId": {
          "__rl": true,
          "value": "o1-mini",
          "mode": "list",
          "cachedResultName": "O1-MINI"
        },
        "messages": {
          "values": [
            {
              "content": "You are a friendly, helpful customer support agent. You excel at making people feel heard and pride yourself on the accuracy of your responses. You will receive the contents of an email and draft a situationally appropriate email reply. Before responding you will take the following steps:\n1. Ensure you understand the contents and tone of the message.\n2. Determine what information you need to respond appropriately. \n3. Get the information you need.\n\nOnce you have completed the above steps, you may proceed with drafting your response. \nYour response should be professional, helpful and well-informed. If you do not have, or are uncertain about, the information you need for the response, you may leave placeholder text to be filled in with the proper information later. No matter what, you should always draft a situationally-appropriate response. You never need to include a subject line as your response will always be used as a reply to the same thread.\n\nIn no circumstances should you ever include explainer text that is not intended for the recipient of the email. ",
              "role": "assistant"
            },
            {
              "content": "=Here is the email.\nsubject:  {{ $('Text Classifier').item.json.subject }}\nname of sender: {{ $('Text Classifier').item.json.from.value[0].name }}\nemail text: {{ $json.messages[0].snippet }}"
            }
          ]
        },
        "simplify": false,
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.8,
      "position": [
        1660,
        -460
      ],
      "id": "5196206c-2f0e-4be6-af24-b906a7f3d0cb",
      "name": "draft_sales",
      "alwaysOutputData": true,
      "credentials": {
        "openAiApi": {
          "id": "fMKMaLtllDstvzWd",
          "name": "OpenAi account"
        }
      }
    },
    {
      "parameters": {
        "authentication": "oAuth2",
        "select": "user",
        "user": {
          "__rl": true,
          "value": "U07S61M095M",
          "mode": "list",
          "cachedResultName": "cheers"
        },
        "text": "🚨 **URGENT - Tier 3 Support**  Subject: {{ $('Text Classifier').item.json.subject }} name of sender: {{ $('Text Classifier').item.json.from.value[0].name }} email text: {{ $json.messages[0].snippet }}",
        "otherOptions": {}
      },
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2.3,
      "position": [
        2480,
        200
      ],
      "id": "d8b4d4bd-9ab3-4534-a270-cfd3acd0b93f",
      "name": "Slack",
      "webhookId": "22e84ec0-0514-4981-ace3-df757fdbdff0",
      "credentials": {
        "slackOAuth2Api": {
          "id": "cb1HIT4MER4PFIqk",
          "name": "Slack account"
        }
      },
      "onError": "continueRegularOutput"
    }
  ],
  "pinData": {},
  "connections": {
    "Gmail Trigger": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Text Classifier",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Text Classifier": {
      "main": [
        [
          {
            "node": "sales_label",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "support1_label",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "support2_label",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "support3_label",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "events_label",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "other",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "sales_label": {
      "main": [
        [
          {
            "node": "draft_sales",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "support1_label": {
      "main": [
        [
          {
            "node": "draft_support1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "support2_label": {
      "main": [
        [
          {
            "node": "draft_support2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "support3_label": {
      "main": [
        [
          {
            "node": "draft_support3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "events_label": {
      "main": [
        []
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Text Classifier",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gmail": {
      "main": [
        [
          {
            "node": "support_2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gmail1": {
      "main": [
        [
          {
            "node": "support_1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gmail2": {
      "main": [
        [
          {
            "node": "Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gmail3": {
      "main": [
        [
          {
            "node": "events",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gmail4": {
      "main": [
        [
          {
            "node": "sales",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "draft_support1": {
      "main": [
        [
          {
            "node": "Gmail1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "draft_support2": {
      "main": [
        [
          {
            "node": "Gmail",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "draft_support3": {
      "main": [
        [
          {
            "node": "Gmail2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "draft_events": {
      "main": [
        [
          {
            "node": "Gmail3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "draft_sales": {
      "main": [
        [
          {
            "node": "Gmail4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Slack": {
      "main": [
        [
          {
            "node": "support_3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "c6a69c5a-0027-40f1-aa23-90b26d321fdf",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "6eaef2e0dd1722014405b8e338137e543d650e0b5715de901864c286230add5f"
  },
  "id": "sfSyN4vdMTsUXZhY",
  "tags": [
    {
      "createdAt": "2025-02-19T23:42:04.824Z",
      "updatedAt": "2025-02-19T23:42:04.824Z",
      "id": "82CFZSSTWOjXl7NB",
      "name": "build_together"
    }
  ]
}