---
title: "Expenses logged to Google Sheets from a chat message"
kind: "Kit"
category: "Finance & accounting"
price: "Free"
seller: "Mindket"
version: "1"
url: "https://mindket.com/p/37c82075-c44b-4f5e-9f5b-78efe4c1d02b"
updated: "2026-11-12"
---

# Expenses logged to Google Sheets from a chat message

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

An n8n workflow that logs an expense you type in n8n’s chat. An agent calls a save step, a model reads the cost, the description and the date from your message, and a new row is added to a Google Sheet.

Expenses logged to Google Sheets from a chat message is an n8n workflow in the Finance \& accounting 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 logs an expense from a chat message. You type something like “coffee beans 18.40 eur on 3 march” into n8n’s chat. An agent with a short memory passes the message to a save tool, which runs a second flow in the same workflow. In that flow a model reads a cost, a description and a date out of the message, and a new row goes into a Google Sheet. The agent then tells you the expense is saved. Nine nodes run it, and one sticky note explains the setup.

### Who it suits

People who track their own or a small team’s spending and would rather type a line than open a spreadsheet. Skip it if you need receipts, tax categories or currency conversion, since it stores only what your message says.

Who uses it, and how

| Industry | Who uses it | How they use it | Example |
| --- | --- | --- | --- |
| Freelance | Freelancers | Log a cost as soon as it happens | A designer types a font license and its price after buying it and finds a row in the sheet. |
| Retail | Shop owners | Note small cash spending | An owner types “cleaning supplies 23.50” at the till. |
| Events | Organizers | Track costs for one event | An organizer types each supplier’s bill into the chat on setup day. |
| Households | Families | Keep a shared spending list | A parent types “school trip 15” and the row carries today’s date. |

You need a little n8n: import a file, add OpenAI and Google credentials and make a sheet with four headers.

### Where to use it

Any n8n that can reach OpenAI and Google Sheets will run it. The tool calls the saved copy of the workflow, so save and publish it before you try the chat.

- n8n Cloud: import the file into a new workflow there
- Your own n8n server: the same file and steps
- Another model: swap either chat model node for another, and keep one that can call tools under the agent

### How to set it up

Download saves a zip with `workflow.json` and Mindket’s setup notes in your downloads folder. You need an OpenAI key and a Google Sheet.

What you need first

| Need | Detail |
| --- | --- |
| n8n | On n8n Cloud or on a server of your own |
| OpenAI | An API key |
| Google | A sign-in that can edit your sheet |
| A sheet | One tab with a header row of date, cost, descr and msg |

1. In n8n, create a workflow, open its menu, choose Import from File and pick `workflow.json`.
2. Add an OpenAI credential and select it in `OpenAI Chat Model` and in `OpenAI Chat Model1`.
3. Add a Google Sheets credential and select it in `Save expense into Google Sheets`.
4. In that node, pick your document and your tab.
5. Check that `Parse msg and save to Sheets` points at this same workflow. The file sets its Workflow field to this workflow’s own id.
6. Save and publish the workflow.
7. Open the chat, send “coffee beans 18.40 eur on 3 march” and check the sheet.

### How to use it

Type your spending into the chat, one expense per message. Each message adds one row. Give the cost and what it was for, and add a date when it was not today.

What to change for a different result

| To change | Where |
| --- | --- |
| The agent’s rules and reply | The system message in \`AI Agent\` |
| What the model reads from a message | The attributes in \`Expense text to JSON parser\` |
| The columns | \`Save expense into Google Sheets\` |
| The models | The two OpenAI chat model nodes |
| The number of tool calls | The Max Iterations option in \`AI Agent\` |

### Example

A freelancer types “coffee beans 18.40 eur on 3 march 2026”. The model returns the cost 18.4, the description “coffee beans” and the date 2026-03-03. A row with those values and the message goes into the sheet, and the agent replies that the expense is saved and shows what the save step returned.

A message with no date gets the time of the run as its date.

### 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. An agent is a node that decides when to call a tool. An information extractor pulls named fields out of a piece of text.

**For experts.** `Parse msg and save to Sheets` is a Call n8n Workflow tool set to `={{ $workflow.id }}`, and its `input1` takes `chatInput`. In the called flow, `Workflow Input Trigger` feeds `Expense text to JSON parser`, whose `cost`, `descr` and `date` become the columns, and `msg` comes from `input1`. The agent stops after 3 iterations.

Where to look closer

| Node | What it does | What to know |
| --- | --- | --- |
| \`AI Agent\` | Takes the message and calls the tool | Stops after 3 iterations |
| \`Parse msg and save to Sheets\` | Runs the second flow | Calls this workflow by its id |
| \`Workflow Input Trigger\` | Starts the second flow | One text field, \`input1\` |
| \`Expense text to JSON parser\` | Reads cost, description and date | Cost and description are required |
| \`Save expense into Google Sheets\` | Appends the row | The date falls back to the run time |

### Good to know

Two model names changed, and the tool runs the saved copy of the workflow.

- Models: the two chat model nodes had no model set, so they ran n8n’s default for their version, \`gpt-5-mini\`. OpenAI’s page, read on 12 November 2026, shuts it down on 11 December 2026 and names \`gpt-5.6-terra\`. The agent calls a tool, and \`gpt-6-luna\` on Chat Completions calls tools only with reasoning effort set to none, which n8n’s node never sends, so the agent uses \`gpt-5.6-terra\`. The extractor calls no tools, so it uses the cheaper \`gpt-6-luna\`
- Own workflow: the tool pointed at the author’s own saved workflow. It now uses an expression for this workflow’s id, so it calls whatever copy you import
- Saved copy: the tool runs the saved version, so save the workflow after each change
- Memory: the last five turns live in n8n’s memory, and a restart clears them
- Not run: Mindket read this copy against n8n’s source and OpenAI’s pages and did not run it on a live n8n
- Your data: your messages go to OpenAI, and the rows go to your sheet
- Credentials: the JSON holds none

## README

```markdown
# Expenses logged to Google Sheets from a chat message

