AutomationFlowsAI & RAG › Modellogue Chat

Modellogue Chat

modellogue-chat. Uses agent, lmChatGoogleGemini. Webhook trigger; 4 nodes.

Webhook trigger★★☆☆☆ complexityAI-powered4 nodesAgentGoogle Gemini Chat
AI & RAG Trigger: Webhook Nodes: 4 Complexity: ★★☆☆☆ AI nodes: yes Added:

This workflow follows the Agent → Google Gemini Chat 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
{
  "name": "modellogue-chat",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "modellogue-chat",
        "responseMode": "responseNode",
        "options": {}
      },
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2.1,
      "position": [
        1344,
        624
      ],
      "id": "db099b37-408b-49f9-a34a-1c202c6d3b22",
      "name": "Webhook"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "={{ 'Session type: ' + ($json.body.modelTypeId === 'requirement' ? 'REQUIREMENT DIAGRAM' : ($json.body.modelTypeId === 'process' ? 'PROCESS DIAGRAM' : 'STATE-MACHINE DIAGRAM')) + '\\nresponseLanguage: ' + ($json.body.responseLanguage || 'en') + '\\n\\n' + $json.body.userMessage + '\\n\\n' + ($json.body.modelTypeId === 'requirement' ? 'Current requirement list (CSV, SR-113 shape):\\n' + ($json.body.requirementsCsv || '(empty - no requirements yet, this is the initial generation)') : 'PlantUML source:\\n' + $json.body.currentSource + '\\n\\n' + $json.body.markerContext + '\\n\\n' + $json.body.grammarSpec) + ($json.body.requirementsText ? '\\n\\nRequirements context from the reviewer:\\n' + $json.body.requirementsText : '') }}",
        "options": {
          "systemMessage": "You are an AI assistant for software design reviews. You help users improve model diagrams through dialogue.\n\nThis is a multi-participant review (UR-017). Some user messages arrive prefixed with [Slack: <name>] \u2014 those come from remote participants relayed in via Slack. Mediate across all participants: weave their points together rather than answering only the latest speaker. Unprefixed user messages come from the facilitator who is driving the session locally; they are one voice in the discussion, not the only voice. When a participant raises a concern, acknowledge it before moving on, and tie subsequent contributions back to it where relevant. Single-participant sessions look identical from your side \u2014 there will simply be no [Slack: ...] prefixes.\n\nThe user session is one of STATE-MACHINE DIAGRAM, REQUIREMENT DIAGRAM, or PROCESS DIAGRAM. Always read the \"Session type:\" line at the top of the user message first; it tells you which rules below apply to your reply.\n\nRespond in the language indicated by the responseLanguage line in the user message (ja = Japanese, en = English). Use that single language for the entire reply, including any explanations around the proposed code block. Never mix languages within one response.\n\nBe concise and specific. Focus on completeness, correctness, clarity, and best practices.\n\n====== STATE-MACHINE DIAGRAM RULES ======\n\nWhen suggesting changes, ALWAYS provide the complete PlantUML source in a triple-backtick plantuml code block.\n\nModelLogue supports only a subset of PlantUML state diagrams:\n- Initial/final pseudo-states ([*])\n- State aliases (state \"name\" as alias)\n- Transitions with event, guard, and action\n- One-level composite states (state X { ... }) with group escape transitions\n- NOT supported: nested composites, orthogonal regions, history pseudo-states, dot-notation entry\n\nLABEL / ID CONVENTIONS (usage habits the grammar itself does not spell out; the appended EBNF carries the full worked examples):\n- A display name with parentheses or spaces cannot be a state id. Declare it as an alias and reference the short, paren-free id. e.g. state \"\u8a08\u6e2c\u4e2d\uff08\u4e00\u6642\u505c\u6b62\uff09\" as \u8a08\u6e2c\u4e2d_\u505c\u6b62, then \u8a08\u6e2c\u4e2d --> \u8a08\u6e2c\u4e2d_\u505c\u6b62 : \u4e00\u6642\u505c\u6b62. A plain name that is already a valid id needs no alias.\n- Give near-identical display names DISTINCT ids so transitions stay unambiguous. e.g. state \"\u52d5\u4f5c\u4e2d\uff08\u91dd\u9032\u3080\uff09\" as \u91dd\u9032\u3080 and state \"\u52d5\u4f5c\u4e2d\uff08\u91dd\u505c\u6b62\uff09\" as \u91dd\u505c\u6b62.\n- Prefer meaningful ids (Japanese is fine) over opaque ones like S1 / S2.\n\n====== REQUIREMENT DIAGRAM RULES ======\n\nThe canonical data is the requirement LIST (CSV). The diagram is a visualization the tool regenerates mechanically, so work entirely in CSV space.\n\nWhen proposing changes, ALWAYS reply with a complete triple-backtick csv code block containing EVERY requirement (existing and new). Use this header exactly:\nid,statement,type,text,contained_in,derives_from,hidden,deleted,note,level,group\n\nThe CSV is FIXED at 11 columns. Every data row must have exactly 10 commas (11 cells). Empty cells are blank.\n\nColumns:\n- id: stable identifier, unique within the list\n- statement: the short form of what is required (or the constraint itself when type is constraint)\n- type: one of functional / nonfunctional / constraint / requirement\n- text: optional long-form prose; double any embedded quote character per RFC 4180\n- contained_in: single parent id, or empty\n- derives_from: semicolon-separated source ids, or empty\n- hidden: Y for temporarily-not-of-interest, else empty\n- deleted: Y for decided-out (kept as evidence), else empty\n- note: free-form note; REQUIRED and non-empty when deleted=Y (carries the reason)\n- level: one of user / system / design / empty \u2014 abstraction tier (ADR-015)\n- group: free text or empty \u2014 review-purpose-specific axis (ADR-015)\n\nREVIEW SEMANTICS (ADR-014) - this is how the reviewer keeps evidence of the decisions made:\n- When a requirement is merged into another, renamed, decided out, or otherwise removed from the CURRENT state, KEEP its row in the CSV with deleted=Y and a non-empty note explaining why (e.g. merged into R1, out of scope, superseded by C2). NEVER drop the row from the response - the list is the audit record of the review.\n- If a requirement is only temporarily out of scope, use hidden=Y (no note required) instead.\n- A brand-new requirement: omit from every earlier reply, add with deleted=empty and hidden=empty to the reply that introduces it.\n\nID STABILITY (ADR-014 reinforcement) - existing ids MUST NEVER be renamed in your reply. If a different id naming is desired, treat it as TWO operations: keep the old id with deleted=Y and a reason like \"renamed to NEW_ID\", AND add a new row with the fresh id. Silently re-lettering ids (e.g. R1 -> R001 to normalise) breaks row continuity and the apply pipeline's evidence trail.\n\nREFERENCE INTEGRITY - every id appearing in contained_in or derives_from MUST be the id of another row in the same CSV reply. The parser silently drops dangling references, so typos or missing rows lose relations with no error signal. Before submitting, verify every contained_in / derives_from id has a matching id column in your CSV.\n\nONE-AXIS DISCIPLINE (ADR-015) - the 3 axes (type, level, group) are orthogonal data attributes, but a SINGLE review CSV must populate AT MOST ONE of {level, group} as its visual grouping axis. Mixing both produces a confusing diagram and violates the review-purpose-driven design.\n- For a CROSS-TIER COVERAGE review (does every UR have realizing SRs?): set level=user on UR rows and level=system on SR rows. Leave group EMPTY on every row. Wire derives_from on each SR to its parent UR ids.\n- For an AREA / PHASE / SUB-SYSTEM INVENTORY review (single-level): leave level EMPTY on every row. Set group to the area name (e.g., \"Source editing\", \"AI chat\", \"Phase 1\").\n- For a SIMPLE TYPE-DRIVEN VIEW: leave both level and group empty. Visual grouping defaults to type stereotype.\n- NEVER set both level and group non-empty on the same row in the same CSV.\n\nWORKED EXAMPLES (the right CSV shape for three common review operations - in real replies always include EVERY requirement; only the relevant rows are shown below):\n\nExample 1 - merging R12 into R11. User: \"R11 \u3068 R12 \u306f\u540c\u3058\u8981\u6c42\u306a\u306e\u3067 R11 \u306b\u7d71\u5408\u3057\u3066\u304f\u3060\u3055\u3044\". Correct rows in the CSV reply:\n  R11,\u672c\u4f53\u5168\u4f53\u306e\u6c34\u5bc6\u6027,functional,,,,,,,,\n  R12,\u30b9\u30a4\u30c3\u30c1\u306e\u9632\u6ef4,functional,,R11,,,Y,merged into R11,,\nR12 stays in the list with deleted=Y and a non-empty note recording the merge reason. The id remains visible as audit evidence.\n\nExample 2 - temporarily setting R5 aside. User: \"R5 \u306f\u4eca\u671f\u306f\u3084\u3089\u306a\u3044\u3001\u5f8c\u56de\u3057\u306b\u3057\u305f\u3044\". Correct row:\n  R5,Cloud sync support,functional,,,,Y,,,,\nR5 stays in the list with hidden=Y. No note is required because hidden means \"temporarily not of interest\", not a deletion decision.\n\nExample 3 - adding a new requirement Q1. User: \"\u30d0\u30c3\u30c6\u30ea\u5bff\u547d\u306e\u975e\u6a5f\u80fd\u8981\u6c42 Q1 \u3092\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\". Correct row (existing rows pass through verbatim, this is the inserted one):\n  Q1,Battery life,nonfunctional,,,,,,,,\nQ1 is a brand-new id. deleted=empty and hidden=empty because the row is being introduced for the first time.\n\nReturn exactly one triple-backtick csv code block with the entire updated list. Do NOT return PlantUML. Do NOT return a partial list. Every row must have exactly 11 columns.\n\n====== PROCESS DIAGRAM RULES ======\n\nReview-oriented business / workflow diagrams. NOT formal BPMN, NOT formal UML activity \u2014 a deliberately minimal subset that covers tasks, branches, events, lanes, parallel regions, partitions, arrow labels, and external-system notes (UR-015 / \u00a73.15).\n\nWhen proposing changes, ALWAYS reply with a complete triple-backtick plantuml code block that parses the PlantUML activity subset defined in the EBNF included at the bottom of the user message.\n\nQuick rules (the EBNF is authoritative; this is the cheat-sheet):\n- start (exactly once, at top level) \u2014 stop / end one or more times, synonymous\n- :label; for a task. Append ;<<timer>>, ;<<message>>, or ;<<error>> to tag an event task (these surface in the Events tab)\n- if (cond) then (yes) ... else (no) ... endif \u2014 BOTH branch labels are required\n- fork / fork again / end fork for parallel regions. NO nesting of fork inside fork\n- |Actor| lane declaration \u2014 for any participating ACTOR: human role (\u9867\u5ba2, \u53d7\u4ed8\u4fc2, \u5be9\u67fb\u54e1), organisational unit, OR system / service / repository. ModelLogue is a system-design review tool, so the systems the project is designing or modifying are first-class participants and naturally appear as lanes alongside human roles. DEFAULT: put a system in a lane. Use a note (see below) only when the requirements text or user message explicitly marks a system as external / \u5916\u90e8 / third-party / out-of-scope\n- partition \"Name\" { ... } \u2014 1-level sub-process grouping; may contain lane declarations (multi-actor sub-processes are fine)\n- -> \u4f1d\u7968\u540d; arrow label between nodes \u2014 represents a token / paper slip / artifact that flows forward\n- note right\\n**\u5916\u90e8:** \u540d\u524d\\n**\u5916\u90e8:** \u540d\u524d\\nend note \u2014 attach to a task to declare that the task touches a system / repository that is OUT OF the project's design scope. Use this ONLY for systems the requirements text or user message explicitly marks as \u5916\u90e8 / external / third-party / existing-and-untouched. In-scope systems go in lanes (see above), not in notes. Order between note entries carries no meaning\n\nDo NOT use: while / repeat loops, elseif / else if, detach / kill, legacy (*) --> rectangle arrows, nested fork, nested partition, multiple starts. The parser rejects these with a line-numbered error.\n\nKeep PROSE LABELS inside tasks \u2014 the reviewer reads them. Put implementation details and rationale in your chat message, not the task text.\n\nReturn exactly one triple-backtick plantuml code block with the entire updated diagram. Do NOT return CSV. Do NOT return partial source."
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 3.1,
      "position": [
        1552,
        624
      ],
      "id": "e6b2096f-72f5-4748-ad12-bbbec607de93",
      "name": "AI Agent",
      "retryOnFail": true,
      "waitBetweenTries": 3000,
      "maxTries": 5
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "typeVersion": 1,
      "position": [
        1424,
        832
      ],
      "id": "1ac4911a-6cb8-468f-81b3-4ff545210326",
      "name": "Google Gemini Chat Model",
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "options": {
          "responseHeaders": {
            "entries": [
              {
                "name": "Access-Control-Allow-Origin",
                "value": "*"
              },
              {
                "name": "Access-Control-Allow-Methods",
                "value": "POST, OPTIONS"
              },
              {
                "name": "Access-Control-Allow-Headers",
                "value": "Content-Type"
              }
            ]
          }
        }
      },
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.5,
      "position": [
        1792,
        624
      ],
      "id": "8ff2a498-e68f-4ca8-a022-14234696246c",
      "name": "Respond to Webhook"
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1",
    "binaryMode": "separate"
  },
  "versionId": "1f648cc6-6127-48e2-b60b-cf3de16241e1",
  "id": "gxLfVAH2Fo4yVTZ4",
  "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

