Help

Upcoming database upgrades. Airtable functionality will be reduced for ~15 minutes at 06:00 UTC on Feb. 4 / 10:00 pm PT on Feb. 3. Learn more here

Failing fetch when server respond with 200

Topic Labels: Extensions
225 1
cancel
Showing results for 
Search instead for 
Did you mean: 

Hello,
I’m trying to replicate an app already built on GoogleAppScripts into Airtable.
The problem I’m facing is with the fetch call.

Fetch call

const availability = await fetch('https://url', {
        method: 'POST',
        body: JSON.stringify({productId: productId})
    }).then(res => { 
        const result = res.json();
        output.text(`Result ${result}`);
        return result;
    }).catch((error) => {
        output.text(`Error ${error}`);
    });

The API runs on firebase function and the response is 200

Function execution took 10175 ms. Finished with status code: 200 
1 Reply 1

So help us understand…

  1. Where is the above code running? Airtable script block? Airtable custom app? Airtable automation script?
  2. It is calling a Firebase Cloud Function?
  3. The response is 200OK and without providing any of the cloud function source you want to know why it is failing despite returning 200OK?
  4. You’re trying to run code from Google Apps Script in Airtable? This is not typically possible without significant changes.