AutomationFlowsAI & RAG › Kangaroo Ps

Kangaroo Ps

Kangaroo_PS. Uses chatTrigger, postgres, agent, lmChatGoogleGemini. Chat trigger; 20 nodes.

Chat trigger trigger★★★★☆ complexityAI-powered20 nodesChat TriggerPostgresAgentGoogle Gemini ChatMemory Postgres ChatPostgres ToolTool WorkflowHTTP Request
AI & RAG Trigger: Chat trigger Nodes: 20 Complexity: ★★★★☆ AI nodes: yes Added:

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
{
  "updatedAt": "2026-01-19T13:50:52.000Z",
  "createdAt": "2025-10-08T06:28:17.446Z",
  "id": "DhIfpjU1ES2ggVxM",
  "name": "Kangaroo_PS",
  "active": false,
  "isArchived": false,
  "nodes": [
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "typeVersion": 1.3,
      "position": [
        -672,
        32
      ],
      "id": "b9f8323b-320f-4dfb-a41c-6700a52291ac",
      "name": "When chat message received"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "bb9da850-95b3-4f8b-abbf-8679e75ca3f0",
              "leftValue": "={{ $json }}",
              "rightValue": "",
              "operator": {
                "type": "object",
                "operation": "empty",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        96,
        32
      ],
      "id": "6ad599ea-def6-435b-a420-8858b6814e1f",
      "name": "If"
    },
    {
      "parameters": {
        "operation": "select",
        "schema": {
          "__rl": true,
          "value": "public",
          "mode": "list",
          "cachedResultName": "public"
        },
        "table": {
          "__rl": true,
          "value": "kangaroo_states",
          "mode": "list",
          "cachedResultName": "kangaroo_states"
        },
        "limit": 1,
        "where": {
          "values": [
            {
              "column": "session_id",
              "value": "={{ $('When chat message received').item.json.sessionId }}"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.postgres",
      "typeVersion": 2.6,
      "position": [
        -112,
        32
      ],
      "id": "6eff82b6-da45-43f1-9978-94d4427180e2",
      "name": "Check State",
      "alwaysOutputData": true,
      "credentials": {
        "postgres": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "schema": {
          "__rl": true,
          "value": "public",
          "mode": "list",
          "cachedResultName": "public"
        },
        "table": {
          "__rl": true,
          "value": "kangaroo_states",
          "mode": "list",
          "cachedResultName": "kangaroo_states"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "session_id": "={{ $('When chat message received').item.json.sessionId }}",
            "state": "={\n  \"is_workflow_created\":false,\n  \"workflow_id\": null,\n  \"folder\":{\n    \"is_required\":true,\n    \"label\":\"Workflow Folder\",\n    \"id\":null,\n    \"name\": null,\n    \"field_type\":\"dropdown\",\n    \"sort_order\":1\n  },\n  \"agency\":{\n    \"is_required\":true,\n    \"label\":\"Agency\",\n    \"id\":\"{{ $('Agency').item.json.id }}\",\n    \"name\": \"{{ $('Agency').item.json.agencyName }}\",\n    \"field_type\":\"dropdown\",\n    \"sort_order\":2\n  },\n  \"name\":{\n    \"is_required\":true,\n    \"label\":\"Workflow Name\",\n    \"name\": null,\n    \"field_type\":\"text\",\n    \"sort_order\":3\n  },\n  \"category\":{\n    \"is_required\":true,\n    \"label\":\"Trigger Category\",\n    \"id\":null,\n    \"name\": null,\n    \"field_type\":\"dropdown\",\n    \"sort_order\":4\n  },\n  \"type\": {\n    \"is_required\":true,\n    \"label\":\"Trigger Type\",\n    \"id\":null,\n    \"name\": null,\n    \"field_type\":\"dropdown\",\n    \"sort_order\":5\n  }\n}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "session_id",
              "displayName": "session_id",
              "required": true,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "state",
              "displayName": "state",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "object",
              "canBeUsedToMatch": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.postgres",
      "typeVersion": 2.6,
      "position": [
        304,
        -48
      ],
      "id": "4c8fc8f7-1262-462f-804a-6cc029ba6aba",
      "name": "Add State",
      "alwaysOutputData": true,
      "credentials": {
        "postgres": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "3c8fe0a2-296e-40eb-a112-6d15ddbbacf8",
              "name": "token",
              "value": "={{ $('Token').item.json.token }}",
              "type": "string"
            },
            {
              "id": "9933965a-3d38-45bb-9c7b-2ff62c928654",
              "name": "userId",
              "value": "={{ $('Token').item.json.userId }}",
              "type": "string"
            },
            {
              "id": "1e4feaa9-8c25-49d1-bb71-bd2a98265a0d",
              "name": "agencyId",
              "value": "={{ $('Agency').item.json.id }}",
              "type": "string"
            },
            {
              "id": "f7433a0e-a025-4c38-9c80-ac82654f1869",
              "name": "workflow_state",
              "value": "={{ $('Code').item.json.state }}",
              "type": "object"
            },
            {
              "id": "6e1f8601-4a82-4d8f-97c2-965a9bbe360e",
              "name": "sessionId",
              "value": "={{ $('Code').item.json.session_id }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        704,
        32
      ],
      "id": "424b16c5-3e7c-447d-9f55-9a4d4eec4d14",
      "name": "State"
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "position": [
        304,
        128
      ],
      "id": "0e5abed7-23ac-4001-9193-faa8a5f4af82",
      "name": "No Operation, do nothing"
    },
    {
      "parameters": {
        "jsCode": "let isAlreadyExist = $(\"Check State\").first().json;\nif(isAlreadyExist && Object.keys(isAlreadyExist).length > 0){\n  return isAlreadyExist;\n}\n\nreturn {\n  session_id:$('Add State').first().json.session_id,\n  state: $('Add State').first().json.state\n}"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        528,
        32
      ],
      "id": "f3dd1a26-450b-46df-a081-e5a9306bce66",
      "name": "Code"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=user message is:\"{{ $('When chat message received').item.json.chatInput }}\"\ncurrent state of the collected data in the form is(state of workflow):{{ JSON.stringify($('State').item.json.workflow_state) }}",
        "options": {
          "systemMessage": "=You are a workflow creater agent. who has capabilities to find data for workflow using tools based on the user request and collect all information required to create a workflow. after collecting all required data confirm all informatioon from user by showing preview of the collected information as Human Language\n##Instructions:\n1. Do not show uuid or technical formated data in preview.\n2. Always reply in human like language for non technical user.\n3. Always refer the field by label name.\n4. MUST updated the form field after fixed by user or got most appropriet one.\n\nfields sequence depend on \"sort_order\" key. collect data in that order\n\nbased on this 2 field's data, next form get changed.\n\nspecial tools and usecase:\n1. \"Reset the state of workflow\" tool: Only call when user want to create new workflow if state is already filled or partially fill. still user request to reset the state/form\n2. \"Update Workflow state\" tool: after confirmation of every filled update the state of the workflow to update for persistance\n3. \"Get Data:*\": use \"Get Data:*\" tools to get available real data in the system. always get data from this available tool. do not guess any data.\ne.g. \"Get Data: Workflow Folder\"",
          "maxIterations": 20
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 2.2,
      "position": [
        912,
        32
      ],
      "id": "c507a5fc-6869-4e6b-99cf-fd90841aebd9",
      "name": "AI Agent"
    },
    {
      "parameters": {
        "options": {
          "maxOutputTokens": 1500,
          "temperature": 0
        }
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "typeVersion": 1,
      "position": [
        576,
        416
      ],
      "id": "fc7f6cb5-5c9e-430c-9509-f5d6111009e7",
      "name": "Google Gemini Chat Model",
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "sessionIdType": "customKey",
        "sessionKey": "={{ $('State').item.json.sessionId }}",
        "tableName": "kangaroo_chat_history_for_workflow_agent",
        "contextWindowLength": 2
      },
      "type": "@n8n/n8n-nodes-langchain.memoryPostgresChat",
      "typeVersion": 1.3,
      "position": [
        720,
        416
      ],
      "id": "a5d1ebd0-9d1b-4f63-bce3-aa63aed84991",
      "name": "Postgres Chat Memory",
      "credentials": {
        "postgres": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "descriptionType": "manual",
        "toolDescription": "Call this to Reset the state of workflow",
        "operation": "update",
        "schema": {
          "__rl": true,
          "value": "public",
          "mode": "list",
          "cachedResultName": "public"
        },
        "table": {
          "__rl": true,
          "value": "kangaroo_states",
          "mode": "list",
          "cachedResultName": "kangaroo_states"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "session_id": "={{ $json.sessionId }}",
            "state": "={\n  \"is_workflow_created\":false,\n  \"workflow_id\": null,\n  \"folder\":{\n    \"is_required\":true,\n    \"label\":\"Workflow Folder\",\n    \"id\":null,\n    \"name\": null,\n    \"field_type\":\"dropdown\",\n    \"sort_order\":1\n  },\n  \"agency\":{\n    \"is_required\":true,\n    \"label\":\"Agency\",\n    \"id\":\"{{ $('Agency').item.json.id }}\",\n    \"name\": \"{{ $('Agency').item.json.agencyName }}\",\n    \"field_type\":\"dropdown\",\n    \"sort_order\":2\n  },\n  \"name\":{\n    \"is_required\":true,\n    \"label\":\"Workflow Name\",\n    \"name\": null,\n    \"field_type\":\"text\",\n    \"sort_order\":3\n  },\n  \"category\":{\n    \"is_required\":true,\n    \"label\":\"Trigger Category\",\n    \"id\":null,\n    \"name\": null,\n    \"field_type\":\"dropdown\",\n    \"sort_order\":4\n  },\n  \"type\": {\n    \"is_required\":true,\n    \"label\":\"Trigger Type\",\n    \"id\":null,\n    \"name\": null,\n    \"field_type\":\"dropdown\",\n    \"sort_order\":5\n  }\n}"
          },
          "matchingColumns": [
            "session_id"
          ],
          "schema": [
            {
              "id": "session_id",
              "displayName": "session_id",
              "required": true,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "state",
              "displayName": "state",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "object",
              "canBeUsedToMatch": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.postgresTool",
      "typeVersion": 2.6,
      "position": [
        880,
        416
      ],
      "id": "8abc3dfb-cd76-47ec-bb4e-acf7ed87d267",
      "name": "Reset the state of workflow",
      "credentials": {
        "postgres": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "description": "Call this tool to update the workflow state by field_name and value to update\n(id,name)",
        "workflowId": {
          "__rl": true,
          "value": "W4BhDeYpRsEhMCbF",
          "mode": "list",
          "cachedResultName": "Kanagaroo_Update State of the workflow creater_PS"
        },
        "workflowInputs": {
          "mappingMode": "defineBelow",
          "value": {
            "id": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('id', `its a uuid for dropdown and null for text fields and for multiple selection dropdown keep comma separated names\ne.g \"uuid1,uuid2,uuid3\"`, 'string') }}",
            "fieldName": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('fieldName', `either of the \"folder\", \"name\", \"category\", \"type\", \"condition\", \"include_tags\", \"exclude_tags\"`, 'string') }}",
            "sessionId": "={{ $json.sessionId }}",
            "name": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('name', `its a name of the selected records for this field. or filled context for this field.\nif its multiple selection dropdown then keep comma separated names\ne.g \"name1,name2,name3\"\n\n##important\nif there are two name with same text then repeat them if they have different ids.`, 'string') }}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "id",
              "displayName": "id",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "canBeUsedToMatch": true,
              "type": "string",
              "removed": false
            },
            {
              "id": "name",
              "displayName": "name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "canBeUsedToMatch": true,
              "type": "string",
              "removed": false
            },
            {
              "id": "fieldName",
              "displayName": "fieldName",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "canBeUsedToMatch": true,
              "type": "string",
              "removed": false
            },
            {
              "id": "sessionId",
              "displayName": "sessionId",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "canBeUsedToMatch": true,
              "type": "string",
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        }
      },
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "typeVersion": 2.2,
      "position": [
        1040,
        416
      ],
      "id": "5b728fc7-cd7b-4476-b702-ecd29b339a60",
      "name": "Update Workflow state"
    },
    {
      "parameters": {
        "description": "Call this to get the list of all Workflow folder available in the system.\nthis will return list of object {id,name}\nwhere \nid : is a unique identifier for the folder\nname: name of the folder",
        "workflowId": {
          "__rl": true,
          "value": "wu2efIgQUmdvfSTA",
          "mode": "list",
          "cachedResultName": "Kangaroo_Get Workflow Folder Data_PS"
        },
        "workflowInputs": {
          "mappingMode": "defineBelow",
          "value": {
            "token": "={{ $json.token }}",
            "userId": "={{ $json.userId }}",
            "agencyId": "={{ $('State').item.json.agencyId }}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "agencyId",
              "displayName": "agencyId",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "canBeUsedToMatch": true,
              "type": "string",
              "removed": false
            },
            {
              "id": "token",
              "displayName": "token",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "canBeUsedToMatch": true,
              "type": "string",
              "removed": false
            },
            {
              "id": "userId",
              "displayName": "userId",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "canBeUsedToMatch": true,
              "type": "string",
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        }
      },
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "typeVersion": 2.2,
      "position": [
        1200,
        416
      ],
      "id": "0fe21184-dc84-4e0a-b7b9-cab6ea69cd79",
      "name": "Get Data: Workflow Folder"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://kangarooapi.vskyapplications.com/auth/login",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "{\n  \"username\": \"Admin\",\n  \"password\": \"Password@123\"\n}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        -480,
        32
      ],
      "id": "e559c583-458c-40dd-a6b8-c116053fa710",
      "name": "Token"
    },
    {
      "parameters": {
        "url": "https://kangarooapi.vskyapplications.com/ams-system/agency/64849a38-d084-4c22-ae11-252fbf4c8747",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Bearer {{ $('Token').item.json.token }}"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        -304,
        32
      ],
      "id": "97ca6879-1773-45fc-bf04-d8ae91f21f3d",
      "name": "Agency"
    },
    {
      "parameters": {
        "toolDescription": "Call this tool to get all Trigger Categories.\nIt fetches the list of available trigger categories and returns in structured JSON Format.\n\nArgs: None\n\nReturns:\nA JSON array of objects, where each object includes:\n  \u00a0\u00a0id (str): Unique identifier of the trigger category.\n\u00a0\u00a0\u00a0\u00a0name (str): Name of the trigger category.\n  \n",
        "url": "https://kangarooapi.vskyapplications.com/triggers/categories",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Bearer {{ $('State').item.json.token }}"
            }
          ]
        },
        "options": {},
        "optimizeResponse": true,
        "fieldsToInclude": "selected",
        "fields": "id,name"
      },
      "type": "n8n-nodes-base.httpRequestTool",
      "typeVersion": 4.2,
      "position": [
        1376,
        416
      ],
      "id": "b204c83f-850c-4ff3-8825-ebe2dfd79f05",
      "name": "Get Data: Trigger Category"
    },
    {
      "parameters": {
        "toolDescription": "Call this tool when the user wants Trigger Types.\nIt retrieves all available trigger types and returns them as a structured JSON list.\n\nArgs: None\n\nReturns:\nA JSON array of objects, where each object includes:\n  \u00a0\u00a0id (str): Unique identifier of the trigger category.\n\u00a0\u00a0\u00a0\u00a0name (str): Name of the trigger category.",
        "url": "https://kangarooapi.vskyapplications.com/triggers/types",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Bearer {{ $('State').item.json.token }}"
            }
          ]
        },
        "options": {},
        "optimizeResponse": true,
        "fieldsToInclude": "selected",
        "fields": "id,name"
      },
      "type": "n8n-nodes-base.httpRequestTool",
      "typeVersion": 4.2,
      "position": [
        1552,
        416
      ],
      "id": "9ffef02d-06af-49c8-b23d-ec4314cb7615",
      "name": "Get Data: Trigger Type"
    },
    {
      "parameters": {
        "toolDescription": "=Call this tool to get all Trigger Type conditions for a selected trigger category and trigger type.\nIt fetches the list of conditions associated with the specified trigger type under the given trigger category and returns them in a structured JSON format.\n\nArgs:\n\u00a0\u00a0categoryId (str): The trigger category id selected by the user.\n\u00a0\u00a0typeId (str): The trigger type id for which conditions need to be fetched.\n\nReturns:\n\u00a0\u00a0A JSON array of condition objects, where each object may include:\n\u00a0\u00a0\u00a0\u00a0\u2022 id (str): Unique identifier of the condition.\n\u00a0\u00a0\u00a0\u00a0\u2022 name (str): Display name of the condition.",
        "url": "https://kangarooapi.vskyapplications.com/triggers/types-conditions",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "TriggerCategoriesId",
              "value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('parameters0_Value', `This is trigger category id for selected trigger category`, 'string') }}"
            },
            {
              "name": "triggerTypeId",
              "value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('parameters1_Value', `This is trigger type id for selected trigger type`, 'string') }}"
            }
          ]
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Bearer {{ $('State').item.json.token }}"
            }
          ]
        },
        "options": {},
        "optimizeResponse": true,
        "fieldsToInclude": "selected",
        "fields": "id,name"
      },
      "type": "n8n-nodes-base.httpRequestTool",
      "typeVersion": 4.2,
      "position": [
        1728,
        416
      ],
      "id": "4d136a18-c619-4a1a-aa96-9df0ce4b32f4",
      "name": "Get Data: Condition"
    },
    {
      "parameters": {
        "toolDescription": "=Call this tool to get the list of tags that should apply to clients.\nIt retrieves all tags that are applicable for clients and returns them in a structured JSON format.\n\nArgs: None\n\nReturns:\n\u00a0\u00a0A JSON array of tag objects, where each object may include:\n\u00a0\u00a0\u00a0\u00a0id (str): Unique identifier of the tag.\n\u00a0\u00a0\u00a0\u00a0name (str): Name of the tag.",
        "method": "POST",
        "url": "=https://kangarooapi.vskyapplications.com/GHL-tags/dropdown-list",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Bearer {{ $json.token }}"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequestTool",
      "typeVersion": 4.2,
      "position": [
        1904,
        416
      ],
      "id": "02299fa7-cf1f-45a4-b99d-ab44abdd773a",
      "name": "Get Data: Include/Exclude Tags"
    },
    {
      "parameters": {
        "workflowId": {
          "__rl": true,
          "value": "p1cAfBkJRXrHHxQr",
          "mode": "list",
          "cachedResultName": "Kangaroo_Sumit_workflow"
        },
        "workflowInputs": {
          "mappingMode": "defineBelow",
          "value": {
            "userId": "={{ $json.userId }}",
            "token": "={{ $json.token }}",
            "agencyId": "={{ $json.agencyId }}",
            "should_submit": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('should_submit', `true if confirmed to submit else false`, 'boolean') }}",
            "sessionId": "={{ $json.sessionId }}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "userId",
              "displayName": "userId",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "canBeUsedToMatch": true,
              "type": "string",
              "removed": false
            },
            {
              "id": "token",
              "displayName": "token",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "canBeUsedToMatch": true,
              "type": "string",
              "removed": false
            },
            {
              "id": "agencyId",
              "displayName": "agencyId",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "canBeUsedToMatch": true,
              "type": "string",
              "removed": false
            },
            {
              "id": "should_submit",
              "displayName": "should_submit",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "canBeUsedToMatch": true,
              "type": "boolean",
              "removed": false
            },
            {
              "id": "sessionId",
              "displayName": "sessionId",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "canBeUsedToMatch": true,
              "type": "string",
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        }
      },
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "typeVersion": 2.2,
      "position": [
        2064,
        400
      ],
      "id": "85dcb397-2631-4283-88f7-bfa530a76e4f",
      "name": "Submit Workflow"
    }
  ],
  "connections": {
    "When chat message received": {
      "main": [
        [
          {
            "node": "Token",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If": {
      "main": [
        [
          {
            "node": "Add State",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "No Operation, do nothing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check State": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "State": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add State": {
      "main": [
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "No Operation, do nothing": {
      "main": [
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code": {
      "main": [
        [
          {
            "node": "State",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Postgres Chat Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Reset the state of workflow": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Update Workflow state": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get Data: Workflow Folder": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Token": {
      "main": [
        [
          {
            "node": "Agency",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Agency": {
      "main": [
        [
          {
            "node": "Check State",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Data: Trigger Category": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get Data: Trigger Type": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get Data: Condition": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get Data: Include/Exclude Tags": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Submit Workflow": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "staticData": null,
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "versionId": "45827aad-7fc0-4151-8ca6-ca912e70e8da",
  "activeVersionId": null,
  "triggerCount": 1,
  "shared": [
    {
      "updatedAt": "2025-10-08T06:28:17.451Z",
      "createdAt": "2025-10-08T06:28:17.451Z",
      "role": "workflow:owner",
      "workflowId": "DhIfpjU1ES2ggVxM",
      "projectId": "jYp8xiWttkK2cWvC"
    }
  ],
  "activeVersion": null,
  "tags": []
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

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

About this workflow

Kangaroo_PS. Uses chatTrigger, postgres, agent, lmChatGoogleGemini. Chat trigger; 20 nodes.

Source: https://github.com/PrasadRSawant/n8n.prasadsawant.com-backup/blob/049e35f3e5a61b70680a97ef54fd88f64dbe8051/workflows/Kangaroo_PS.json — 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

✨📊Multi-AI Agent Chatbot for Postgres/Supabase DB and QuickCharts + Tool Router. Uses chatTrigger, postgresTool, executeWorkflowTrigger, toolWorkflow. Chat trigger; 40 nodes.

Chat Trigger, Postgres Tool, Execute Workflow Trigger +6
AI & RAG

This workflow is ideal for data analysts, developers, and business intelligence teams who need an AI-powered chatbot to query Postgres/Supabase databases and generate dynamic charts for data visualiza

Chat Trigger, Postgres Tool, Execute Workflow Trigger +6
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

CLINICAINTEGRAL_secretary. Uses postgres, mcpClientTool, googleDriveTool, toolWorkflow. Webhook trigger; 89 nodes.

Postgres, Mcp Client Tool, Google Drive Tool +14
AI & RAG

Remi 1.1. Uses lmChatOpenAi, memoryPostgresChat, openAi, postgres. Webhook trigger; 89 nodes.

OpenAI Chat, Memory Postgres Chat, OpenAI +7