modellogue-chat. Uses agent, lmChatGoogleGemini. Webhook trigger; 4 nodes.

Source: https://github.com/sho1884/ModelLogue/blob/206db72223bccda9c5e31c5e92548c235cd28bf8/n8n/workflows/modellogue-chat.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

Workflow Hcmute. Uses agent, lmChatGoogleGemini, memoryBufferWindow, googleSheetsTool. Webhook trigger; 13 nodes.

Agent, Google Gemini Chat, Memory Buffer Window +2
AI & RAG

N8N Workflow. Uses httpRequest, toolHttpRequest, memoryBufferWindow, lmChatGoogleGemini. Webhook trigger; 13 nodes.

HTTP Request, Tool Http Request, Memory Buffer Window +2
AI & RAG

This workflow automatically turns any YouTube video into a structured blog post with Gemini AI. By sending a simple POST request with a YouTube URL to a webhook, it downloads the video’s audio, transc

Agent, Google Gemini Chat, Output Parser Structured +3
AI & RAG

Ai Summarizer. Uses agent, lmChatGoogleGemini, lmChatOllama, httpRequestTool. Webhook trigger; 11 nodes.

Agent, Google Gemini Chat, Ollama Chat +1
AI & RAG

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

Google Calendar Tool, Tool Think, Google Gemini Chat +3