AutomationFlowsAI & RAG › Chat Question Suggestions

Chat Question Suggestions

Chat Question Suggestions. Uses agent, lmChatOpenAi, supabase. Webhook trigger; 6 nodes.

Webhook trigger★★★★☆ complexityAI-powered6 nodesAgentOpenAI ChatSupabase
AI & RAG Trigger: Webhook Nodes: 6 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow follows the Agent → OpenAI 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
{
  "updatedAt": "2026-01-09T23:29:50.636Z",
  "createdAt": "2026-01-08T22:54:43.062Z",
  "id": "DqqdIlm1EQ5zrDAmf6vUr",
  "name": "Chat Question Suggestions",
  "active": true,
  "isArchived": false,
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "chat_suggestions_v1",
        "responseMode": "responseNode",
        "options": {}
      },
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2.1,
      "position": [
        0,
        0
      ],
      "id": "081b9f9f-001e-4258-b1bd-f9cdfa055a86",
      "name": "Webhook"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "7bdf57f2-c6ca-43ca-a584-60495cf70e2d",
              "name": "book_id",
              "value": "={{ $json.body.book_id }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        224,
        0
      ],
      "id": "601249ff-3af0-4eb2-942b-2c689bf9d9ec",
      "name": "Edit Fields"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=book title: {{ $json.title }}\n\nsummary: {{ $json.summary }}",
        "options": {
          "systemMessage": "You are an executive thinking partner.\n\nYour only input is a book title and summary.\n\nBased solely on the implications, themes, and promises suggested by the title and summary, generate 2\u20133 sharp questions that a high-performing individual would naturally ask. \n\nAssume the reader is:\n- Experienced\n- Time-constrained\n- Focused on leverage, clarity, and outcomes\n\nYour questions must:\n- Be short, direct, and high-signal\n\n\nDo NOT:\n- Explain the questions\n- Add preamble or commentary\n\nOutput format:\nReturn ONLY a JSON array of strings.\n\nExample output:\n[\n  \"What is meant by [key phrase in book title]?\",\n  \"What are the key takeaways from this book?\",\n  \"Where  could I apply the principles to my business?\"\n]\n"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 3.1,
      "position": [
        720,
        0
      ],
      "id": "636964a3-919b-4df1-901e-bc84cae75f1f",
      "name": "AI Agent"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "builtInTools": {},
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.3,
      "position": [
        592,
        272
      ],
      "id": "de93df62-5b78-4bbd-b32f-dd19c06a3f0b",
      "name": "OpenAI",
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.5,
      "position": [
        1072,
        0
      ],
      "id": "18a6401a-7273-4240-b00a-bd9d7043a7dd",
      "name": "Respond to Webhook"
    },
    {
      "parameters": {
        "operation": "get",
        "tableId": "books",
        "filters": {
          "conditions": [
            {
              "keyName": "id",
              "keyValue": "={{ $json.book_id }}"
            }
          ]
        }
      },
      "type": "n8n-nodes-base.supabase",
      "typeVersion": 1,
      "position": [
        432,
        0
      ],
      "id": "26b87b21-9b21-4899-8694-8765ba5695f6",
      "name": "Get a row",
      "credentials": {
        "supabaseApi": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Get a row",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get a row": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1",
    "availableInMCP": false
  },
  "staticData": null,
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "versionId": "0b13d81a-ddb4-491b-951c-3618cd333ada",
  "activeVersionId": "0b13d81a-ddb4-491b-951c-3618cd333ada",
  "triggerCount": 1,
  "shared": [
    {
      "updatedAt": "2026-01-08T22:54:43.070Z",
      "createdAt": "2026-01-08T22:54:43.070Z",
      "role": "workflow:owner",
      "workflowId": "DqqdIlm1EQ5zrDAmf6vUr",
      "projectId": "B7QJE85HA2Vij1it"
    }
  ],
  "activeVersion": {
    "updatedAt": "2026-01-09T23:29:53.000Z",
    "createdAt": "2026-01-09T23:29:50.637Z",
    "versionId": "0b13d81a-ddb4-491b-951c-3618cd333ada",
    "workflowId": "DqqdIlm1EQ5zrDAmf6vUr",
    "nodes": [
      {
        "parameters": {
          "httpMethod": "POST",
          "path": "chat_suggestions_v1",
          "responseMode": "responseNode",
          "options": {}
        },
        "type": "n8n-nodes-base.webhook",
        "typeVersion": 2.1,
        "position": [
          0,
          0
        ],
        "id": "081b9f9f-001e-4258-b1bd-f9cdfa055a86",
        "name": "Webhook",
        "webhookId": "d2e1a603-b459-4324-86c1-69c2c3d75c2d"
      },
      {
        "parameters": {
          "assignments": {
            "assignments": [
              {
                "id": "7bdf57f2-c6ca-43ca-a584-60495cf70e2d",
                "name": "book_id",
                "value": "={{ $json.body.book_id }}",
                "type": "string"
              }
            ]
          },
          "options": {}
        },
        "type": "n8n-nodes-base.set",
        "typeVersion": 3.4,
        "position": [
          224,
          0
        ],
        "id": "601249ff-3af0-4eb2-942b-2c689bf9d9ec",
        "name": "Edit Fields"
      },
      {
        "parameters": {
          "promptType": "define",
          "text": "=book title: {{ $json.title }}\n\nsummary: {{ $json.summary }}",
          "options": {
            "systemMessage": "You are an executive thinking partner.\n\nYour only input is a book title and summary.\n\nBased solely on the implications, themes, and promises suggested by the title and summary, generate 2\u20133 sharp questions that a high-performing individual would naturally ask. \n\nAssume the reader is:\n- Experienced\n- Time-constrained\n- Focused on leverage, clarity, and outcomes\n\nYour questions must:\n- Be short, direct, and high-signal\n\n\nDo NOT:\n- Explain the questions\n- Add preamble or commentary\n\nOutput format:\nReturn ONLY a JSON array of strings.\n\nExample output:\n[\n  \"What is meant by [key phrase in book title]?\",\n  \"What are the key takeaways from this book?\",\n  \"Where  could I apply the principles to my business?\"\n]\n"
          }
        },
        "type": "@n8n/n8n-nodes-langchain.agent",
        "typeVersion": 3.1,
        "position": [
          720,
          0
        ],
        "id": "636964a3-919b-4df1-901e-bc84cae75f1f",
        "name": "AI Agent"
      },
      {
        "parameters": {
          "model": {
            "__rl": true,
            "mode": "list",
            "value": "gpt-4.1-mini"
          },
          "builtInTools": {},
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
        "typeVersion": 1.3,
        "position": [
          592,
          272
        ],
        "id": "de93df62-5b78-4bbd-b32f-dd19c06a3f0b",
        "name": "OpenAI",
        "credentials": {
          "openAiApi": {
            "id": "BRRf66J5aSwt4UDP",
            "name": "OpenAi account"
          }
        }
      },
      {
        "parameters": {
          "options": {}
        },
        "type": "n8n-nodes-base.respondToWebhook",
        "typeVersion": 1.5,
        "position": [
          1072,
          0
        ],
        "id": "18a6401a-7273-4240-b00a-bd9d7043a7dd",
        "name": "Respond to Webhook"
      },
      {
        "parameters": {
          "operation": "get",
          "tableId": "books",
          "filters": {
            "conditions": [
              {
                "keyName": "id",
                "keyValue": "={{ $json.book_id }}"
              }
            ]
          }
        },
        "type": "n8n-nodes-base.supabase",
        "typeVersion": 1,
        "position": [
          432,
          0
        ],
        "id": "26b87b21-9b21-4899-8694-8765ba5695f6",
        "name": "Get a row",
        "credentials": {
          "supabaseApi": {
            "id": "fdzgJDGuPA2JozKn",
            "name": "Supabase account"
          }
        }
      }
    ],
    "connections": {
      "Webhook": {
        "main": [
          [
            {
              "node": "Edit Fields",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Edit Fields": {
        "main": [
          [
            {
              "node": "Get a row",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "OpenAI": {
        "ai_languageModel": [
          [
            {
              "node": "AI Agent",
              "type": "ai_languageModel",
              "index": 0
            }
          ]
        ]
      },
      "AI Agent": {
        "main": [
          [
            {
              "node": "Respond to Webhook",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Get a row": {
        "main": [
          [
            {
              "node": "AI Agent",
              "type": "main",
              "index": 0
            }
          ]
        ]
      }
    },
    "authors": "Gordan Kljajic",
    "name": "Version 0b13d81a",
    "description": "",
    "autosaved": false
  },
  "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

Chat Question Suggestions. Uses agent, lmChatOpenAi, supabase. Webhook trigger; 6 nodes.

Source: https://github.com/adamhaley/megyk-automations/blob/main/workflows/Chat_Question_Suggestions.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

⏺ 🚀 How it works

Agent, Anthropic Chat, Output Parser Structured +6
AI & RAG

L&D_AgentsAI_ATIVO. Uses httpRequest, agent, googleCalendarTool, toolSerpApi. Webhook trigger; 93 nodes.

HTTP Request, Agent, Google Calendar Tool +9
AI & RAG

Flux. Uses lmChatOpenAi, agent, googleGemini, httpRequest. Webhook trigger; 67 nodes.

OpenAI Chat, Agent, Google Gemini +8
AI & RAG

leads. Uses supabase, gmail, formTrigger, httpRequest. Webhook trigger; 62 nodes.

Supabase, Gmail, Form Trigger +13
AI & RAG

Agent: IPTV (instance_e2165d22_1762376395079). Uses openAi, redis, supabase, httpRequest. Webhook trigger; 56 nodes.

OpenAI, Redis, Supabase +7