AutomationFlowsAI & RAG › Manage Appian Tasks with Ollama Qwen LLM and Postgres Memory

Manage Appian Tasks with Ollama Qwen LLM and Postgres Memory

ByJoe Swink @dhawk on n8n.io

This workflow is a simple example of using n8n as an AI chat interface into Appian. It connects a local LLM, persistent memory, and API tools to demonstrate how an agent can interact with Appian tasks.

Chat trigger trigger★★★★☆ complexityAI-powered13 nodesChat TriggerAgentOllama ChatMemory Postgres ChatHTTP Request Tool
AI & RAG Trigger: Chat trigger Nodes: 13 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #7661 — we link there as the canonical source.

This workflow follows the Agent → Chat Trigger recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "nodes": [
    {
      "id": "template-vars-0001",
      "name": "Template Vars",
      "type": "n8n-nodes-base.set",
      "position": [
        480,
        704
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "a1",
              "name": "baseUrl",
              "type": "string",
              "value": "https://YOUR-APP-BASE/suite/webapi"
            },
            {
              "id": "a2",
              "name": "defaultBatchSize",
              "type": "number",
              "value": "10"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "chat-trigger-0001",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        672,
        624
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1.1
    },
    {
      "id": "webhook-0001",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        672,
        832
      ],
      "parameters": {
        "path": "your-webhook-path",
        "options": {},
        "httpMethod": "POST",
        "responseMode": "responseNode",
        "authentication": "headerAuth"
      },
      "typeVersion": 2
    },
    {
      "id": "set-normalize-0001",
      "name": "Normalize Chat Input",
      "type": "n8n-nodes-base.set",
      "position": [
        976,
        704
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "set-chatInput",
              "name": "chatInput",
              "type": "string",
              "value": "={{  $json?.body?.text || $json?.chatInput || $json.body?.chatInput }}"
            },
            {
              "id": "set-sessionId",
              "name": "sessionId",
              "type": "string",
              "value": "={{ $json?.body?.conversation?.id || $json?.sessionId || $json.body?.sessionId}}"
            },
            {
              "id": "set-username",
              "name": "username",
              "type": "string",
              "value": "={{ $json?.body?.user || $json?.username || 'user@example.com' }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "agent-0001",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1360,
        704
      ],
      "parameters": {
        "options": {
          "maxIterations": 15,
          "systemMessage": "You are a helpful assistant that can list and create Appian tasks using the provided tools. Keep responses concise and format dates as 'mmmm d, yyyy'.",
          "returnIntermediateSteps": true
        }
      },
      "typeVersion": 1.6
    },
    {
      "id": "ollama-llm-0001",
      "name": "Ollama Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOllama",
      "position": [
        1152,
        928
      ],
      "parameters": {
        "model": "qwen2.5:7b",
        "options": {
          "numCtx": 8147
        }
      },
      "typeVersion": 1
    },
    {
      "id": "pg-memory-0001",
      "name": "Postgres Chat Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryPostgresChat",
      "position": [
        1360,
        928
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "tool-list-tasks-0001",
      "name": "List Tasks (Appian)",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        1600,
        928
      ],
      "parameters": {
        "url": "={{ $('Template Vars').item.json.baseUrl }}/tasks",
        "options": {},
        "sendQuery": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "oAuth2Api",
        "queryParameters": {
          "parameters": [
            {
              "name": "username",
              "value": "={{ $('Normalize Chat Input').item.json.username }}"
            },
            {
              "name": "startIndex",
              "value": "={{ parseInt($fromAI('parameters1_Value', 'First result index, default 1', 'string')) || 1 }}"
            },
            {
              "name": "batchSize",
              "value": "={{ parseInt($('Template Vars').item.json.defaultBatchSize) || 10 }}"
            }
          ]
        },
        "toolDescription": "List all user tasks. Use startIndex and batchSize to page the results."
      },
      "typeVersion": 4.2
    },
    {
      "id": "tool-list-types-0001",
      "name": "List Task Types (Appian)",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        1808,
        928
      ],
      "parameters": {
        "url": "={{ $('Template Vars').item.json.baseUrl }}/tasktypes",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "oAuth2Api",
        "toolDescription": "Lists all of the available task types."
      },
      "typeVersion": 4.2
    },
    {
      "id": "tool-create-task-YOUR_OPENAI_KEY_HERE",
      "name": "Create Task (Appian)",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        2032,
        928
      ],
      "parameters": {
        "url": "={{ $('Template Vars').item.json.baseUrl }}/tasks",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "username",
              "value": "={{ $('Normalize Chat Input').item.json.username }}"
            },
            {
              "name": "title",
              "value": "={{ $fromAI('parameters1_Value', 'Short task title', 'string') }}"
            },
            {
              "name": "description",
              "value": "={{ $fromAI('parameters2_Value', 'Detailed task description', 'string') }}"
            },
            {
              "name": "estimatedHours",
              "value": "={{ $fromAI('parameters3_Value', 'Estimated hours (optional)', 'string') }}"
            },
            {
              "name": "estimatedCost",
              "value": "={{ $fromAI('parameters4_Value', 'Estimated cost (optional)', 'string') }}"
            }
          ]
        },
        "genericAuthType": "oAuth2Api",
        "toolDescription": "Creates a new task. Execute only once per task."
      },
      "typeVersion": 4.2
    },
    {
      "id": "set-output-0001",
      "name": "Prepare Response",
      "type": "n8n-nodes-base.set",
      "position": [
        1808,
        704
      ],
      "parameters": {
        "options": {
          "dotNotation": true
        },
        "assignments": {
          "assignments": [
            {
              "id": "set-output",
              "name": "output",
              "type": "string",
              "value": "={{ $json.output }}"
            },
            {
              "id": "set-sessionId-out",
              "name": "sessionId",
              "type": "string",
              "value": "={{ $('Normalize Chat Input').item.json.sessionId }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "respond-0001",
      "name": "Respond to Webhook",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        2048,
        704
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1.3
    },
    {
      "id": "note-0001",
      "name": "Notes",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        560,
        520
      ],
      "parameters": {
        "width": 900,
        "height": 420,
        "content": "Appian Tasks Chat Agent\nThis template shows a local AI chat agent that lists and creates tasks via an Appian-compatible API. Configure Template Vars and attach your own credentials after import."
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "Normalize Chat Input",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Prepare Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Response": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Ollama Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "List Tasks (Appian)": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Create Task (Appian)": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Normalize Chat Input": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Postgres Chat Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "List Task Types (Appian)": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "Normalize Chat Input",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This workflow is a simple example of using n8n as an AI chat interface into Appian. It connects a local LLM, persistent memory, and API tools to demonstrate how an agent can interact with Appian tasks.

Source: https://n8n.io/workflows/7661/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

This workflow contains community nodes that are only compatible with the self-hosted version of n8n.

Google Gemini Chat, HTTP Request Tool, Chat Trigger +8
AI & RAG

Open WebUI Agent with Web Search. Uses memoryPostgresChat, chatTrigger, agent, executeWorkflowTrigger. Chat trigger; 22 nodes.

Memory Postgres Chat, Chat Trigger, Agent +5
AI & RAG

Power BI Data Analyst Agent. Uses stickyNote, chatTrigger, agent, lmChatOpenRouter. Chat trigger; 12 nodes.

Chat Trigger, Agent, OpenRouter Chat +4
AI & RAG

Orquestador Normativa. Uses chatTrigger, textClassifier, lmChatOllama, agent. Chat trigger; 12 nodes.

Chat Trigger, Text Classifier, Ollama Chat +3
AI & RAG

Automate Google Classroom via the Google Classroom API to efficiently manage courses, topics, teachers, students, announcements, and coursework.

Chat Trigger, Agent Tool, HTTP Request Tool +3