# Update google sheets info through API

**URL:** <https://community.n8n.io/t/update-google-sheets-info-through-api/24796>\
**Category:** Questions\
**Tags:** google-sheets\
**Created:** [3 Abril, 2023 14:56 UTC](https://community.n8n.io/t/update-google-sheets-info-through-api/24796 "2023-04-03T14:56:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gabor\_Suki](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/gabor_suki/32/23981_2.png) [@Gabor\_Suki](https://community.n8n.io/u/Gabor_Suki)\
**Post date:** [3 Abril, 2023 14:56 UTC](https://community.n8n.io/t/update-google-sheets-info-through-api/24796/1 "2023-04-03T14:56:58Z")

</div>

Hello there!

I’d like to move our api update to n8n, and I lack the experience to figure it out on my own the how to part.

Basicly we have a master sheet with the project details, which also has the link of the survey we get the data from, and a different sheet designed to this survey. The logic I went is for if on the master sheet we mark the project as active, it’d update the data on the project sheet accordingly every x amount of time. But the thing is, we have and we could have multiple surveys going on the same time, so I am a bit unsure how can I achieve this to work in every scenario.  
Each link is different of course, so are the project sheets - we also type the sheet’s url/id i there, only the master sheet is the same.

I hope I explained it well!

---

<div class="post-metadata">

**Author:** ![MutedJam](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mutedjam/32/70851_2.png) [@MutedJam](https://community.n8n.io/u/MutedJam)\
**Post date:** [6 Abril, 2023 08:16 UTC](https://community.n8n.io/t/update-google-sheets-info-through-api/24796/2 "2023-04-06T08:16:32Z")

</div>

Hi @Gabor_Suki, welcome to the community 🎉

This sounds doable to me. You could use a hard-coded sheet in your workflow to fetch data from your master sheet, then use an [expression](https://docs.n8n.io/code-examples/expressions/) to read the sheet IDs (or URLs) from your master sheet. Assuming you have IDs, you’d want to set up your subsequent Google Sheets nodes like so:

 ![grafik](https://europe1.discourse-cdn.com/n8n/original/3X/3/b/3bfb355208b89806720f9e745bc44d234e2daa70.png)

Here, I am dynamically populating the ID value (using whatever is coming from the previous node), and gid=0 as the sheet identifier (this would be the first sheet in a Google Sheets spreadsheet).

Let me know if you run into any trouble with this 🙂

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [5 Julio, 2023 08:16 UTC](https://community.n8n.io/t/update-google-sheets-info-through-api/24796/3 "2023-07-05T08:16:58Z")

</div>

Cerrado el 5 Julio, 2023 08:16 UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
