I’ve written an automation script that I’d like to migrate over to the scripting app. I know that there are some differences between the two, but I’m having a lot more trouble than I thought. The script connects to an external API and pulls data from the API into my base. I seem to be running into issues with the async functions I’ve written to connect to the API and pull the data in. The code works when it’s not wrapped up in a function, but fails when it looks like the example below:
async function testFunction(){
let response = await fetch('https://api.github.com/orgs/Airtable');
console.log(await response.json());
}
testFunction();
This code above works as an automation script, but not in the scripting app.