Trigger webhook from HTML form submission — CORS error

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…

Oddly enough I can get it to work from Postman:

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!

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.

This topic was solved and automatically closed 3 days after the last reply. New replies are no longer allowed.