# Googlesheet api

**URL:** <https://community.thunkable.com/t/googlesheet-api/3080680>\
**Category:** Web API's\
**Created:** [June 30, 2024, 7:17pm UTC](https://community.thunkable.com/t/googlesheet-api/3080680 "2024-06-30T19:17:26Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![nicolas.abelanetf6](https://avatars.discourse-cdn.com/v4/letter/n/57b2e6/32.png) [@nicolas.abelanetf6](https://community.thunkable.com/u/nicolas.abelanetf6)\
**Post date:** [June 30, 2024, 7:17pm UTC](https://community.thunkable.com/t/googlesheet-api/3080680/1 "2024-06-30T19:17:26Z")

</div>

Hi,

I am building an app for my small business and would appreciate some advice.

The app is designed to let my employees log their work hours daily. These hours will be stored in a Google Sheet, and at the end of the month, I’ll use this data to calculate their monthly pay.

The app consists of three screens:

1. **Login Screen**
2. **Dashboard:** Displays the total hours worked so far.
3. **Update Hours:** Allows employees to submit their hours for the day.

I’ve successfully created the login screen and linked each user to a dedicated Google Sheet.

However, I’m struggling to set up the web API to interact with this Google Sheet. I’ve spent the entire day on this without success.

Does anyone have experience with a similar project?

Thanks in advance for your interest!

