{
  "id": "ZgwQCEBJf3pzC9En",
  "name": "My workflow",
  "tags": [],
  "nodes": [
    {
      "id": "64dd69a9-a2d4-4178-b02c-68c0351fdab6",
      "name": "OpenAI Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1616,
        1184
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "d84f2d34-f774-4dbd-bd9e-c183dba4c257",
      "name": "Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1616,
        1008
      ],
      "parameters": {
        "text": "={{ $json.body }}",
        "options": {
          "systemMessage": "=You are a support ticket intake and triage assistant. Your job is to collect user information and classify support requests.\n\nCLASSIFICATION CATEGORIES:\n- billing: Payment issues, invoices, subscriptions, refunds, pricing\n- product_question: How-to questions, feature usage, general inquiries\n- bug_report: Errors, broken features, technical malfunctions\n- cancellation_risk: Intent to cancel, threats to leave, competitor mentions\n- feature_request: Requests for new features or enhancements\n- other: Anything else\n\nCONVERSATION CONTEXT:\nUser Message: {{ $json.chatInput }}\nChat History: {{ $json.chatHistory || 'None' }}\n\n\nNOW ANALYZE THE CURRENT CONVERSATION AND RESPOND WITH JSON ONLY:"
        },
        "promptType": "define"
      },
      "typeVersion": 1.7
    },
    {
      "id": "cbe855a2-7873-4ebc-b5f8-3d396cbe22a9",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        2192,
        1056
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "334308d9-d1bd-4e18-b11e-4dab0ad4a21d",
              "operator": {
                "type": "number",
                "operation": "equals"
              },
              "leftValue": "={{ $json.itemsReceived }}",
              "rightValue": 0
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "d22660ca-5ada-4b30-a891-458d14d9622e",
      "name": "Create User",
      "type": "@xano/n8n-nodes-preview-xano.xano",
      "position": [
        2416,
        976
      ],
      "parameters": {},
      "credentials": {},
      "typeVersion": 1
    },
    {
      "id": "ea0be227-5c21-41db-9491-32075ffee164",
      "name": "_Create Support Ticket",
      "type": "@xano/n8n-nodes-preview-xano.xano",
      "position": [
        2624,
        976
      ],
      "parameters": {},
      "credentials": {},
      "typeVersion": 1
    },
    {
      "id": "f8c94569-bb62-420d-9063-8bbc538b6ef8",
      "name": "Create Support Ticket_",
      "type": "@xano/n8n-nodes-preview-xano.xano",
      "position": [
        2416,
        1168
      ],
      "parameters": {},
      "credentials": {},
      "typeVersion": 1
    },
    {
      "id": "fa82e65f-0893-42af-9273-73cafe544bd3",
      "name": "Ticket Ingestion",
      "type": "n8n-nodes-base.webhook",
      "position": [
        1232,
        1072
      ],
      "parameters": {
        "path": "fa4b1026-bc47-4d9d-b202-7c97f0d1b9e2",
        "options": {},
        "httpMethod": "POST"
      },
      "typeVersion": 2.1
    },
    {
      "id": "7fa911f3-7e21-46b6-94c3-bb54ba422e6d",
      "name": "Agent Response",
      "type": "n8n-nodes-base.webhook",
      "position": [
        1296,
        1520
      ],
      "parameters": {
        "path": "dfc07bd5-0904-4deb-b124-926861a65abe",
        "options": {},
        "httpMethod": "POST"
      },
      "typeVersion": 2.1
    },
    {
      "id": "ad2d516a-f8e7-42e3-9285-70313726c58a",
      "name": "Search row",
      "type": "@xano/n8n-nodes-preview-xano.xano",
      "position": [
        1904,
        1008
      ],
      "parameters": {},
      "credentials": {},
      "typeVersion": 1
    },
    {
      "id": "ee1c663e-1b9e-4591-a56d-f784a1d2418c",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1168,
        864
      ],
      "parameters": {
        "color": 7,
        "width": 704,
        "height": 464,
        "content": "## Webhook request\n- Simulate a webhook request through your Xano Function, or configure to listen to actual data from your ticketing platform of choice."
      },
      "typeVersion": 1
    },
    {
      "id": "0cf10441-9ae0-43c0-b867-ec73377f1013",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1168,
        1360
      ],
      "parameters": {
        "color": 7,
        "width": 368,
        "height": 304,
        "content": "## Listening request\n- Once Xano is done performing the analysis, the returned data is brought back into n8n for further automations!"
      },
      "typeVersion": 1
    },
    {
      "id": "ea07ba0b-1dd6-4d84-bacc-5136a1fa05a5",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "parameters": {
        "width": 1136,
        "height": 1328,
        "content": "# **How It Works**\n1. **n8n receives incoming data**\n   A webhook, form submission, ticket, or event enters your workflow and provides the raw payload to process.\n\n2. **Data is enriched or classified**\n   n8n can transform the payload or use an AI Agent to categorize the issue, extract fields, or generate structured information.\n\n3. **n8n connects directly to Xano**\n   With one credential setup, the Xano Node lets you search, create, or update records. There are no headers or manual API calls required.\n\n4. **Xano runs your backend logic**\n   Triggers, escalation rules, validations, and agentic workflows activate automatically and return a structured result.\n\n5. **n8n routes the outcome anywhere**\n   Slack, email, CRMs, databases: n8n continues the automation using the decision or enriched data sent back from Xano.\n\n\n# **How to Set It Up**\n1. **Create a Xano Access Token**\n   Open your Xano instance, go to *Metadata API \u2192 Manage Access Tokens*, and generate a new token. Copy the token and your instance\u2019s base URL.\n\n2. **Install the snippet within your Xano Instance [here!](\\https://www.xano.com/snippet/sZlboSHV)**\n\n3. **Add Xano credentials in n8n**\n   In n8n, go to *Credentials*, create a new **Xano** credential, and paste in the base URL and access token. Test the connection to confirm it\u2019s working.\n\n4. **Load your tables inside the workflow**\n   Add a Xano Node to your n8n workflow. Select your credential, choose a table, and pick an operation like **Search**, **Create**, or **Update**.\n\n5. **Connect your workflow steps**\n   Receive data via webhook, classify it with an n8n Agent if needed, and pass the structured output directly into your Xano Node.\n\n6. **Let Xano run your backend logic**\n   When n8n writes to Xano, triggers or agentic workflows inside your workspace process the data automatically and send a result back to n8n.\n\n# Customize\n### Row Operations:\n- **Create Row** (`createRow`)  \nCreate a new row in a selected table.\n\n- **Update Row** (`updateRow`)  \nUpdate a row with specific field values.\n\n- **Delete Single Content** (`deleteSingleContent`)  \nDelete a single row by ID.\n\n- **Get a Row** (`getSingleContent`)  \nFetch a row by ID.\n\n- **Get Many Rows** (`getTableContent`)  \nFetch multiple rows with pagination.\n\n- **Create Bulk Rows** (`bulkCreateContent`)  \nInsert multiple rows.\n\n- **Update Bulk Rows** (`bulkUpdateContent`)  \nBulk update multiple records.\n\n- **Search Rows** (`searchRow`)  \nSearch using filter queries (JSON input)."
      },
      "typeVersion": 1
    },
    {
      "id": "5f17432a-5512-413e-b263-2ad9895300c1",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1888,
        864
      ],
      "parameters": {
        "color": 7,
        "width": 912,
        "height": 464,
        "content": "## Check if a user exists, then do something!\n- If this request is coming from a new user, we first want to create a user, then their support ticket. Otherwise, let's just create their support ticket inside of Xano!"
      },
      "typeVersion": 1
    },
    {
      "id": "7fb65382-9f29-414f-a28c-4c46b47eb1bb",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1760,
        -128
      ],
      "parameters": {
        "color": 6,
        "width": 1024,
        "height": 608,
        "content": "@[youtube](XLXCS-USO3Y)"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "beefc46c-04e3-4948-9573-bc180c1283c7",
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Create User",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create Support Ticket_",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Agent": {
      "main": [
        [
          {
            "node": "Search row",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search row": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create User": {
      "main": [
        [
          {
            "node": "_Create Support Ticket",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Model": {
      "ai_languageModel": [
        [
          {
            "node": "Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Ticket Ingestion": {
      "main": [
        [
          {
            "node": "Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}