Hi everyone! This question touches on a lot of things outside of Airtable itself. Hoping someone here may have some insight.
I’m using the new Scripting Block to call an HTTP endpoint I’ve built using AWS API Gateway. A script runs in AWS Lambda and returns some data as JSON back to the Scripting Block to continue the workflow. For extra context, it’s a Lambda Proxy Integration.
I’m having trouble with CORS errors. I’m returning the CORS headers detailed here but still getting the error in Airtable.
Here’s the section of JS in the blocks where the call is being made:
// assemble the full URL from the record selection
let url = aws_url + record.getCellValueAsString("Project Record ID");
let headers = {
"Origin": "airtableblocks.com"
}
// make the API call
let response = await fetch(url, {
method: "GET",
headers: headers
})
Anyone have any similar experience?