# How can I POST a value to google sheets using Google App Script?

**URL:** <https://community.thunkable.com/t/how-can-i-post-a-value-to-google-sheets-using-google-app-script/2026992>\
**Category:** Web API's\
**Tags:** webapi, javascript, lowcode, google-app-script\
**Created:** [September 4, 2022, 6:46am UTC](https://community.thunkable.com/t/how-can-i-post-a-value-to-google-sheets-using-google-app-script/2026992 "2022-09-04T06:46:46Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [September 4, 2022, 10:44am UTC](https://community.thunkable.com/t/how-can-i-post-a-value-to-google-sheets-using-google-app-script/2026992/7 "2022-09-04T10:44:22Z")

</div>

You are using GAS (Google Apps Scrip) which has to ways to write to the sheet

- doGet()
- doPost()

When using **doGet()**, you have to pass the parameters as part of the URL (Query Parameters) and therefore you need to convert them to a form accepted by the URL scheme. This is the reason why you have to change the text to URLEncoded text.

However, when you use **doPost()** you will pass the data using the Body block and therefore you can use all type of text and numbers.

You can pass a JSON formatted data in text form using the Body component and in the Google script side read the text and convert it using JSON.parse() to use it as an object and update the sheet.

See a post using **doPost()**.

> [@Save Canvas Image to your Google drive](https://community.thunkable.com/t/save-canvas-image-to-your-google-drive/1609950):
>
> For this tutorial you will need to code a short script in Google Apps Script which you can access it from within Google Drive. You will need to use Web API component to talk to the script you created in Google Apps Script and pass the parameters using the Query Parameter section the the Body section. The Base64 image cannot fit into the Query Parameter section and therefore will will need to pass it using the Body section of the Web API. The Thunkable project is very simple and is used to demo…

---

_[View the full topic](https://community.thunkable.com/t/how-can-i-post-a-value-to-google-sheets-using-google-app-script/2026992)._
