0
votes

Objective: I am trying to integrate creator-form-data with google-sheet using google-sheet-api-v4.

I am able to create an empty sheet(data params being empty ) at google spreadsheets. but i don't know ,how to create sheet with data-params , to either-

(1) assign title ,to spreadsheet , or (2) write any data, to spreadsheet

error received : using deluge to perform task no. ( 1 ), the error thrown is :

Invalid JSON payload received. Unexpected token

Note: (1)Oauth credentials are checked and correct, google access token is also valid, confirming via Google-oauth-playground

(2) i am able to assign title and data from google-try-api-platform,but no success from deluge side. google-sheet-try-api

enter image description here

1

1 Answers

1
votes

The issue is solved now ,in postUrl the post-data to be posted , must be converted from json to string (params=data.toString(); ). I had sended post-data in json format thats the mistake i made.

Below is correct sample code for deluge:

 append_data = {"values":{{thisDate,thisQuantity}}};
 final_append_data = append_data.toString();

 response = postUrl(append_data_sheet_url,final_append_data,mymap,false);

Note: variable "final_append_data" is converted to string.