Hi! I've been doing some scripting with the script extension, and managed to get it to a great working state when running manually in my base. I now want to put this in an automation sequence to trigger on a daily schedule. However, when running the script through automation, any API call I try to make is met with a 403 response. I've reached out to the company hosting the APIs I'm trying to call (Aha!), and they seem to believe the call doesn't even reach them (they can see my successful attempts from the manually triggered runs, but no blocked attempts), indicating something is being blocked by Airtable before the fetch call goes out.
For example, dumbing it down to a very simple call, the following works in the base when running manually (200 status response with expected JSON response), but fails when running automatically (403 status response, even gives me syntax error for 'unexpected end of JSON input'):
let apiToken = 'WORKING_KEY'
let response = await fetch(`https://workinglink.com/api/v1/working`, {
method: 'GET',
headers: {
'Authorization': `Bearer ${apiToken}`,
'Content-Type': 'application/json',
'Accept': 'application/json',
}
});
console.log('Response status:', response.status);
console.log('Response headers:', response.headers);
console.log('Response body:', await response.json());
Note, however, I'm able to call the below in the automated script:
let response = await fetch('https://worldtimeapi.org/api/timezone');
console.log('Response status:', response.status);
console.log('Response headers:', response.headers);
console.log('Response body:', await response.json());
Can anyone provide some guidance on what the blocker might be? Are there enterprise admin settings that could block me specifically from making certain API calls via automated scripts (I'm a user on an Enterprise plan), or am I missing something obvious with the automated script action and what the possibilities are?