Skip to main content

I'm trying to use a web app deployed via Google Apps Script inside Airtable Extensions and Automations by selecting "Run a script." However, I'm encountering the following error:
Response status was 302 'Moved Temporarily' but redirect mode was set to 'error'

Despite this error, the action triggered by the request is actually executed successfully.

I tested the same request using Thunderclient and did not encounter the error — everything worked as expected.

Searching the community, I found a workaround suggesting the creation of a webhook to handle the requests. I implemented this through Zapier, and using the webhook, the requests now run successfully within Airtable (both in Extensions and Automations).

However, this setup isn't ideal for me because it adds an unnecessary (and paid) middle step just to retrieve a simple success response from my Apps Script API.

My questions:

  • Is there a way to configure Airtable to prevent or handle this 302 error directly?

  • Or, is there a better solution to integrate my Google Apps Script web app without needing a third-party webhook?

Thanks so much for your attention and help!

I'm trying to use a web app deployed via Google Apps Script inside Airtable Extensions and Automations by selecting "Run a script." However, I'm encountering the following error:
Response status was 302 'Moved Temporarily' but redirect mode was set to 'error'

Despite this error, the action triggered by the request is actually executed successfully.

I tested the same request using Thunderclient and did not encounter the error — everything worked as expected.

Searching the community, I found a workaround suggesting the creation of a webhook to handle the requests. I implemented this through Zapier, and using the webhook, the requests now run successfully within Airtable (both in Extensions and Automations).

However, this setup isn't ideal for me because it adds an unnecessary (and paid) middle step just to retrieve a simple success response from my Apps Script API.

My questions:

  • Is there a way to configure Airtable to prevent or handle this 302 error directly?

  • Or, is there a better solution to integrate my Google Apps Script web app without needing a third-party webhook?

Thanks so much for your attention and help!

Hello ​@OPEAConsult,
The 302 error occurs because Airtable Automations cannot follow redirects from Google Apps Script endpoints. To address this, you can modify your Apps Script to return a direct response instead of a redirect. Alternatively, use the redirect: "follow" option in your fetch request if supported. Avoid third-party services by ensuring your script handles requests without redirection.


Best Regards,
David Baker!--startfragment>

!--endfragment>


Things to try (if previous solution not worked)
- In Airtable Extension, use remoteFetchAsync instead of fetch
- use redirect: "manual" in header


@Alexey_Gusev thank you for your answer. I am already using remoteFetchAsync on Extensions and I have already tried use redirect: "manual" in header and it doesn’t work.

@david349baker Thank you for you answer too. I also tried redirect: "follow" and it doesn’t work. Regarding the modification on my Apps Script to return a direct response instead of a redirect, how can I do this. The code I am using is retuning a JSON stringfyed as follows:
 

  const data = {
message: "This is a direct JSON response",
status: "success"
};

return ContentService
.createTextOutput(JSON.stringify(data))
.setMimeType(ContentService.MimeType.JSON);

Is that what you mean or should I do something else to send a direct response?


Reply