An n8n workflow that logs an expense you type in n8n's chat. An agent calls a save step, a model reads the cost, the description and the date from your message, and a new row is added to a Google Sheet.

## What is inside

- `workflow.json`: the workflow as n8n exports it, 10 nodes. Nine run, and one is a sticky note. Five of the nine belong to the chat flow: the chat trigger, the agent, its OpenAI chat model, its window memory and its save tool. The other four make the second flow: a Workflow Input Trigger, an information extractor with its own OpenAI chat model, and the Google Sheets step. It holds no credential.
- `README.md`: these notes.

## What we changed from the original copy

- Both `OpenAI Chat Model` nodes had no model set, so they ran n8n's default for their version, `gpt-5-mini`. OpenAI's deprecation page, read on 12 November 2026, shuts that model down on 11 December 2026 and names `gpt-5.6-terra`.
- `OpenAI Chat Model`, under `AI Agent`, now uses `gpt-5.6-terra`. The agent calls a tool, and OpenAI's page for `gpt-6-luna` says Chat Completions supports function calling only with reasoning effort set to none, which n8n's chat model node never sends.
- `OpenAI Chat Model1`, under `Expense text to JSON parser`, now uses `gpt-6-luna`. That node puts the format instructions into the prompt and calls no tool.
- `Parse msg and save to Sheets` pointed at a saved workflow in the author's own n8n. Its Workflow field now holds the expression `={{ $workflow.id }}`, which is this workflow, so the tool runs the second flow of the copy you import.
- The credential links are gone. The document and the tab in `Save expense into Google Sheets` are empty, so you pick your own. The sticky note is written again, without the link to the author's sheet.
- The file's name is ours.
- Nothing else. The agent's rules, the extractor's three fields and the sheet columns are as the file had them.

Mindket read this copy against n8n's source and OpenAI's pages. It was not run on a live n8n.

## Before you start

- An n8n instance, on n8n Cloud or your own server.
- An OpenAI API key.
- A Google account that can edit your sheet.
- A Google Sheet with one tab that has a header row of `date`, `cost`, `descr` and `msg`.

## Set it up

1. In n8n, create a workflow, open its menu and choose Import from File. Pick `workflow.json`.
2. Add an OpenAI credential and select it in `OpenAI Chat Model` and in `OpenAI Chat Model1`.
3. Add a Google Sheets credential and select it in `Save expense into Google Sheets`.
4. In that node, pick your document and your tab.
5. Check that `Parse msg and save to Sheets` points at this same workflow. The file sets its Workflow field to this workflow's own id.
6. Save and publish the workflow.
7. Open the chat, send "coffee beans 18.40 eur on 3 march" and check the sheet.

## What happens in a run

1. `When chat message received` passes your message to `AI Agent`, which has `Window Buffer Memory` and `OpenAI Chat Model`.
2. The agent's system message makes it a helpful accountant. It must use the save tool for an expense message, and its reply is a fixed confirmation line followed by what the tool returned. It stops after 3 iterations.
3. `Parse msg and save to Sheets` is named `save_expense_in_db` for the agent. It runs the second flow of this workflow and hands it your message as `input1`.
4. `Workflow Input Trigger` starts that flow and passes `input1` to `Expense text to JSON parser`.
5. `Expense text to JSON parser` asks its model to convert the expense to JSON with three fields: `cost` (a number, required), `descr` (the description, required) and `date` (a date in UTC format).
6. `Save expense into Google Sheets` appends a row with `date`, `cost`, `descr` and `msg`, the original message. When the model gives no date, the date is the time of the run.
7. The agent answers with the confirmation line.

## What to change

- The agent's rules and reply: the system message in `AI Agent`.
- What the model reads from a message: the attributes in `Expense text to JSON parser`.
- The columns: `Save expense into Google Sheets`. If you add a field, add it to the extractor and the sheet.
- The models: the two OpenAI chat model nodes. Keep one that can call tools under `AI Agent`.
- The number of tool calls: the Max Iterations option in `AI Agent`.

## Good to know

- The tool runs the saved version of the workflow, so save it after each change.
- A message with no date gets the time of the run as its date.
- The chat memory holds the last five turns inside the n8n process, and a restart clears it.
- Anyone who can open the chat can add rows to your sheet.
- Data: your messages go to OpenAI, and the rows go to your sheet.
- Cost: a few model calls per expense, billed by OpenAI. The agent calls its model before and after the tool, and the extractor makes one more.
```

## What is in it

3 files, 14 KB, downloaded as a zip.

```text
NOTICE.md  674 B
README.md  5 KB
workflow.json  9 KB
```

## Workflow check

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

- Steps: 5 steps, starting when another workflow calls it or on a chat message
- AI: 2 steps call an AI model: Expense text to JSON parser and AI Agent
- Sign-ins: Signs in to: Google Sheets and OpenAI
- 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/37c82075-c44b-4f5e-9f5b-78efe4c1d02b)
- [Its page on Mindket](https://mindket.com/p/37c82075-c44b-4f5e-9f5b-78efe4c1d02b)
