Skip to content
NEWMarketplace and the trig8n Agent: sell what you build, and get plans and changes that are tested before you see them. See what is new

Library / AI Agents & Assistants

AI Agents & Assistants

Log chat expenses to Google Sheets with an AI agent

Uses an LLM to parse expense messages sent through n8n chat into structured JSON and saves each one as a row in Google Sheets. Runs on each chat message.

What it does

## Save your expenses via chat message. LLM will parse your message to structured JSON and save as a new row into Google Sheet. ## Installation ### 1. Set up Google Sheets: Clone this Sheet: {{ $env.WEBHOOK_URL }} (File -> Make a copy) Choose this sheet into "Save expense into Google Sheets" node. ### 2. Fix sub-workflow dropdown: open "Parse msg and save to Sheets" node (which is an n8n sub-workflow executor tool) and choose the SAME workflow in the dropdown. it will allow n8n to call "Workflow Input Trigger" properly when needed. ### 3. Activate the workflow to make chat work properly. Sent message to chat, something like "car wash; 59.3 usd; 25 jan 2024" you should get a response: Your expense saved, here is the output of save sub-workflow:{"cost":59.3,"descr":"car wash","date":"2024-01-25","msg":"car wash; 59.3 usd; 25 jan 2024"} and new row in Google sheets should be inserted!

The steps

  1. AI Agent
  2. When chat message received
  3. Workflow Input Trigger
  4. OpenAI Chat Model
  5. Window Buffer Memory
  6. OpenAI Chat Model1
  7. Expense text to JSON parser
  8. Save expense into Google Sheets
  9. Parse msg and save to Sheets
  10. Error Handler

Similar automations