Stepthrough Start free

n8n: Read, Add and Update Google Sheets Rows with an AI Step

Came from the n8n template? Build it step by step in 12 minutes

You copied n8n template 7156, Get started with Google Sheets in n8n: the three core Google Sheets moves: read rows, add a row, and update rows with an AI-written description. This free lesson walks you through every click it needs to run, in a practice copy of n8n, and checks your work as you go. No email needed.

Start the free step-by-step lesson

Free, about 12 minutes, and nothing touches your real accounts. Back to the template on n8n.io

Free · Live nown8n Automation Toolkitn8nGoogle SheetsOpenAI~12 min36 stepsIntermediate

Updated . Built against the tool’s current screens and checked step by step. How we check this lesson

n8n's most-copied Google Sheets starter reads a sheet, adds a row and updates rows with an AI-written description, but the original has a few flaws that trip beginners up. In this free lesson you use a practice copy of the n8n editor and work through the corrected version on a made-up content request list: connect your Google account, read the rows, add a new request that never duplicates, let an AI step write one sentence per row, write the sentences back, then run everything twice and check the sheet.

At a glance

QuestionAnswer
What you buildLearn n8n's three core Google Sheets moves on a made-up request list: read the rows, add a new one without duplicates, then let an AI step write a description and update each row.
Toolsn8n
TimeAbout 12 minutes, 36 steps in 5 parts
LevelIntermediate
CostFree
Ways to learn itPractice it step by step

The 5 parts, in short

  1. Read your sheet: Open Get Rows, Open the Credential list, Pick your Google account, Open the Document list, and 5 more steps.
  2. Add a row: Open Generate 1 Row of Data, Type the name, Type the email, Make the row, and 6 more steps.
  3. Write with AI: Open the OpenAI Chat Model, Open the Credential list, Pick your OpenAI credential, Back to the canvas, and 3 more steps.
  4. Update the rows: Open Update Sheets data, Open Column to match on, Match on Email, Write them back, and 1 more step.
  5. Run it all: Run everything, Check the real sheet, Back to n8n, Run it again, and 1 more step.

Start here first: n8n: What Is n8n? Build Your First Workflow (module 1 of n8n Automation Toolkit)

In the course: Part 9 · n8n Automation Toolkit (Module 77 of the full course)

Part of: n8n Jump Start (step 5 of 16). Next up: Get Your Daily Revenue Total by Email, Automatically, using n8n

Part of: n8n Intermediate: Real Business Workflows (step 1 of 10). Next up: Get Your Daily Revenue Total by Email, Automatically, using n8n

What the template does, and what we fixed

Template 7156 reads every row of a Google Sheet, adds one new row, asks an AI agent to write a description for each row's Topic, and writes the descriptions back. The corrected version in this lesson runs in a straight line: Run Workflow, Generate 1 Row of Data, Append or Update Row, Get Rows from Google Sheets, Write description, Update Sheets data.

Four things were fixed. The original read and added at the same time, so on the first run the new row was not in the rows that were read. It used plain Append row with a fixed email, so every run added the same row again. Its yellow note told you to create a Desktop OAuth credential, but on n8n Cloud you just click Sign in with Google. And two nodes kept default names like OpenAI Chat Model4 and Structured Output Parser3.

Read the rows with Get Row(s)

Open Get Rows from Google Sheets, pick your Google credential, then choose the Document and the Sheet from the lists. Choose the tab from the list rather than trusting a value that came with a template. In our test the template's saved tab code gave the error Sheet with ID gid=0 not found until we picked the tab again. Click Execute step and the OUTPUT panel shows one item per row, with the columns from row 1.

Add a row without duplicates

Append or Update Row has a Column to match on setting. Set it to Email and n8n looks for that email before it writes: if the person is already in the sheet it updates that row, and if not it adds a new one. We ran the corrected workflow twice in n8n and the sheet stayed at nine rows, with one Jordan Lee. To send rows in from forms, emails and invoices without typing, read Automate Data Entry in Google Sheets with n8n.

Write with AI, then update the rows

The Write description agent takes each row's Topic as its prompt and returns a sentence through a Structured Output Parser. It runs once per row, so nine rows means nine OpenAI calls. Update Sheets data then uses Update Row with Email as the matching column and writes the sentence into Description. In our run, all nine Description cells were filled.

Links

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: Read, Add and Update Google Sheets Rows with an AI Step”

Step by step: n8n: Read, Add and Update Google Sheets Rows with an AI Step

