Appsheet API Call Doesn't add records to table

Hello,

I've tried using javascript to add rows to a table, but it won't work.
The Key Column has initial value (UNIQUEID())
All other colu

Here's my code :

function myFunction() {

//Create Lines in RELATION_TABLE_PAGE_COLLECTION (EN CONSTRUCTION)
method: 'POST',
headers: {
'applicationAccessKey': '{applicationAccessKey}',
'contentType': 'application/json'
},
payload: {
"Action": "Add",
"Rows": [
{
 
"collection_ID/title_ID": "collectionid"
 
}
]
}
});

Logger.log(response_appsheet);
Logger.log(response_appsheet.getResponseCode());

}

The response code is 200 meaning it's a success, but nothing is added to my table.

Any insights on this ?

Thank you,
0 5 280
5 REPLIES 5

You tested this using another tool like Postman or VSCode Thunder client?

Hello,

No I haven't but I want to use the code in a javascript step within an automation.

Your payload needs to be stringify'd.

Thank you Marc_for the anwser,
I already tried with a stringifyed payload  but I have the same result ๐Ÿ˜•

I have the same problem. Then, I go to Manage -> Monitor tag-> Audit History -> Launch log analyzer. Here will log all REST API calls.  You can check the failed API call and what is it missing. I hope this can help you ๐Ÿ™‚

Top Labels in this Space