{
  "name": "Artavolo: AI sets the priority of each new client request, you approve it",
  "nodes": [
    {
      "parameters": {
        "content": "## AI sets the priority of each new request. You approve it.\n\nWhen a client sends a request through the portal, the AI reads it and proposes a priority: Low, Normal, High or Urgent. The agent is in review mode, so the priority waits beside the Requests table in Artavolo until someone accepts it.\n\n1. Install the community node **n8n-nodes-artavolo** (Settings, Community nodes).\n2. In Artavolo, open the base, then **Settings**, **AI agents**, **New agent**. Under Its changes choose **I review its changes**, and under This base **Read and change**. Paste its token into the Artavolo credential.\n3. Pick your base and table in each Artavolo node.\n4. Add your OpenAI key, or swap the chat model for Claude, Mistral or a model of your own.\n\nMade for the **Client portal** and **Service desk** templates (Requests table, Priority field). The trigger needs n8n to be reachable from Artavolo.",
        "height": 440,
        "width": 460
      },
      "id": "cb3034b8-9407-5e80-ba25-a8d1f8554d46",
      "name": "Read me",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -80,
        -360
      ]
    },
    {
      "parameters": {
        "base": "",
        "table": "",
        "event": "created"
      },
      "id": "692cdec1-e478-5859-8078-e9b63e5b9a1f",
      "name": "New request",
      "type": "n8n-nodes-artavolo.artavoloTrigger",
      "typeVersion": 1,
      "position": [
        0,
        200
      ],
      "webhookId": "91fef55a-8718-5534-8407-d752a1cc3cce",
      "credentials": {
        "artavoloApi": {
          "id": "",
          "name": "Artavolo agent (review mode)"
        }
      }
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=A client sent this request to our firm. Answer with one word only: Low, Normal, High or Urgent.\nUrgent: something is broken for their customers now. High: it blocks their work this week. Normal: a change or a question. Low: nice to have.\n\nRequest: {{ $json.Request }}\nDetails: {{ $json.Details || $json.Description || '' }}"
      },
      "id": "c48e503b-c96e-57c5-a782-30a2176ebe42",
      "name": "Judge the priority",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "typeVersion": 1.5,
      "position": [
        260,
        200
      ]
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "gpt-4o-mini",
          "mode": "list",
          "cachedResultName": "gpt-4o-mini"
        },
        "options": {}
      },
      "id": "82d9678e-0a01-5d80-9982-35fd51adbdff",
      "name": "Chat model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        260,
        420
      ],
      "credentials": {
        "openAiApi": {
          "id": "",
          "name": "OpenAI"
        }
      }
    },
    {
      "parameters": {
        "resource": "record",
        "base": "",
        "table": "",
        "operation": "update",
        "recordId": "={{ $('New request').item.json.id }}",
        "fields": {
          "field": [
            {
              "name": "Priority",
              "value": "={{ ['Low','Normal','High','Urgent'].find(p => $json.text.toLowerCase().includes(p.toLowerCase())) || 'Normal' }}"
            }
          ]
        }
      },
      "id": "cd5b1470-5bc3-5ef4-b2d8-835a5505e093",
      "name": "Propose it for approval",
      "type": "n8n-nodes-artavolo.artavolo",
      "typeVersion": 1,
      "position": [
        600,
        200
      ],
      "credentials": {
        "artavoloApi": {
          "id": "",
          "name": "Artavolo agent (review mode)"
        }
      }
    }
  ],
  "connections": {
    "New request": {
      "main": [
        [
          {
            "node": "Judge the priority",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Judge the priority": {
      "main": [
        [
          {
            "node": "Propose it for approval",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Chat model": {
      "ai_languageModel": [
        [
          {
            "node": "Judge the priority",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "pinData": {},
  "meta": {
    "templateCredsSetupCompleted": false
  }
}