All 36 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. Read your sheet

  1. Open Get Rows. You copied template 7156 into n8n and fixed its flaws first. The workflow now runs left to right: Run Workflow, Generate 1 Row of Data, Append or Update Row, Get Rows from Google Sheets, Write description, then Update Sheets data. Start with the one that reads. Double-click Get Rows from Google Sheets. We already pointed the other two Sheets nodes at the same sheet, to save time.

    You copied the template into n8n, and fixed its flaws first. It now runs left to right. Add a row, read the sheet, write a description, update the rows. Start with the node that reads.

  2. Open the Credential list. A template cannot bring your Google login, so the Credential box is empty. Click it.

    A template cannot bring your Google login. So the credential box is empty.

  3. Pick your Google account. Pick the Google Sheets credential for your own Google account. Here it is My Google account. On n8n Cloud, a new credential just asks you to Sign in with Google and click Allow. You do not need a Google Cloud project, and the template's yellow note about a Desktop credential is wrong.

    Pick the Google credential for your own account. On n8n Cloud, a new one only needs sign in with Google, then allow. You do not need a Google Cloud project. The old yellow note about a desktop credential is wrong.

  4. 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.

  5. Pick the spreadsheet. Pick Content Requests. Use your own copy of the sheet, never someone else's. Row 1 must hold the column names: Name, Email, Topic, Submitted and Description.

    Pick your content requests sheet. Always use your own copy. Row one must hold the column names. Name, email, topic, submitted, and description.

  6. Open the Sheet list. Click the Sheet box. This is the tab inside the spreadsheet.

    That is the tab inside the spreadsheet.

  7. Pick the tab. Pick Sheet1. Always choose the tab from the list. The template ships with a tab code from the author's own sheet, and in our test that code gave the error Sheet with ID gid=0 not found.

    Pick the tab from the list. Always choose it from the list. The template shipped with a tab code from the author's own sheet. In our test that gave the error, sheet with I D gid equals zero not found.

  8. Read the rows. Click Execute step. The OUTPUT panel shows 8 items, one per row, with the columns Name, Email, Topic, Submitted and Description. Description is empty for now.

    The output shows eight items. One for each row. The description column is empty for now.

  9. Back to the canvas. Close the node with the X at the top right.

    Close the node.

2. Add a row

  1. Open Generate 1 Row of Data. Now a new request comes in, like a form was just submitted. Double-click Generate 1 Row of Data, an Edit Fields node. In the original template this row said Robert Breen, and its Email never changed, so every run added the same row again. You'll change it.

    Now a new request arrives, as if a form was just filled in. In the original template this row never changed, so every run added it again. You will change it.

  2. Type the name. Click the Name value and type Jordan Lee.
  3. Type the email. Click the Email value and type jordan.lee@example.com. Email is the key that tells n8n which row is which.

    Email is the key that tells n eight n which row is which.

  4. Make the row. Click Execute step. The OUTPUT shows 1 item with the four fields Name, Email, Topic and Submitted.

    You get one item, with four fields.

  5. Back to the canvas. Close the node with the X at the top right.

    Close the node.

  6. Open Append or Update Row. Double-click Append or Update Row. The original template used plain Append row, which adds a row every time, even for a person already in the sheet. This one is smarter.

    The original template used plain append, which adds a row every time, even for someone already in the sheet. This one is smarter.

  7. Open Column to match on. The four columns are already mapped to the fields from the node before. Click Column to match on.

    The four columns are already filled in from the node before.

  8. Match on Email. Pick Email. n8n now looks for this email first. If it finds it, it updates that row. If not, it adds a new one. Running twice can never duplicate Jordan.

    Pick email. Now n eight n looks for this email first. If it finds it, it updates that row. If not, it adds a new row. Running twice can never copy Jordan.

  9. Add the row. Click Execute step. The OUTPUT shows 1 item. In the real sheet, row 10 is now Jordan Lee, with an empty Description.

    One item comes out. In the real sheet, Jordan Lee is now a new row at the bottom, with no description yet.

  10. Back to the canvas. Close the node with the X at the top right.

    Close the node.

3. Write with AI

  1. Open the OpenAI Chat Model. Next the AI. The agent Write description borrows its brain from OpenAI Chat Model, the round node below it. Double-click it. We renamed it from the template's OpenAI Chat Model4.

    Next, the A I. The agent borrows its brain from the OpenAI Chat Model, the round node below it. We renamed it from the template's messy name.

  2. Open the Credential list. Again the Credential box is empty. Click it.

    Again the credential box is empty.

  3. Pick your OpenAI credential. Pick My OpenAI account. No credential yet? Make a key on the OpenAI API Keys page, add funds under Billing, then paste it into a new credential. The Model is already gpt-4o-mini, the cheap one. The template's yellow note says GPT-4o, but the node uses mini.

    Pick your OpenAI credential. If you have none, make a key on OpenAI's website, add some money under billing, and paste the key into a new credential. The model is already G P T four o mini, the cheap one.

  4. Back to the canvas. Close the node with the X at the top right.

    Close the node.

  5. Open Write description. Double-click Write description. Its prompt is {{ $json.Topic }}, so it reads the Topic of each row. The System Message says: Take in the topic and write a one-sentence description. The template's said only write a description, and the model wrote whole paragraphs.

    Its prompt is the topic of each row. The system message asks for a one sentence description. The old message just said write a description, and the model wrote whole paragraphs.

  6. Run the agent. Click Execute step. The agent runs once per row, so the OUTPUT shows 9 items and 9 OpenAI calls. Each has output, then description. That is cheap for 9 rows, but it adds up on a long sheet.

    The agent runs once for every row. Nine items come out, which is nine calls to open A I. Cheap here, but it adds up on a long sheet.

  7. Back to the canvas. Close the node with the X at the top right.

    Close the node.

