Forum Discussion

adrian_lester's avatar
adrian_lester
Cloud Apps
01-18-2022
Solved

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

  • Silutions's avatar
    Silutions
    02-18-2022

    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

5 Replies

Replies have been turned off for this discussion
  • 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

    • Silutions's avatar
      Silutions
      ETL

      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

  • Hi adrian_lester 
    Could you check in the browser console if there are any errors?
    Could you please share a snippet of your code? Are you using any custom action or just the default submit sisense action?

  • Thanks for the great help and responses everyone.  Apologies I've not got replying sooner, covid got in the way.  The custom action and fix for the CORS issue gets me going ok once I avoided the ActionSet.

    Thanks again,
    Adrian

    • jfarmer's avatar
      jfarmer
      Cloud Apps

      We were having a similar issue and also have a Linux environment. We ended up switching from Zapier to Integromat and Integromat works without the issues tied to Zapier. We did get the custom action to work that was mentioned above for Zapier, but found it easier to use a tool that didn't require the additional coding and still allowed us to do everything we were able to do with Zapier before.