Skip to main content

HI, this is my code for my payload posting to a table using Google Apps Script:

 
var payload = JSON.stringify({
"records": [{
"fields": {
"OnlineSubmissionLink": [{ "id": linkedRecordID }], // Set the linked record field
// "SaleDate": formattedSaleDate,
// "SalePrice": donationAmount
 
},
"typecast": true
}]
});
 
My log says: Constructed Payload: {"records":[{"fields":{"OnlineSubmissionLink":[{"id":"recXE6yQpMi1NyWRx"}]},"typecast":true}]}
 
for my payload, but I'm getting this error:
 {"error":{"type":"INVALID_REQUEST_UNKNOWN","message":"Invalid request: parameter validation failed. Check your request data."}}
 
when I attempt to POST the Record ID into the linked record field. 
 
Sorry, I'm no expert so am struggling a bit. Any advice would be ssoooo welcome! 🙏

Try using an array of the record ID "OnlineSubmissionLink": [linkedRecordID],, not an array of objects. The original web API takes an array of record IDs, not an array of objects (unlike Airtable scripting or the payload from a webhook).


Try using an array of the record ID "OnlineSubmissionLink": [linkedRecordID],, not an array of objects. The original web API takes an array of record IDs, not an array of objects (unlike Airtable scripting or the payload from a webhook).


Thank you so much! Problem solved. 🙏


Reply