4. Update the rows

  1. Open Update Sheets data. The sentences exist only inside n8n. Now write them into the sheet. Double-click Update Sheets data. Its operation is Update Row.

    The sentences only exist inside n eight n so far. Now write them into the sheet. Its operation is update row.

  2. Open Column to match on. Update has to know which row to change. Click Column to match on.

    Update has to know which row to change.

  3. Match on Email. Pick Email. Its value is an expression that reads each row's Email from Get Rows from Google Sheets, and Description gets the AI's sentence. A row with a blank Email could not be matched.

    Pick email. Its value reads each row's email from the get rows node. And description gets the sentence the A I wrote. A row with a blank email could not be matched.

  4. Write them back. Click Execute step. The OUTPUT shows 9 items, one per updated row. Each has Email and Description.

    Nine items, one for each row you updated.

  5. Back to the canvas. Close the node with the X at the top right.

    Close the node.

5. Run it all

  1. Run everything. Click Execute workflow at the bottom. Every node runs in order, and each shows a green check. The agent takes about 20 seconds.

    Every node runs, one after the other, and gets a green check. The agent takes about twenty seconds.

  2. Check the real sheet. Green checks only mean it ran. Click the Content Requests tab in your browser to see the real result.

    Green checks only mean it ran. Check the real result.

  3. Back to n8n. Nine rows, and every Description is filled, including Jordan Lee. Now go back to the n8n tab and run it a second time.

    Nine rows, and every description is filled in, including Jordan Lee. Now go back to n eight n, and run it a second time.

  4. Run it again. Click Execute workflow again. This is the test the original template failed: it added the same row on every run.

    This is the test the original template failed. It added the same row on every run.

  5. Still nine rows. Open the Content Requests tab once more. Still 9 rows, with no second Jordan Lee. Nothing here was published, and your real sheet is safe.

    Still nine rows. There is no second Jordan Lee. You did not publish anything, and nothing else was touched.

After this lesson, try these next

Frequently asked questions

Where do I get n8n template 7156?
Open n8n.io/workflows/7156, click Use for free, and copy the template into your n8n. It arrives with no credentials, so you connect Google Sheets and OpenAI yourself.
Do I need a Google Cloud project to connect Google Sheets?
Not on n8n Cloud. Create a new Google Sheets credential, click Sign in with Google, pick your account and click Allow. A Google Cloud project is only needed on a self-hosted n8n.
How do I stop n8n adding duplicate rows to Google Sheets?
Use the Append or Update Row operation and set Column to match on to a unique column such as Email. n8n updates the row when it finds that value and only adds a new row when it does not.
Why did my Get Rows node say Sheet with ID not found?
The tab value that came with the template belongs to the author's sheet. Open the Sheet list on the node and pick your own tab again.
Does the lesson touch my real sheet or OpenAI key?
No. It is a practice copy of the editor with made-up data, so nothing is read, written or billed.

Start this module free

More in n8n Automation Toolkit

All 18 modules in n8n Automation Toolkit

More n8n tutorials

n8n AI Agent Tutorial: Save Social Media Ideas to Google Sheets: a step from the interactive modulen8n AI Agent Tutorial: Save Social Media Ideas to 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…

Free · Live ~12 min Intermediate

Lovable + n8n: Build a Web App with an AI Backend: a step from the interactive moduleLovable + n8n: Build a Web App with an 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.

Free · Live ~15 min Advanced

AI Receipt Extractor: Receipts to Google Sheets with n8n: a step from the interactive moduleAI Receipt Extractor: Receipts to Google Sheets with n8n

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.

Free · Live ~12 min Intermediate

n8n AI Email Responder: Draft Gmail Replies Automatically: a step from the interactive modulen8n AI Email Responder: Draft Gmail Replies Automatically

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.

Free · Live ~12 min Intermediate

Daily Job Alerts: Email Each Tech Their Jobs from Google Sheets with n8n: a step from the interactive moduleDaily Job Alerts: Email Each Tech Their Jobs from Google Sheets with n8n

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…

Free · Live ~10 min Intermediate

The n8n inbox triage workflow: Gmail Trigger, a Text Classifier with Lead, Client and Invoice outputs wired to three label steps, then a Basic LLM Chain and Create a draft on the Client branchGmail AI Triage: Auto-Label Every Email and Draft Replies

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…

Free · Live ~18 min Advanced

Free cheat sheet

Print it or save the PDF: the key steps and checks from this lesson on one page, free.

All free printable cheat sheets

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

The full AI glossary

Browse related tutorials