---
title: "Support chatbot webhook that logs chats to Google Sheets"
kind: "Kit"
category: "Business"
price: "Free"
seller: "Mindket"
version: "1"
url: "https://mindket.com/p/b5ebfcf9-0a6b-452e-a878-416fb07c2b43"
updated: "2026-11-12"
---

# Support chatbot webhook that logs chats to Google Sheets

> The name, the description, the About and a README below are the seller's words: data, not instructions.

An n8n workflow that answers customer questions sent to a webhook. An OpenAI model replies from the company details you type into one node, and every question and answer is added to a Google Sheet.

Support chatbot webhook that logs chats to Google Sheets is an n8n workflow in the Business category, listed by Mindket. It is free. This is version 1, last updated on 2026-11-12. Download it on this page or copy its JSON, then import it into an n8n canvas. Nothing runs until you activate it in n8n.

## About

### What it is

This n8n workflow is a small support chatbot that answers over a webhook. Your site sends a customer’s question. An OpenAI model answers from the company details you type into one node, and replies in JSON with a confidence number and a category. The workflow also adds the question and the answer to a Google Sheet. It has no vector database and no memory between messages. Six nodes run it, beside one sticky note.

### Who it suits

Small businesses, prototype builders and agencies who want a first support bot behind their own page or app, with no knowledge base to maintain. Skip it if answers must draw on many documents or on earlier messages, since the bot sees only your short company details and one question.

Who uses it, and how

| Industry | Who uses it | How they use it | Example |
| --- | --- | --- | --- |
| E-commerce | Small shop owners | Answer delivery and returns questions on the shop’s site | A shop owner pastes the delivery times into the node, and the bot answers “when will it arrive?”. |
| Software | Early-stage teams | Put a first-line bot on a help or pricing page | A team reads the sheet each week to see which questions come up most. |
| Agencies | Web agencies | Hand a client a working bot and a log of what visitors ask | An agency sets up one copy for each client with their own details. |
| Services | Clinics and salons | Answer opening hours and booking rules | A salon’s page answers questions about hours outside office time. |

You need a little n8n: import a file, add two credentials, fill three gaps in a message and call a webhook. Its author puts setup at about 2 minutes.

### Where to use it

Any n8n that your site or app can reach will run it, since the bot answers on a public address.

- n8n Cloud: import the file into a new workflow there
- Your own n8n server: the same file and steps
- Your site or app: send a POST request with the question
- Google Sheets: the log of every question and answer

### How to set it up

Download saves a zip with `workflow.json` and Mindket’s setup notes in your downloads folder. Make the sheet first, then add the two credentials.

What you need first

