How to use the Bridge Inbound Webhook Advanced Triggers

Hi,

I am able to create an Inbound Webhook workflow trigger in Smartsheet Bridge and able to pass data in the body.

I am following Inbound webhooks utility function | Smartsheet Learning Center and Inbound webhooks reference | Smartsheet Learning Center to understand how to use this integration.

I have two questions:

  1. How to use the Advanced triggers where I can pass the secret? I added the "secret" in a header field "secret" and intentionally put wrong values in it and the webhook was still triggered
  2. The first article says, "When you use workflow triggers, you won't need to specify the request body or headers." The second help article (reference one) shows a request body with workflow name or UUID, stateValues and also a uid field. How to setup the webhook so it actually requires these fields?

  3. What is the use of the State Values that are part of the Inbound Webhook setup?


Regards,

AK

Answers

  • Hey @akhalid

    These are good questions and I'm learning the answers along with you!

    1) As you've noted, you can specify a secret which will be passed as the value for the Inbound-Webhook-Secret header.

    When you create a trigger in the Triggers tab, the request url includes a workflow id value. In the Advanced tab, it does not.

    My assumption is that this is because the Inbound-Webhook-Secret header should be used for all workflows in that workspace (so the workspace id is provided in the body rather than as a url parameter). Based on this, I believe that if the call contains a uid parameter in it Bridge assumes it’s a standard trigger, which doesn’t require the Inbound-Webhook-Secret. If there is no uid parameter, Bridge looks to the Advanced triggers and enforces validation of the Inbound-Webhook-Secret.

    Can you confirm that your workflow includes the uid parameter in it? This would explain why adding an incorrect secret value still triggered your workflow.


    2) I'm not certain how to ensure these fields are mandatory, however the Workflow UID does look to be appending as a query parameter in the URI by default.

    3) State Values are pieces of metadata you can associate with a State of the same name in the workflow (i.e. Sheet ID, Row ID). This is any static value you want included in every trigger from that inbound webhook.

    Let me know if this helps!

    Cheers,

    Genevieve

    Need more help? 👀 | Help and Learning Center

    こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions

  • akhalid
    akhalid ✭✭✭

    Thanks @Genevieve P. ,

    I can confirm that I was using the "Request URL" from the Trigger tab that contained the UID.

    I am able to get the Trigger to work, based upon "Workflow Request URI" from the Advanced tab that uses a secret.

    The header contains: { Inbound-Webhook-Secret: <the secret given to you> }

    For the benefit of others, here is what it looks like with dummy payload (this goes in the body):

    {

      "workflow":"<Workflow name>",

      "uid":"<Generate a unique ID for each request>",

      "payload":

      {

        "id":1233,

        "projectName":"Inbound Webhooks for client",

      }

    }

    If I substitute the Workflow name for the UID from the Trigger tab, then the workflow does not trigger. I think there must be another way to get the Workflow UUID. The reason is that when I created another workflow trigger that triggered the same workflow, the UID generated was different this time, e.g.

    1st workflow trigger:

    https://prefix.bridge.smartsheet.com/api/webhook/inbound_webhook/<alphanumeric 1>/<alphanumeric 2>/workflow?uid=1fc5ac3a-5d32-4d58-9916-72e9d4f03309

    2nd workflow trigger pointing to the same workflow:

    https://prefix.bridge.smartsheet.com/api/webhook/inbound_webhook/<alphanumeric 1>/<alphanumeric 2>/workflow?uid=d91e05c4-65a8-40c0-a89c-e6456ee41e55

    alphanumeric 1 and alphanumeric 2 were same for both the triggers.

    Any ideas on how to get the workflow UUID from elsewhere?


    Regards,

    AK

  • Hey @akhalid

    I don't know of a way to get the UUID from the Bridge UI - I would suggest using the workflow name instead; since we can't edit Bridge workflow names this should stay static.

    Need more help? 👀 | Help and Learning Center

    こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions