How to Automate Google Sheets in n8n: A Beginner’s Guide (Read, Append, Update, Filter & Delete)
If you have spent any time looking at automation or freelance platforms like Upwork, you know that Google Sheets integration is one of the most highly requested skills. From extracting data out of PDFs to logging daily web scraping results (like real estate listings), being able to automatically move data in and out of spreadsheets is a superpower.
In this guide, we are covering the absolute barebone basics of connecting Google Sheets to n8n, a powerful workflow automation tool. We will walk through the core operations: Reading, Filtering, Appending, Deleting, and Updating data.
Let’s dive in!
1. Prerequisites & Setting Up Your Workflow
Before we start building, you need a few things in place:
- Sample Data: For this guide, imagine a fictional database of vintage baseball cards (with columns for Player, Card, Grade, and Price). Feel free to use any sample data you are passionate about.
- API Connection: We are assuming you have already set up your Google Sheets API connection via Google Cloud in your n8n workspace.
- The Trigger: To keep things simple while we learn, start your workflow with a basic Manual Trigger node.
2. Reading Data: How to “Get Row in Sheet”
The first step in most workflows is pulling existing data out of your spreadsheet.
How to set it up:
- Add a Google Sheets node and select the “Get row in sheet” operation.
- Select Your Document: You can find your sheet via a list, URL, or ID. Connecting By ID is highly recommended and incredibly easy. You can find your Document ID right in your Google Sheets URL (it’s the long string of text immediately after
/d/and before the next/). - Select Your Tab: By default, n8n looks for
Sheet1. If you have a multi-tab document, be sure to specify the correct one.
A Quick Note on Row Numbering:
If you are coming from Python or Pandas (which start counting at 0), n8n operates a bit differently. It considers your header row as Row 1. This means your actual data begins on Row 2.
Viewing Your Data:
Once you execute the node, you have a few options to view the output. The Table View is highly recommended for large datasets, while the JSON View is a great alternative if you only have a few records.
3. Filtering Your Data Like a Pro
Now that you have your data, you probably don’t want all of it. You need to filter it down.
The Golden Rule of Filtering in n8n:
While you can technically apply a filter directly inside the Google Sheets “Get Row” node, it is highly recommended to add a separate Filter Node immediately after it instead. This gives you much better visibility and control.
Setting Up Your Filter:
- Data Types Matter: By default, n8n treats all filtered values as “strings” (text). If you want to filter by a number (like finding cards with a Grade of 10 or a Price over $1,000,000), you must change the data type dropdown from “String” to “Number.”
- String Filtering: If you are searching for text, keep the condition as a String and use “is equal to” (e.g., Player is equal to “Mickey Mantel”).
Using Conditional Logic:
You can stack your filters using logic operators:
- AND: Use this if all conditions must be met (e.g., Grade is exactly 10 AND Price is greater than $1,000,000).
- OR: Use this if only one of the conditions needs to be true.
4. Appending Data: Automatically Adding New Rows
Appending is used when you want to add brand-new rows to the bottom of your existing dataset—perfect for logging new leads or scraping results.
How to set it up:
- Select the “Append row in sheet” operation.
- Use your Document ID and select
Sheet1(or your preferred tab). - Map the new values you want to send.
- Execute the node. You will instantly see the new row appear at the very bottom of your live Google Sheet!
5. Cleaning House: Deleting Rows
Sometimes you need to clear out bad data or old records.
How to set it up:
- Select the “Delete rows or columns from the sheet” operation.
- Input your Document ID and select the sheet.
- You must specify exactly which Row number to start deleting at, and the total number of rows you want to remove.
Warning: Remember n8n’s row numbering quirk! Because the header is Row 1, if you want to delete the second piece of data in your list, you actually need to target Row 3.
6. Keeping Data Fresh: Updating Rows
When existing data changes (like a price fluctuation), you need to update a specific row without creating a duplicate.
How to set it up:
- Select the “Update row in sheet” operation.
- Enter your Document ID and select the sheet.
- Column to Match On: You must tell n8n which column to search to find the correct row to alter.
Crucial Database Design Tip:
Always match on a Unique Identifier (like a specific Customer ID number, SKU, or barcode). Do not match on non-unique data like a person’s first name or a brand. If multiple rows share that same non-unique data, n8n might update the wrong row entirely!
Once matched, provide the new value you want to overwrite the old one with, execute the node, and your sheet is instantly updated.
Final Thoughts & Next Steps
In this guide, we used a Manual Trigger to safely test our operations. However, n8n features incredibly powerful built-in Google Sheets triggers. You can easily set up your workflows to run automatically the exact second a new row is added or an existing row is updated by a team member.
While there are other sheet operations available (like Clear, Create, or Delete entire sheets), mastering Read, Append, Filter, Delete, and Update will cover 95% of your daily workflow automation needs.
n8n లో Google Sheets ని Automate చేయడం ఎలా: Beginner’s Guide (Read, Append, Update, Filter & Delete)
మీరు Upwork లాంటి ఫ్రీలాన్స్ ప్లాట్ఫారమ్స్ లో automation గురించి చూసినట్లయితే, Google Sheets integration స్కిల్స్ కి ఎంత డిమాండ్ ఉందో మీకు తెలిసే ఉంటుంది. PDFs నుండి డేటాను extract చేయడం నుండి daily web scraping రిజల్ట్స్ (రియల్ ఎస్టేట్ లిస్టింగ్స్ లాంటివి) లాగ్ చేయడం వరకు, స్ప్రెడ్షీట్స్ లోకి డేటాను ఆటోమేటిక్ గా పంపడం ఒక సూపర్ పవర్ లాంటిది.
ఈ గైడ్ లో, మనం n8n అనే పవర్ఫుల్ workflow automation tool కి Google Sheets ని కనెక్ట్ చేసే బేసిక్స్ గురించి తెలుసుకుందాం. ఇందులో Read, Filter, Append, Delete, మరియు Update ఆపరేషన్స్ ని కవర్ చేస్తాం.
1. Prerequisites & Setting Up Your Workflow
స్టార్ట్ చేయడానికి ముందు మీకు కొన్ని సెటప్స్ కావాలి:
- Sample Data: ఈ గైడ్ కోసం, పాత బేస్బాల్ కార్డ్స్ (Player, Card, Grade, Price కాలమ్స్ తో) ఉన్న ఒక ఫిక్షనల్ డేటాబేస్ ని ఊహించుకోండి. మీరు మీకు ఇష్టమైన ఏదైనా sample data ని వాడొచ్చు.
- API Connection: మీ n8n వర్క్స్పేస్ లో Google Cloud ద్వారా Google Sheets API కనెక్షన్ ని మీరు ఇప్పటికే సెటప్ చేశారని అస్యూమ్ చేసుకుంటున్నాం.
- The Trigger: నేర్చుకునేటప్పుడు సింపుల్ గా ఉండటానికి, మీ వర్క్ఫ్లో ని బేసిక్ Manual Trigger node తో స్టార్ట్ చేయండి.
2. Reading Data: “Get Row in Sheet” ఎలా చేయాలి
చాలా workflows లో ఫస్ట్ స్టెప్, స్ప్రెడ్షీట్ నుండి ఎగ్జిస్టింగ్ డేటాను పుల్ చేయడం.
దీన్ని ఎలా సెటప్ చేయాలి:
- Google Sheets node ని యాడ్ చేసి “Get row in sheet” ఆపరేషన్ ని సెలెక్ట్ చేయండి.
- Select Your Document: మీరు మీ షీట్ ని లిస్ట్, URL, లేదా ID ద్వారా ఫైండ్ చేయవచ్చు. By ID ద్వారా కనెక్ట్ చేయడం బాగా రికమండ్ చేయబడింది మరియు చాలా ఈజీ. Document ID మీ Google Sheets URL లో దొరుకుతుంది (
/d/తర్వాత మరియు నెక్స్ట్/కి ముందు ఉండే లాంగ్ టెక్స్ట్). - Select Your Tab: By default, n8n
Sheet1కోసం చూస్తుంది. మీకు multiple tabs ఉంటే, కరెక్ట్ tab ని స్పెసిఫై చేయండి.
Row Numbering గురించి ఒక చిన్న నోట్:
మీరు Python లేదా Pandas వాడి ఉంటే (అవి 0 తో కౌంట్ స్టార్ట్ చేస్తాయి), n8n కొంచెం డిఫరెంట్ గా పనిచేస్తుంది. ఇది మీ header row ని Row 1 గా కన్సిడర్ చేస్తుంది. అంటే మీ యాక్చువల్ డేటా Row 2 నుండి స్టార్ట్ అవుతుంది.
Viewing Your Data:
Node ని execute చేశాక, అవుట్పుట్ని చూడటానికి మీకు కొన్ని ఆప్షన్స్ ఉంటాయి. లార్జ్ డేటాసెట్స్ కి Table View బాగా రికమండ్ చేయబడింది, అలాగే మీకు తక్కువ రికార్డ్స్ ఉంటే JSON View బెస్ట్ ఆల్టర్నేటివ్.
3. మీ డేటాను ప్రో లాగా ఫిల్టర్ చేయడం (Filtering Your Data Like a Pro)
డేటా వచ్చిన తర్వాత, మీకు అదంతా అవసరం ఉండకపోవచ్చు. దాన్ని ఫిల్టర్ చేయాలి.
n8n లో ఫిల్టరింగ్ గోల్డెన్ రూల్:
మీరు టెక్నికల్ గా డైరెక్ట్ గా Google Sheets “Get Row” node లోపలే ఫిల్టర్ అప్లై చేయగలిగినప్పటికీ, దాని తర్వాత సపరేట్ గా ఒక Filter Node ని యాడ్ చేయడం బాగా రికమండ్ చేయబడింది. ఇది మీకు మంచి కంట్రోల్ మరియు విజిబిలిటీ ఇస్తుంది.
Setting Up Your Filter:
- Data Types Matter: By default, n8n ఫిల్టర్ చేసిన వాల్యూస్ అన్నిటినీ “strings” (టెక్స్ట్) గా ట్రీట్ చేస్తుంది. మీరు నంబర్ తో ఫిల్టర్ చేయాలనుకుంటే (ఉదాహరణకు Grade 10 ఉన్న కార్డ్స్ లేదా Price $1,000,000 కంటే ఎక్కువ ఉన్నవి), మీరు data type డ్రాప్డౌన్ను “String” నుండి “Number” కి తప్పకుండా చేంజ్ చేయాలి.
- String Filtering: మీరు టెక్స్ట్ కోసం సెర్చ్ చేస్తుంటే, కండిషన్ ని String గా ఉంచి “is equal to” వాడండి (ఉదాహరణకు, Player is equal to “Mickey Mantel”).
Conditional Logic ని వాడటం:
లాజిక్ ఆపరేటర్స్ తో మీరు ఫిల్టర్స్ ని స్టాక్ చేయొచ్చు:
- AND: అన్ని కండిషన్స్ తప్పక మ్యాచ్ అవ్వాల్సినప్పుడు దీన్ని వాడండి (ఉదాహరణకు, Grade ఎగ్జాక్ట్ గా 10 ఉండాలి AND Price $1,000,000 కంటే ఎక్కువ ఉండాలి).
- OR: కండిషన్స్ లో ఏదైనా ఒక్కటి ట్రూ (true) అయితే చాలు అనుకున్నప్పుడు దీన్ని వాడండి.
4. Appending Data: ఆటోమేటిక్ గా కొత్త Rows ని యాడ్ చేయడం
మీ ఎగ్జిస్టింగ్ డేటాసెట్ కింద బాటమ్ లో కొత్త rows ని యాడ్ చేయడానికి Append యూజ్ అవుతుంది—కొత్త లీడ్స్ లేదా స్క్రాపింగ్ రిజల్ట్స్ ని లాగ్ చేయడానికి ఇది పర్ఫెక్ట్.
దీన్ని ఎలా సెటప్ చేయాలి:
- “Append row in sheet” ఆపరేషన్ ని సెలెక్ట్ చేయండి.
- మీ Document ID ని యూజ్ చేసి
Sheet1(లేదా మీకు కావాల్సిన tab) ని సెలెక్ట్ చేయండి. - మీరు పంపాలనుకుంటున్న కొత్త వాల్యూస్ ని మ్యాప్ చేయండి.
- Node ని Execute చేయండి. వెంటనే మీ లైవ్ Google Sheet బాటమ్ లో కొత్త row అప్డేట్ అవ్వడం మీరు చూస్తారు!
5. Cleaning House: Rows ని డిలీట్ చేయడం (Deleting Rows)
కొన్నిసార్లు బ్యాడ్ డేటా లేదా పాత రికార్డ్స్ ని క్లియర్ చేయాల్సి వస్తుంది.
దీన్ని ఎలా సెటప్ చేయాలి:
- “Delete rows or columns from the sheet” ఆపరేషన్ ని సెలెక్ట్ చేయండి.
- మీ Document ID ని ఎంటర్ చేసి షీట్ను సెలెక్ట్ చేయండి.
- డిలీట్ చేయడం ఏ Row నంబర్ దగ్గర స్టార్ట్ చేయాలో, మొత్తం ఎన్ని rows రిమూవ్ చేయాలో మీరు ఎగ్జాక్ట్ గా స్పెసిఫై చేయాలి.
Warning: n8n యొక్క row numbering ట్విస్ట్ ని గుర్తుంచుకోండి! హెడర్ ని Row 1 గా తీసుకుంటుంది కాబట్టి, మీరు లిస్ట్ లోని సెకండ్ డేటాని డిలీట్ చేయాలంటే, యాక్చువల్ గా Row 3 ని టార్గెట్ చేయాలి.
6. Keeping Data Fresh: Rows ని అప్డేట్ చేయడం (Updating Rows)
ఎగ్జిస్టింగ్ డేటా చేంజ్ అయినప్పుడు (ప్రైస్ మారినప్పుడు లాగా), డూప్లికేట్ క్రియేట్ చేయకుండా ఒక నిర్దిష్ట row ని అప్డేట్ చేయాలి.
దీన్ని ఎలా సెటప్ చేయాలి:
- “Update row in sheet” ఆపరేషన్ ని సెలెక్ట్ చేయండి.
- Document ID ని ఎంటర్ చేసి షీట్ను సెలెక్ట్ చేయండి.
- Column to Match On: అప్డేట్ చేయడానికి కరెక్ట్ row ని ఫైండ్ చేయడానికి n8n ఏ కాలమ్ ని సెర్చ్ చేయాలో మీరు చెప్పాలి.
Crucial Database Design Tip:
ఎప్పుడూ ఒక Unique Identifier (నిర్దిష్ట Customer ID నంబర్, SKU, లేదా బార్కోడ్ లాంటివి) ని మాత్రమే మ్యాచ్ చేయండి. ప్లేయర్ పేరు లేదా బ్రాండ్ లాంటి యూనిక్ కాని డేటాను మ్యాచ్ చేయకండి. Multiple rows కి ఒకే డేటా ఉంటే, n8n పూర్తిగా రాంగ్ row ని అప్డేట్ చేసే ఛాన్స్ ఉంది!
మ్యాచ్ అయిన తర్వాత, పాత వాల్యూ ప్లేస్ లో మీరు ఓవర్రైట్ చేయాలనుకుంటున్న కొత్త వాల్యూని ఇవ్వండి, node ని execute చేయండి, మీ షీట్ ఇన్స్టంట్ గా అప్డేట్ అవుతుంది.
Final Thoughts & Next Steps
ఈ గైడ్ లో, మన ఆపరేషన్స్ ని సేఫ్ గా టెస్ట్ చేయడానికి ఒక Manual Trigger ని యూజ్ చేశాం. అయితే, n8n లో పవర్ఫుల్ built-in Google Sheets ట్రిగ్గర్స్ ఉన్నాయి. మీ స్ప్రెడ్షీట్లో కొత్త row యాడ్ అయిన లేదా ఎగ్జిస్టింగ్ row అప్డేట్ అయిన ఆ సెకనులోనే ఆటోమేటిక్ గా రన్ అయ్యేలా మీరు మీ workflows ని ఈజీగా సెటప్ చేయవచ్చు.
ఇతర షీట్ ఆపరేషన్స్ (Clear, Create, లేదా మొత్తం షీట్లను Delete చేయడం లాంటివి) ఉన్నప్పటికీ, Read, Append, Filter, Delete, మరియు Update ని మాస్టర్ చేస్తే మీ డైలీ workflow automation నీడ్స్ లో 95% కవర్ అయినట్లే.