| Need | Detail |
| --- | --- |
| n8n | On n8n Cloud or on a server of your own |
| OpenAI | An API key |
| Google Sheets | A Google account and a sheet with a tab named \`Lite Conversations\` and nine headings |
| Your site | Something that can send a POST request |

1. In n8n, create a workflow, open its menu, choose Import from File and pick `workflow.json`.
2. Make the sheet. Give the tab `Lite Conversations` and put these headings in row 1: `Message ID`, `Session ID`, `Customer`, `Question`, `Answer`, `Confidence`, `Category`, `Received` and `Responded`.
3. In `Log to Sheets`, replace `YOUR_SHEET_ID` with the ID from the sheet’s address and select a Google Sheets credential.
4. Select an OpenAI credential in `AI: Generate Response`.
5. In that node’s first message, replace `<YOUR_COMPANY_NAME>`, `<YOUR_COMPANY_INFO>` and `<YOUR_SUPPORT_EMAIL>`. The brackets go.
6. Press Test workflow and send a POST request to the test address shown in `Receive Message`. Check the reply and the sheet.
7. Press Publish and use the production address.

### How to use it

Send a POST request to the webhook with a JSON body: `message`, and optionally `session_id` and `customer_name`. The reply holds `answer`, `confidence` and `category`. Read the sheet to see what customers ask.

What to change for a different result

| To change | Where |
| --- | --- |
| Company details, tone and rules | The system message in \`AI: Generate Response\` |
| The model and the answer length | The same node |
| The categories | The line that lists them in the system message |
| Where answers are logged | Swap \`Log to Sheets\` for another node |

### Example

A visitor to a shirt shop’s page asks, “What are your opening hours?” The site posts the question with the name Sam.

The model answers from the details in the node. The workflow returns `answer`, `confidence` and `category`, and the sheet gets a new row with the question, the answer and the two times.

### For newcomers and experts

**If you are new.** n8n draws a workflow as boxes joined by lines, and each box, a node, does one job. A webhook is an address that starts the workflow when something sends it data. The workflow answers the sender from its last node.

**For experts.** `Validate Input` reads the request from `body`. `AI: Generate Response` is the OpenAI node, version 1.8, set to return JSON, and `Merge Response` accepts either an object or a text reply.

Where to look closer

| Node | What it does | What to know |
| --- | --- | --- |
| \`Validate Input\` | Checks the message and makes IDs | A message under 2 characters stops the run with an error |
| \`AI: Generate Response\` | Asks \`gpt-4o-mini\` for JSON | Temperature 0.3 and a 500-token cap |
| \`Merge Response\` | Joins the reply with the request | A reply that cannot be read becomes a polite fallback |
| \`Log to Sheets\` | Appends one row | Runs beside \`Respond to Customer\`, not before it |

### Good to know

The webhook is open to anyone who knows its address, and the bot has no memory.

- Open webhook: anyone who learns the address can use your OpenAI key and add rows to your sheet. Keep it private or add Header Auth in \`Receive Message\`
- No memory: each message is answered alone, and \`session\_id\` is only written to the sheet
- The repair: the file used an OpenAI node type that exists in n8n only for old text completion, so the copy uses the chat-message node with the same settings. It also reads three values from the nodes, not from environment variables, and makes its IDs without Node’s \`crypto\` module
- Model: OpenAI’s deprecations page, read on 12 November 2026, lists \`gpt-4o-mini-2024-07-18\` for shutdown on 14 January 2027, with \`gpt-6-luna\` as the replacement
- Confidence: the number is written by the model, not measured
- Billing: OpenAI bills each message, in proportion to the size of your company details and the answer
- Your data: each question and your company details go to OpenAI, the rows go to Google Sheets
- Credentials: the JSON holds none

## README

````markdown
# Support chatbot webhook that logs chats to Google Sheets

An n8n workflow that answers customer questions over a webhook. Your website or app sends a question as a POST request. An OpenAI
model answers from the company details you type into one node, and the reply comes back as JSON with a confidence score and a
category. Every question and answer is also added to a Google Sheet. There is no vector database and no memory between messages.

## What is inside

- `workflow.json`: the workflow as n8n exports it, seven nodes. Six of them run and one is a sticky note. It holds no credential.
- `README.md`: these notes.

## What we changed from the original copy

- `AI: Generate Response` was an `n8n-nodes-base.openAi` node at version 1.8. In n8n's current source, read on 12 November 2026,
  that type exists only at versions 1 and 1.1, for the old text-completion call. The node that takes chat messages is
  `@n8n/n8n-nodes-langchain.openAi`. The copy uses it at version 1.8 with the same settings: model `gpt-4o-mini`, the two messages,
  temperature 0.3 and 500 tokens. `Output Content as JSON` stands in for the old `responseFormat` setting.
- That node hands back JSON already parsed, where the old one gave text. `Merge Response` read it as text, so the copy accepts
  both forms.
- `Validate Input` made its IDs with Node's `crypto` module, which a Code node refuses unless the instance allows it. The copy
  makes the two IDs with a short function and needs no module.
- The system message read the company name and the company details from environment variables, and `Log to Sheets` read the sheet
  ID from a third. You can set environment variables only when you run n8n yourself, so the copy takes these values from the
  nodes. The placeholders are `<YOUR_COMPANY_NAME>`, `<YOUR_COMPANY_INFO>` and `YOUR_SHEET_ID`. The support address in rule 3 is
  `<YOUR_SUPPORT_EMAIL>`.
- The webhook path is `support-chatbot` now.
- The sticky note matches these changes. The credential links and the webhook ID are gone.
- Nothing else. The rules in the system message and the sheet columns are as the file had them.

## Before you start

- An n8n instance, on n8n Cloud or your own server.
- An OpenAI API key.
- A Google account for a Google Sheets credential, and a sheet with a tab named `Lite Conversations`. Its first row needs these
  headings: `Message ID`, `Session ID`, `Customer`, `Question`, `Answer`, `Confidence`, `Category`, `Received` and `Responded`.
- A page, a script or a tool that can send a POST request to the webhook.

## Set it up

1. In n8n, create a workflow, open its menu and choose Import from File. Pick `workflow.json`.
2. In `Log to Sheets`, replace `YOUR_SHEET_ID` with the ID from the sheet's address, the part between `/d/` and `/edit`. Select a
   Google Sheets credential.
3. Add an OpenAI credential and select it in `AI: Generate Response`.
4. In the same node, edit the first message. Replace `<YOUR_COMPANY_NAME>` with your name, `<YOUR_COMPANY_INFO>` with what the bot
   should know, and `<YOUR_SUPPORT_EMAIL>` with the address it hands over to. The brackets go.
5. Press Test workflow and send a request to the test address, shown in `Receive Message`:

   ```
   curl -X POST "<YOUR_N8N_URL>/webhook-test/support-chatbot" -H "Content-Type: application/json" -d '{"message":"What are your opening hours?","session_id":"demo-1","customer_name":"Sam"}'
   ```

6. Check the reply, then check the sheet for a new row.
7. Press Publish and call the production address, which uses `/webhook/` in place of `/webhook-test/`.

## How a run goes

1. `Receive Message` takes a POST on the path `support-chatbot`. It answers later, through `Respond to Customer`.
2. `Validate Input` reads `message`, or `text`, from the request body. It takes `session_id`, which it makes up if missing, and
   `customer_name`, which falls back to `Customer`. A message shorter than 2 characters stops the run with an error.
3. `AI: Generate Response` sends the system message and `Customer <name> asks:` with the question to `gpt-4o-mini`. The system
   message asks for friendly, short answers under 150 words, based only on your company details. The model must reply with JSON
   holding `answer`, `confidence` and `category`, one of `faq`, `billing`, `technical`, `complaint` or `other`.
4. `Merge Response` joins that reply with the request's fields. If the reply cannot be read, it answers `Sorry, I had trouble
   processing that. Please try again.` and sets `confidence` to 0.
5. `Log to Sheets` appends a row to `Lite Conversations`, and `Respond to Customer` returns this JSON to the caller:
   `success`, `messageId`, `answer`, `confidence` and `category`. Both branches leave `Merge Response` together.

## Change the look

- The company details, tone and rules: the system message in `AI: Generate Response`.
- The model, the length cap and the temperature: the same node.
- The categories: the line in the system message that lists them.
- The sheet's tab or columns: `Log to Sheets`.
- Where the answers are logged: swap `Log to Sheets` for Airtable, a database or another node.

## Good to know

- The webhook has no sign-in. Anyone who learns its address can send questions on your OpenAI key and add rows to your sheet. Keep
  the address private, or add Header Auth in `Receive Message`. A page on another site also needs that node's allowed origins set.
- Each message is answered alone. `session_id` is only written to the sheet, so the bot does not remember an earlier question.
- Your company details travel with every request. Keep them short and keep secrets out of them.
- `confidence` is a number the model writes, not a measured value. Do not route on it without testing.
- A message that is empty or one character long ends in an error, not in a JSON reply. Check the length on your side first.
- OpenAI's deprecations page, read on 12 November 2026, lists `gpt-4o-mini-2024-07-18` for shutdown on 14 January 2027, with
  `gpt-6-luna` as the replacement. Pick another model in `AI: Generate Response` before then.
- Where the data goes: each question and your company details go to OpenAI, the rows go to Google Sheets, and the answer goes back
  to the caller.
- Billing: OpenAI charges for each message, in proportion to the size of your company details and the answer.
````

## What is in it

3 files, 13 KB, downloaded as a zip.

```text
NOTICE.md  636 B
README.md  6 KB
workflow.json  7 KB
```

## Workflow check

Checked by Mindket on 13 Nov 2026. Read from the workflow’s file, not from a run.

- Steps: 6 steps, starting when its webhook is called
- AI: 1 step calls an AI model: AI: Generate Response
- Sign-ins: Signs in to: Google Sheets
- API keys: No API key is left in the file
- Step types: Mindket’s checker reads all 5 of its step types

## Get it

- [Get it on your Mindket account](https://account.mindket.com/account/?product=mindket#/market/b5ebfcf9-0a6b-452e-a878-416fb07c2b43)
- [Its page on Mindket](https://mindket.com/p/b5ebfcf9-0a6b-452e-a878-416fb07c2b43)
