Help

Welcome to the Airtable Community! If you're new here, check out our Getting Started area to get the most out of your community experience.

Trigger webhook from HTML form submission — CORS error

Topic Labels: Automations
Solved
Jump to Solution
825 3
cancel
Showing results for 
Search instead for 
Did you mean: 

Fetch request is built like this, including these headers:
CleanShot 2021-10-14 at 19.52.10

But it returns a CORS error — the webhook isn’t returning Access Control Allow Headers…

CleanShot 2021-10-14 at 19.47.03

Oddly enough I can get it to work from Postman:
CleanShot 2021-10-14 at 19.53.56

And if I follow the proxy outlined here it works as well.

Is there a way to make the webhook return that header? Or another solution? Thanks!

1 Solution

Accepted Solutions

Thanks for the details.

Erin from the community team reached out to confirm that the incoming webhook trigger doesn’t currently support CORS. The reason it works on Zapier / Postman is because they execute the requests from their servers, rather than the browser.

For now I’m just going to keep it simple and use Zapier rather than abandoning CORS, and hope Airtable Webhooks support CORS at some point in the near future.

See Solution in Thread

3 Replies 3

For more context, I tested it out with Zapier Webhook and it passed when I removed all the headers from the fetch options:

const fetchOptions = {
    method: 'POST',
    body: formDataJsonString,
};

but this same header-less payload still returns a CORS error with Airtable’s Webhook.

Users don’t currently have any control over how Airtable’s webhook automation trigger responds to requests (and I doubt that we ever will). I recommend reaching out to Airtable support directly (in the app: Help → Contact support). While Airtable staffers do frequent the forum, they prefer to be approached directly with support requests, and this leans pretty heavily in that direction IMO.

That aside, have you tried the “no-cors” mode that was recommended in the error message you received (seen in your screenshot)? I’ve only called Airtable webhooks from within other Airtable scripts, so I haven’t needed to test this workaround and therefore don’t know how exactly it should be applied, but it’s probably worth investigating.

Thanks for the details.

Erin from the community team reached out to confirm that the incoming webhook trigger doesn’t currently support CORS. The reason it works on Zapier / Postman is because they execute the requests from their servers, rather than the browser.

For now I’m just going to keep it simple and use Zapier rather than abandoning CORS, and hope Airtable Webhooks support CORS at some point in the near future.