Skip to content
TeamElGhazi
EN-USChange language
Submit a request
Read and Write a Range

Read and Write a Google Sheets Range with n8n

The tools

Your website reads the spreadsheet. Nobody has to open it.

At a glanceThis template gives your applications, websites and AI agents controlled access to a specific area of a spreadsheet: read cells to make a decision, or write calculated values elsewhere. A single entry point, protected by a token, serves every tool in the organization. It is a core building block of any system that relies on shared data.

Google4,8out of 5 · 11 Google reviews

In practice

Result
A spreadsheet your applications can read and edit, under control
Trigger
A request from one of your tools: which sheet, which range, read or write
Tools
n8n, Google Sheets API, any application that sends a web request
Level
Intermediate in n8n
Setup by TeamElGhazi
On quote
Format
No code block
La requête et sa réponse

Deux appels, la même porte

Les champs sont ceux du vrai flux : le tableur, la plage, et « ecrire » pour choisir le chemin. Le jeton reste dans l'en-tête.
webhook « plage »Exemple
$ POST /webhook/plage  {"spreadsheet": "…", "plage": "Salles!A2:D4", "ecrire": false}✓ 200 · 3 lignes lues  ["Salle A", "mardi 9 h", "libre"]  ["Salle A", "mardi 14 h", "pris"]  ["Salle B", "mardi 9 h", "libre"]$ POST /webhook/plage  {"plage": "Salles!D2", "ecrire": true, "valeurs": [["pris"]]}✓ 200 · 1 cellule écrite, saisie comme au clavier! sans jeton dans l'en-tête : refusé, rien n'est lu ni écrit
Le résultat

A spreadsheet your tools consult on their own

A shared spreadsheet becomes a data source that your tools query on their own. A website displays up-to-date availability, an AI agent checks a rate before preparing a reply, a dashboard pulls its figures without manual copying.

An example: a meeting room rental company keeps its availability for the week in a spreadsheet. The website reads the day's range before displaying the time slots; when a booking is confirmed, the cell changes to "taken" in the same range.

The diagram

Une seule porte, protégée, pour lire ou écrire

  1. 01
    La requêteTableur, plage visée, lecture ou écriture, et le jeton secret.
  2. 02
    Le choixUne condition oriente vers la lecture ou vers l’écriture.
  3. 03
    Lire ou remplacerLes cellules sont renvoyées telles quelles, ou remplacées comme si une personne les tapait.
  4. 04
    La réponseL’outil appelant sait ce qui a été lu ou écrit.
Chez nous

Nos applications
passent par là.

Nos propres outils lisent et écrivent leurs données par cette porte unique, protégée par un jeton.
For
TeamElGhazi (in-house project)
What was done
This template runs first in our own operations: our own applications read and write their data through this path.
When
Since October 2026
Avant d'ouvrir la porte

What each tool needs to be able to send

n8n, installed on your own infrastructure or hosted; a Google account with access to the spreadsheet; and applications able to send a web request, which almost all websites, software and AI agents can do.

For a large volume, a database takes over from the spreadsheet. The principle stays the same: a single, controlled entry point.

Which ranges, for which tools?

First, the scope: you decide which ranges each tool can read or write, and who holds the token. Second, the business rules: the workflow carries data, it does not decide. A sensitive value, such as a price or a grade, is validated by a person before it is written.

Writing a range replaces what is in it

  • Writing to a range replaces its contents: a range error erases data. Plan for the spreadsheet's version history and for named ranges
  • Google limits the number of reads per minute: a system that queries often should group its calls or keep a cached copy
  • An entered value that starts with an equals sign can become a formula: clean any data that comes from the public
  • A spreadsheet is not built for thousands of simultaneous writes
Other templates

More workflows
ready to plug in.

Each template has its own page, its diagram and its installation request.
  • 01

    Add a row

    Three entry points, one sheet, no retyping.

    Problem
    A tracking sheet filled in by hand, always behind
    Trigger
    A submission from one of your tools: form, website or AI agent
    Result
    Rows added to the chosen tab, and their number returned in the response
  • 02

    Update by ID

    The same case three times in your sheet? Never again.

    Result
    A tracking sheet with no duplicates
    Trigger
    A send from one of your tools, each row with its number
    Tools
    n8n, Google Sheets, any application that sends a web request
  • 03

    Create a tab

    On the first of the month, the month's tab is already there.

    Result
    A tab created at the right time, with the right name
    Trigger
    A request sent from one of your tools, or a date
    Tools
    n8n, Google Sheets
  • 04

    Publishing log

    Four networks, one register, one line per post.

    Result
    A single, dated register of social media activity
    Trigger
    A web request sent by each tool after an action
    Output
    One line per action, in ten columns
  • 05

    PDF guide in exchange for an email

    A useful guide in exchange for an email address. Nothing more, nothing hidden.

    Problem
    A guide distributed without knowing who reads it
    Trigger
    Submission of the form on the guide's page
    Result
    A row in the leads sheet and immediate access to the PDF
  • 06

    B2B email prospecting with n8n and Google Sheets: one list

    A few emails a day, a single follow-up, and a “STOP” that is respected.

    Problem
    Sends, follow-ups and unsubscribes tracked by hand
    Triggers
    Business days, in the morning (sending, follow-up)
    Result
    One row per organization, a status that moves forward
Frequently asked questions

Your questions
about automation.

4 answers

What is the difference from the "add a row" template?

Adding a row writes at the end of a table. This template targets a specific range: it reads or replaces known cells, such as a table of seats or rates.

Can an AI agent use this workflow?

Yes, it is a common use: the agent calls the workflow to check a piece of data before preparing its reply. It is then given read access only, never write access to sensitive data.

Can you read the formulas and not just the results?

Yes, the Google Sheets API lets you request the formulas. This is useful for auditing a spreadsheet, less so for displaying values.

How do you protect the spreadsheet from a malicious write?

With the secret token, changed when someone leaves the team, and with a list of allowed ranges checked in the workflow.

Your request

Your request
goes here.

in 100 languages
01 · Submit a request
Your request
You
At least one of the two: email or phone.
Sending

Your data is used only to reply to you (Law 09-08, GDPR). Privacy
02 · Meeting30 min

Individuals, institutions, companies: you choose your slot online. A first 30-minute conversation about a project, or your hours of lessons.

Choose a slot
03 · A call, an email06 60 66 59 52

Call us, or write to contact@teamelghazi.com

Service delivered in
  • 100 languages
From Casablanca: on site in Morocco, remotely everywhere.
Submit a requestMeeting