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

Fetch Response is Empty

Topic Labels: Automations
1385 1
cancel
Showing results for 
Search instead for 
Did you mean: 

Hey,

I want to sync my base with another endpoint.
Thus I created an automation with a trigger on update > than fetch result with post request to other endpoint.

The problem is, that I do not get any response.

const res = await fetch(url, { method: "POST", body: JSON.stringify(body), headers: headers })
console.log(res.json())

I checked the fetch function with different endpoints, in Postman I do get the response back, but not with the fetch function from airtable.

Am I doing something wrong?

br
Vinzenz

1 Reply 1

I found my mistake.

the correct code is:

const res = await fetch(url, { method: "POST", body: JSON.stringify(body), headers: headers })
const data = await res.json()
console.log(data)