Need help on Google Sheet API to transfer data

Hi everyone

This fantastic community has a number of similar answers on this subject but for the life of me I can’t seem to bring them all together to get it working!!!

I want to use the idea of the Google Sheets API to export data to a sheet to save on operations. It seems straightforward but I can’t get it to work. I’ve brought it back to a simple scenario to concentrate on the main issue.

  1. Created a simple Datastore to hold some employee data I want to transfer to the sheet:

  1. I use the Text aggreator as I’ve seen in a few examples to bring it together:

  1. I make the Google Sheets API call.

I’ve read a lot of variations on this without getting full clarity of the best. BatchUpdate, Append on the one I’m trying to use now (I don’t care which):

Now stuck with the following erro, checked brackets etc. and cannot get it to work:

This seems a huge bonus where volums of data is needed to be passed but don’t want to use an operation for every row.

Really appreciate any smarter people than me to get a clear working example of this.

TIA
Mike

Hey @mdb213

Consider giving this a try and adapting it to suit your specific requirements. It may prove beneficial to customize it according to your needs.
Screenshot 2024-01-03 154033

1 Like

Thank you for taking the time to answer @Abhishek

I’m getting the following error on the API call app:

RuntimeError

400: INVALID_ARGUMENT - Invalid JSON payload received. Unknown name “valueInputOption” at ‘data’: Cannot find field. Invalid JSON payload received. Unknown name “data” at ‘data’: Cannot find field.

Hey @mdb213

It seems like you’ve encountered an issue with double quotes in JSON. To resolve this, you can either replace double quotes with single quotes or escape them using backslashes like this
Screenshot 2024-01-03 161126

1 Like

Again, thank you. I replaced all double to single quotes in both the Text Agregator and your script and still getting the same error