Skip to main content

hey everybody! I'm struggling like crazy with a post request I'm trying to make from an airtable script

here is what I am trying to do:

  1. From Airtable scripting, create an object that contains record data. DONE
  2. Send that object through a post request to Google Apps Script. STRUGGLING
  3. Read the data from google app scripts and use it to fill a template. NOT DONE YET

The reason why I am using this approach instead of pre-built Google Doc filling templates is because my data is complex and I need flexibility.

Here is the final part of the Airtable code:

 

let response = await remoteFetchAsync(url, {
method: 'POST',
body: JSON.stringify(getFacility(record)),
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json',
},
});

 

By logging the response, I get 401 unauthorised. Although, I am not sure what do I need to authorise, nor how. I could not find much information about this use case online. Any ideas? Thank you so much!!

Be the first to reply!

Reply