Nico

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [June 30, 2024, 11:52pm UTC](https://community.thunkable.com/t/googlesheet-api/3080680/2 "2024-06-30T23:52:00Z")

</div>

Is there a reason you’re wanting to use the API instead of the built-in data source blocks?

What exactly are you wanting to do? What is an example of a specific function?

---

<div class="post-metadata">

**Author:** ![nicolas.abelanetf6](https://avatars.discourse-cdn.com/v4/letter/n/57b2e6/32.png) [@nicolas.abelanetf6](https://community.thunkable.com/u/nicolas.abelanetf6)\
**Post date:** [July 1, 2024, 5:18am UTC](https://community.thunkable.com/t/googlesheet-api/3080680/3 "2024-07-01T05:18:33Z")

</div>

Hi,

The reason why i want to use the api, is that I don’t know in advance what file will be used. I only know once the user has logged in.

But maybe I m wrong, I just don’t understand how I can do it with data blocks

Thx for your intrest

---

<div class="post-metadata">

**Author:** ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)\
**Post date:** [July 1, 2024, 2:29pm UTC](https://community.thunkable.com/t/googlesheet-api/3080680/4 "2024-07-01T14:29:32Z")

</div>

> [@nicolas.abelanetf6](#):
>
> The app is designed to let my employees log their work hours daily.

Sounds like a great idea. Is this currently a system you have up and running internally or are you starting from scratch? (i.e. are you simply adding a mobile interface to your existing spreadsheet-powered workflow?)

If everyone logs their hours in the same spreadsheet then you can use our Google Sheets integration.

If everyone has their own sheet then you’d need to use the API approach - but this begs the question then, how do employees submit their hours to you/payroll?

---

<div class="post-metadata">

**Author:** ![nicolas.abelanetf6](https://avatars.discourse-cdn.com/v4/letter/n/57b2e6/32.png) [@nicolas.abelanetf6](https://community.thunkable.com/u/nicolas.abelanetf6)\
**Post date:** [July 1, 2024, 3:03pm UTC](https://community.thunkable.com/t/googlesheet-api/3080680/5 "2024-07-01T15:03:33Z")

</div>

Hi,

I m starting from scratch.

I actually didn’t think of logging everyone’s hour on the same sheet, that could be a solution. Then I could just sort out by name later in googlesheet…

However. My original plan is to have a spreadsheet for each of them. I m finding their spreadsheet s url through the data block using a central spreadsheet where everyone has his id associated with the spreadsheet url.

Sorry I m not native English I hope I m clear in my explanations…

Thanks for your interest

Nico

---

<div class="post-metadata">

**Author:** ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)\
**Post date:** [July 1, 2024, 3:14pm UTC](https://community.thunkable.com/t/googlesheet-api/3080680/6 "2024-07-01T15:14:31Z")

</div>

> [@nicolas.abelanetf6](#):
>
> My original plan is to have a spreadsheet for each of them.

Makes sense - how many employees do you have? What are you expecting to grow to by the end of the year?

The only problem I have with the one-sheet-per-employee is that it doesn’t really scale very elegantly as new employees join/leave and if you double the number of employees then your Admin will have to do twice as much leg work to reconcile all the data at the end of each pay period.

* * *

> [@nicolas.abelanetf6](#):
>
> I actually didn’t think of logging everyone’s hour on the same sheet, that could be a solution. Then I could just sort out by name later in googlesheet

I’d go with one sheet for all the raw data and then you can create additional sheets in the same workbook to filter per employee, or a dashboard view to show most recent data etc.

---

<div class="post-metadata">

**Author:** ![nicolas.abelanetf6](https://avatars.discourse-cdn.com/v4/letter/n/57b2e6/32.png) [@nicolas.abelanetf6](https://community.thunkable.com/u/nicolas.abelanetf6)\
**Post date:** [July 1, 2024, 3:56pm UTC](https://community.thunkable.com/t/googlesheet-api/3080680/7 "2024-07-01T15:56:05Z")

</div>

Hi,

This one workbook idea sounds great! However I still have a similar problem, how do I change sheet ?  
I don’t understand how to use the blocks to switch the source of data accordingly to the user …

---

<div class="post-metadata">

**Author:** ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)\
**Post date:** [July 1, 2024, 4:18pm UTC](https://community.thunkable.com/t/googlesheet-api/3080680/8 "2024-07-01T16:18:35Z")

</div>

that’s the great thing - you don’t need to change the sheet.

Each new row is a new record, with date, employee name, hours worked etc and then you just set up the filter you need on a second sheet in that workbook to display the high level data your admin needs.

The sheet “database” is never shared with the employees to keep their data private, they can only interact with it via your Thunkable app.

* * *

> [@domhnallohanlon](#):
>
> how many employees do you have? What are you expecting to grow to by the end of the year?

NB - this is important. If it’s a large enough company then you are probably better off skipping straight to a proper database.

---

<div class="post-metadata">

**Author:** ![nicolas.abelanetf6](https://avatars.discourse-cdn.com/v4/letter/n/57b2e6/32.png) [@nicolas.abelanetf6](https://community.thunkable.com/u/nicolas.abelanetf6)\
**Post date:** [July 1, 2024, 4:39pm UTC](https://community.thunkable.com/t/googlesheet-api/3080680/9 "2024-07-01T16:39:44Z")

</div>

Yessssss!!! Of course! How did I miss that! This is wonderful thank you so much This is going to save me so much time!!!

We are a small company so I sure it will be fine.

Awesome, I try this tonight, let you know how it went.

Thank you again!

---

<div class="post-metadata">

**Author:** ![nicolas.abelanetf6](https://avatars.discourse-cdn.com/v4/letter/n/57b2e6/32.png) [@nicolas.abelanetf6](https://community.thunkable.com/u/nicolas.abelanetf6)\
**Post date:** [July 1, 2024, 6:28pm UTC](https://community.thunkable.com/t/googlesheet-api/3080680/10 "2024-07-01T18:28:37Z")

</div>

Hi,

i have only 7 employees

I started screen 2 from the begining since i have made a huge mess trying to use API… but of course i m blocked again…

I m at the stage where i want to identify the user, linking it s email to it s name. but somehow the in list block doesn t seem to find the item in the list … i can t find what i do wrong… can you help?  
screen below :

 ![screen 1](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/1/714aead9d8a4c5dc37beb96bc57bb2028631c1cd.png)

 ![screen 2](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/c/dc323cbc49f660bfc12d1da990b3ce1a8b5ab89d.png)

Thanks again for your help

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [July 1, 2024, 6:42pm UTC](https://community.thunkable.com/t/googlesheet-api/3080680/11 "2024-07-01T18:42:19Z")

</div>

Hello @nicolas.abelanetf6  
The “list of values” data source block is already a list so you don’t need to use the block “list” to connect it with the “does list contain” block

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/4/d4d2fd2e0c1c84aac71188d770daceb87eb54db7.png)

---

<div class="post-metadata">

**Author:** ![nicolas.abelanetf6](https://avatars.discourse-cdn.com/v4/letter/n/57b2e6/32.png) [@nicolas.abelanetf6](https://community.thunkable.com/u/nicolas.abelanetf6)\
**Post date:** [July 1, 2024, 6:47pm UTC](https://community.thunkable.com/t/googlesheet-api/3080680/12 "2024-07-01T18:47:10Z")

</div>

amazing!!! thank you so much

---

<div class="post-metadata">

**Author:** ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)\
**Post date:** [July 2, 2024, 9:02am UTC](https://community.thunkable.com/t/googlesheet-api/3080680/14 "2024-07-02T09:02:08Z")

</div>

> [@nicolas.abelanetf6](#):
>
> i can t find what i do wrong… can you help?

Yep - you just have a list inside a list.

This purple `list of values` block returns all of column B in your spreadsheet as a list already.

You are then “wrapping” that list as the first item in another list with your blue `+ list -` block

 ![Screenshot 2024-07-02 at 09.58.58](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/6/16c2dd01df7c35b1e3eccbc5f0c68531fe031a40.png)

Simply remove the blue block (and use the purple block only) and it will work for you.

* * *

Going forward, this might be a helpful resource to have too:

> **[Query Language Reference (Version 0.7)  |  Charts  | ...](https://developers.google.com/chart/interactive/docs/querylanguage?hl=en)**
>
> Learn how to use this language and discover detailed documentation for its classes, functions, and element.

---

<div class="post-metadata">

**Author:** ![nicolas.abelanetf6](https://avatars.discourse-cdn.com/v4/letter/n/57b2e6/32.png) [@nicolas.abelanetf6](https://community.thunkable.com/u/nicolas.abelanetf6)\
**Post date:** [July 2, 2024, 6:47pm UTC](https://community.thunkable.com/t/googlesheet-api/3080680/15 "2024-07-02T18:47:50Z")

</div>

Hi everyone,  
thank you so much for all your advices and help, my app works fine!! i m hopping i can start using it next week!

however i m fine tuning it adding littledetails here and there, and i enconter new difficulties… somehow the easiest things dont work anymore, and as i m verynew to all this i can t see what i m missing…

can somme one have a look at that screen: i d like to output the username but somehow it doesn t work!

the label s text doesn t change

thanks in advance for your precious help

nico

 ![screen 4](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/7/2764bd6d89578d6b575d7a443a7ecc9a9060d926.png)

---

<div class="post-metadata">

**Author:** ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)\
**Post date:** [July 3, 2024, 10:01am UTC](https://community.thunkable.com/t/googlesheet-api/3080680/16 "2024-07-03T10:01:06Z")

</div>

> [@nicolas.abelanetf6](#):
>
> i d like to output the username but somehow it doesn t work!

Two observations here Nicolas.

1. In the previous screenshot you share of your spreadsheet the name column was mostly empty. Have you added in data to this column since this?
2. We generally recommend, for performance reasons, against using more than one `get value` block. If you need two or more values from a row use the `get row object` block. Full instructions on how to do this can be found here:

[![](https://img.youtube.com/vi/hDRI8GnzCFE/maxresdefault.jpg "How to Make a Thunkable App Interactive with Blocks (4 of 4)") ](https://www.youtube.com/watch?v=hDRI8GnzCFE)

Hope that helps!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [July 3, 2024, 10:05am UTC](https://community.thunkable.com/t/googlesheet-api/3080680/17 "2024-07-03T10:05:53Z")

</div>



---

<div class="post-metadata">

**Author:** ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)\
**Post date:** [July 4, 2024, 4:05pm UTC](https://community.thunkable.com/t/googlesheet-api/3080680/18 "2024-07-04T16:05:31Z")

</div>

How’s it going for you @nicolas.abelanetf6?

---

<div class="post-metadata">

**Author:** ![nvxdevzm20](https://avatars.discourse-cdn.com/v4/letter/n/3e96dc/32.png) [@nvxdevzm20](https://community.thunkable.com/u/nvxdevzm20)\
**Post date:** [July 9, 2024, 3:05pm UTC](https://community.thunkable.com/t/googlesheet-api/3080680/19 "2024-07-09T15:05:31Z")

</div>

@nicolas.abelanetf6 Check this Guide out!! [CRUD Method for Private/Public Google Sheets - Resources - Kodular Community](https://community.kodular.io/t/crud-method-for-private-public-google-sheets/) also using an api has limited amount of requests and this method by me does waymore than that with almost no limit (All you need is a web component)

---

<div class="post-metadata">

**Author:** ![nicolas.abelanetf6](https://avatars.discourse-cdn.com/v4/letter/n/57b2e6/32.png) [@nicolas.abelanetf6](https://community.thunkable.com/u/nicolas.abelanetf6)\
**Post date:** [July 14, 2024, 5:34pm UTC](https://community.thunkable.com/t/googlesheet-api/3080680/20 "2024-07-14T17:34:00Z")

</div>

Hi  
thanks for asking.

i had taken a break on this.

now i m looking for a way to get my user to download a file from url to his device. is this possible?

thanks in advance

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [July 17, 2024, 7:32pm UTC](https://community.thunkable.com/t/googlesheet-api/3080680/21 "2024-07-17T19:32:54Z")

</div>

Hello @nicolas.abelanetf6  
You could use the download blocks to download a file from a URL onto your device and use it offline (This file cannot be accessed from outside the app). More information in our docs: [Files Blocks | Thunkable Docs](https://docs.thunkable.com/blocks/app-features/files-blocks#download-a-file-within-your-app)
