Hello! I hope someone came across this behavior and can help out!
I have this javascript code I am attempting to execute in Zapier to create a new Taskboard:
fetch ("https://api.monday.com/v2", {
method: 'post',
headers: {
'Content-Type': 'application/json',
'Authorization' : 'YOUR_API_KEY_HERE'
},
body: JSON.stringify({
'query' : query
})
})
.then(res => res.json())
.then(res => console.log(JSON.stringify(res, null, 2)));
Which come straight from the Monday API documentation: Boards (monday.com)
When I put that code into my Zapier âRun Javascript in Code by Zapierâ it complains about not having a output variable, so I add one, i.e. output = ;
But nothing happens. No new board named âmy boardâ is being created in Monday.
However, when I use postman to send the code it works and the âmy boardâ is created:
Create a board - My Workspace (postman.co)
I also tried copying the postman code into Zapier, but that didnât work either as I am ending up with this error message:
âIf you are doing async (with fetch library) you need to use a callback!â
Iâm kinda stuck - any ideas?
Thanks!