Blox submit to zapier is empty
Hi all,
I'm trying to create my first blox widget that collects some data and submits it to Zapier. I'm using Zapier's webhooks app and its catch hook event. When I submit from Blox I see the request in Zapier but it shows querystring: as empty. I've followed the webhooks example from this page https://documentation.sisense.com/l2021-11-x/docs/sisense-blox-tutorials but I can't get it to work. I even tried adding some hard coded key value pairs into the data attribute of the action. Can anyone suggest what I'm doing wrong, and how to fix it?
Thanks,
Adrian
Adrian,
This is a known BloX issue CORS issue. Support tells me it will be fixed in L2022.2 or L2022.3. L2022.2 was released yesterday. If you are on Linux you might update and see if that resolves. No info on timing for the windows fix.
Support gave me a custom action that resolves the issue for me on Windows. Create a CustomAction and use that action in place of the standard Submit action.
The Custom Action script they provided is below. Note: they named it ajaxRequest, but you can name it anything that works for you.
Step 1 script:
$.ajax({
url: payload.url,
type: 'post',
data: payload.data,
success: console.log(`request ${payload.url} [ ${payload.data} ] succeeded!`)
});
Step 2 script:
{
"type": "ajaxRequest",
"title": "title",
"url": "yoururl.com",
"data": {
"text": "text"
}
}
I hope this is helpful. Regards, Jim
Adrian,
Note that the solution above does not work with Action Sets. Only with Actions. So instead of using an Action Set on your widget, just use an action. The button placement is not as nice, but other than that it works fine.
Regards, Jim