# n8n: Talk to Your Google Sheets with ChatGPT (AI Agent)

> Set up n8n template 7639 step by step: connect OpenAI and Google Sheets, then ask your spreadsheet questions in plain English. Free hands-on lesson.

Source: https://learn.ynteractive.com/content/n8n-talk-to-google-sheets-chatgpt-ai-agent · Updated 2026-10-10 · Free from Stepthrough (https://learn.ynteractive.com)

## Practice it step by step

[Start the free practice](https://learn.ynteractive.com/modules/n8n-talk-to-sheets)

You do every step yourself in a practice copy of n8n. It checks your work as you go, and “Do it for me” finishes any step you get stuck on. Free, about 8 minutes, and nothing touches your real accounts. [Open full screen](https://learn.ynteractive.com/modules/n8n-talk-to-sheets)

Free · Live now · [n8n Automation Toolkit](https://learn.ynteractive.com/content/course/n8n-automation-toolkit) · [n8n](https://learn.ynteractive.com/content/tool/n8n) · OpenAI · Google Sheets · ~8 min · 22 steps · Beginner

Updated October 10, 2026. Built against the tool’s current screens and checked step by step. [How we check this lesson](https://learn.ynteractive.com/content/about#how-we-check)

[n8n](https://learn.ynteractive.com/content/tool/n8n)'s most popular chat template lets you ask a Google Sheet questions in plain English, but the template opens with empty credentials and no data. In this free lesson you use a practice copy of the n8n editor and finish setting it up for a made-up consulting firm's client roster. You give the [OpenAI Chat Model](https://learn.ynteractive.com/content/glossary/chat-model) your credential, point the Analyze Data Google Sheets tool at your spreadsheet, check that n8n can read the rows, then open the chat and ask four questions. One of the agent's real answers was wrong, and you learn how to spot that.

## At a glance

| Question | Answer |
| --- | --- |
| What you build | Connect n8n's most popular chat template to your own Google Sheet: add your OpenAI key, pick your spreadsheet, then ask it questions in plain English. |
| Tools | n8n |
| Time | About 8 minutes, 22 steps in 3 parts |
| Level | Beginner, no coding needed |
| Cost | Free |
| Ways to learn it | [Practice it step by step](https://learn.ynteractive.com/modules/n8n-talk-to-sheets) |

### The 3 parts, in short

1. Connect OpenAI: Open the chat model, Open the Credential list, Pick your OpenAI credential, Choose how to set the model, and 3 more steps.
2. Connect your sheet: Open Analyze Data, Open the Credential list, Pick your Google account, Open the Document list, and 5 more steps.
3. Ask your data: Open the chat, Ask a simple question, Ask for a total, Check the maths, and 2 more steps.

**Start here first:** [Find and Use n8n Templates](https://learn.ynteractive.com/content/find-and-use-n8n-templates) (module 1 of n8n Automation Toolkit)

**In the course:** [Part 9 · n8n Automation Toolkit](https://learn.ynteractive.com/content/course/part-9-n8n-automation-toolkit) (Module 46 of the [full course](https://learn.ynteractive.com/content/course))

**Part of:** [n8n Jump Start](https://learn.ynteractive.com/content/paths/n8n-jump-start) (step 3 of 4). Next up: [n8n AI Agent Tutorial: Save Social Media Ideas to Google Sheets](https://learn.ynteractive.com/content/n8n-ai-agent-tutorial-google-sheets)

## What the template is made of

Template 7639 has five working nodes. Chat with Your Data is the [chat trigger](https://learn.ynteractive.com/content/glossary/chat-trigger). It passes your message to the Talk to Your Data agent. The agent uses [OpenAI](https://learn.ynteractive.com/content/glossary/openai) Chat Model to think, Memory to remember the conversation, and Analyze Data, a Google Sheets tool set to Get Row(s), to read your spreadsheet. The yellow, red and grey sticky notes on the canvas are instructions, and they list the same three steps: set up OpenAI, prepare your Google Sheet, then ask questions.

## Connect OpenAI

Open OpenAI Chat Model and pick your OpenAI credential from the Credential list. A template cannot carry a key, so you create the credential yourself: make a key on the OpenAI API Keys page, add funds under Billing, and paste the key into a new credential in n8n.

The template's model is gpt-4.1-nano, the cheapest one. If the model list will not load, switch the small From list box to By ID and type gpt-4.1-nano.

## Connect your Google Sheet

Open Analyze Data, choose the Google Sheets credential for the Google account that owns the spreadsheet, then pick the Document and the Sheet tab. A credential for a different Google account will not list your spreadsheet. Put column names in row 1 and the data from row 2. Click Execute step: the OUTPUT panel shows one item per row, with the columns from row 1. If your rows show up there, the agent can read them.

## Ask questions, and check the answers

Click Open chat and type a question. In the lesson's client roster, Which clients are At Risk? returned Northwind Insurance and Riverbend Accounting, and Which clients renew in November? returned Atlas Logistics Co and Northwind Insurance. Memory lets you follow up with Which of those two is At Risk?

Check sums yourself. Asked for the total monthly retainer of Maya Chen's Active clients, the agent listed the right three rows (2,500, 1,800 and 1,900) but said 5,200. They add up to 6,200. Models find rows reliably and do arithmetic less reliably.

## Links

- [Get the template](https://n8n.io/workflows/7639): n8n template 7639, Talk to your Google Sheets using ChatGPT-5.
- [OpenAI API keys](https://platform.openai.com/api-keys): where you create the key the Chat Model needs.
- [n8n docs: AI Agent node](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent/): what the agent node does.
- [n8n docs: Google Sheets node](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googlesheets/): Get Row(s) and the other operations.

## Try it yourself, free

Reading the steps is a start. Doing them is how it sticks. The interactive module walks you through every click in a practice copy of n8n, checks each step, and never touches your real accounts.

[Start “n8n: Talk to Your Google Sheets with ChatGPT (AI Agent)”](https://learn.ynteractive.com/modules/n8n-talk-to-sheets)

## Step by step: n8n: Talk to Your Google Sheets with ChatGPT (AI Agent)

All 22 steps of the interactive module, in order. In the module you watch each one, then do it yourself in a practice copy that checks your work.

### 1. Connect OpenAI

1. **Open the chat model.** On the n8n.io template page you clicked **Use for free**, then **Copy template to clipboard**, and pasted it into a new workflow with Ctrl+V. It opened with five nodes. The **Chat with Your Data** trigger feeds the **Talk to Your Data** agent. The agent borrows a brain from **OpenAI Chat Model**, a **Memory**, and a sheet reader called **Analyze Data**. Double-click **OpenAI Chat Model**.
   You copied the template into n8n, and it opened with five nodes. A chat box feeds an AI agent. The agent borrows a brain from the OpenAI Chat Model, a memory, and a sheet reader called Analyze Data. Start with the brain.
2. **Open the Credential list.** A template cannot bring its own key. n8n may fill the **Credential** box with one of your saved accounts, which may not be the one you want. Click the box.
   A template cannot bring its own key. n eight n may fill the credential box with a saved account for you.
3. **Pick your OpenAI credential.** Pick the OpenAI credential you saved earlier. Here it is **My OpenAI account**. No credential yet? The template's yellow note lists the steps: get a key on the OpenAI API Keys page, add funds under Billing, then paste the key into a new credential.
   Pick the OpenAI credential you saved before. If you have none yet, the yellow note in the template lists the steps. Get a key, add some money under billing, and paste the key into a new credential.
4. **Choose how to set the model.** The template uses a cheap, fast model. Click the small **From list** box in front of **Model**.
   The template uses a cheap, fast model.
5. **Choose By ID.** Click **By ID**. After you pick a credential, the model box goes blank. The model list usually loads too, with a search box, but By ID always works, even when the list will not load.
   That lets you type the model name yourself. It works even when the list will not load.
6. **Type the model.** Type **gpt-4.1-nano**, the model the template uses. It is the cheapest, so a whole practice session costs a fraction of a cent.
   That is the model the template uses. It is the cheapest one, so practice costs almost nothing.
7. **Back to the canvas.** The brain is connected. Close this node with the **X** at the top right.
   The brain is connected. Close the node.

### 2. Connect your sheet

8. **Open Analyze Data.** Now the data. Double-click the green **Analyze Data** node, the Google Sheets tool the agent reads from. The warning mark on it means it is not finished yet.
   Now the data. That is the Google Sheets tool the agent reads from. The warning mark means it is not finished yet.
9. **Open the Credential list.** Click the **Credential** box at the top. n8n may already show one of your Google accounts there. Check it is the right one.
10. **Pick your Google account.** Pick the Google Sheets credential for **your own Google account**, the one that owns the spreadsheet. Here it is **My Google account**. A credential for a different account will not list your sheet.
    Pick the Google credential for your own account. It has to be the account that owns the spreadsheet. A credential for some other account will not show your sheet.
11. **Open the Document list.** Click the **Document** box. n8n lists the spreadsheets that Google account can open.
    N eight N lists every spreadsheet your Google account can open.
12. **Pick the spreadsheet.** Pick **Client Roster**. The box may still show the template's own sample sheet, so replace it. Rule one from the template: row 1 holds the column names, and the data starts in row 2.
    Pick your client roster. One rule from the template. Row one holds the column names, and the data starts in row two.
13. **Open the Sheet list.** Click the **Sheet** box. This is the tab inside the spreadsheet.
    That is the tab inside the spreadsheet.
14. **Pick the tab.** Pick **Clients**. The warning marks disappear, and new options appear: Filters, Combine Filters and Options. Leave them alone, because the agent decides what to look up.
    Pick the clients tab. The warning marks go away. New options show up below. Leave them alone. The agent decides what to look up.
15. **Check it can read the sheet.** Click **Execute step**. The **OUTPUT** panel fills with your rows: one item called response, holding one entry per client, with the columns from row 1. If you see your data here, the agent will see it too.
    The output panel fills with your rows, one entry for each client. If you can see your data here, the agent can see it too.
16. **Back to the canvas.** Close the node with the **X**.
    Close the node.

### 3. Ask your data

17. **Open the chat.** Click **Open chat** at the bottom of the canvas. If the chat is already open, you will see **Hide chat** instead, and that is fine. The chat sits in a panel at the bottom, with a Logs panel beside it.
    If it is already open, that is fine. The chat sits along the bottom, with a logs panel beside it.
18. **Ask a simple question.** Click the message box and type: **Which clients are At Risk?** Press Enter. The agent reads the sheet and answers in about three seconds.
    The agent reads the sheet and answers in a few seconds.
19. **Ask for a total.** Type: **What is the total monthly retainer for Maya Chen's Active clients?** Read the answer, then add the three numbers yourself.
    Now ask for a total. What is the total monthly retainer for Maya Chen's active clients? Read the answer. Then add the three numbers yourself.
20. **Check the maths.** Did you check? 2,500 + 1,800 + 1,900 is **6,200**. In our first test the agent said **5,200**: it found the right rows and added them wrong. Your answer may be right or wrong, because models vary from run to run. They are good at finding rows and weaker at sums, so always check totals. Now type: **Which clients renew in November?**
    Did you check the sum? Twenty five hundred plus eighteen hundred plus nineteen hundred is sixty two hundred. In our first test the agent said fifty two hundred. It found the right rows, and added them wrong. Yours may differ, because models vary. So always check totals. Now ask which clients renew in November.
21. **Ask a follow-up.** The **Memory** node remembers the conversation, so you can say "those two". Type: **Which of those two is At Risk?**
    The memory node remembers the chat, so you can say those two. Ask, which of those two is at risk?
22. **Close the chat.** Click **Hide chat**. Nothing here was published, and nothing was saved to your sheet. The agent only reads. To let anyone use it, you would **Publish** the workflow, which the Execute and Publish lesson covers.
    You did not publish anything, and the agent never changed your sheet. It only reads. To let other people use it, you would publish the workflow. The execute and publish lesson shows how.

## Frequently asked questions

**Where do I get n8n template 7639?**

Open n8n.io/workflows/7639, click Use for free, and copy the template into your n8n. It arrives with no credentials, which is why the lesson starts by connecting OpenAI and Google Sheets.

**Why does my Google Sheets node not show my spreadsheet?**

The Credential is probably for a different Google account. Pick the credential for the account that owns the spreadsheet, then open the Document list again.

**Can the agent change my sheet?**

Not in this template. Analyze Data is set to Get Row(s), which only reads.

**Does the lesson use my OpenAI key or my sheet?**

No. It is a practice copy of the editor with made-up data, so nothing is read, sent or billed.

[Start this module free](https://learn.ynteractive.com/modules/n8n-talk-to-sheets)

- Previous in n8n Automation Toolkit: [n8n: Execute Step, Execute Workflow and Publish](https://learn.ynteractive.com/content/n8n-execute-step-execute-workflow-publish)

## More in n8n Automation Toolkit

- [Find and Use n8n Templates](https://learn.ynteractive.com/content/find-and-use-n8n-templates): Skip the blank canvas. Find a ready-made workflow in the n8n template gallery, import it into your workspace, connect Google Sheets and Gmail, test it with a real form…
- [Litescrape in n8n: Swap SerpApi for a Cheaper Search API](https://learn.ynteractive.com/content/litescrape-n8n-serpapi-alternative): Switch a weekly n8n competitor-price workflow from SerpApi to Litescrape's Google Shopping API: change the HTTP Request URL, move the key into a Bearer Auth credential…

[All 4 modules in n8n Automation Toolkit](https://learn.ynteractive.com/content/course/n8n-automation-toolkit)

## More n8n tutorials

- [n8n AI Agent Tutorial: Save Social Media Ideas to Google Sheets](https://learn.ynteractive.com/content/n8n-ai-agent-tutorial-google-sheets): Build an AI agent for BrightPath Marketing that generates social media post ideas and saves them to Google Sheets — chat trigger, AI Agent, system prompt, model…
- [Lovable + n8n: Build a Web App with an AI Backend](https://learn.ynteractive.com/content/lovable-n8n-web-app-ai-backend): Build a contact form in Lovable and connect it to an n8n workflow — webhook trigger, AI Agent, Google Sheets, Gmail, and a Respond node that ties it all together.
- [AI Receipt Extractor: Receipts to Google Sheets with n8n](https://learn.ynteractive.com/content/ai-receipt-extractor-n8n-google-sheets): Drop a photo of a receipt into an n8n chat. An AI agent reads it, pulls out the date, vendor and amount, picks a category, and adds a row to Google Sheets.
- [AI Email Responder: Draft Gmail Replies Automatically with n8n](https://learn.ynteractive.com/content/ai-email-responder-gmail-drafts-n8n): Build an n8n agent that watches your Gmail, reads each new customer email, and writes a reply as a draft in the same thread, ready for you to check and send.
- [Daily Job Alerts: Email Each Tech Their Jobs from Google Sheets with n8n](https://learn.ynteractive.com/content/n8n-daily-job-alerts-google-sheets-gmail): Every morning at 7, n8n reads a plumbing company's jobs sheet, skips anything not assigned yet, and emails each job to the tech it's assigned to — customer, address…
- [Gmail AI Triage: Auto-Label Every Email and Draft Replies](https://learn.ynteractive.com/content/gmail-ai-triage-labels-drafts-n8n): Build an n8n workflow that reads each new email, sorts it as a lead, a client or an invoice with a Text Classifier, adds the matching Gmail label, and drafts a reply to…

## Terms in this lesson

Plain-English definitions, each with an example from a free lesson.

[Chat model](https://learn.ynteractive.com/content/glossary/chat-model) · [OpenAI](https://learn.ynteractive.com/content/glossary/openai) · [Chat Trigger](https://learn.ynteractive.com/content/glossary/chat-trigger) · [Get rows (reading a sheet)](https://learn.ynteractive.com/content/glossary/get-rows) · [OpenAI API](https://learn.ynteractive.com/content/glossary/openai-api) · [API](https://learn.ynteractive.com/content/glossary/api)

[The full AI glossary](https://learn.ynteractive.com/content/glossary)

## Browse related tutorials

[n8n Automation Toolkit (4)](https://learn.ynteractive.com/content/course/n8n-automation-toolkit) · [n8n tutorials (28)](https://learn.ynteractive.com/content/tool/n8n)
