Inbound Webhooks Reference

Applies to

Bridge by Smartsheet

Chat Request

Using the Chat Request URI, you can make a POST request that will start a Bridge Workflow on a specified chat channel, using the following request body:

{

    "channel": "chat chanel name or UUID",

    "workflow": "workflow name or UUID",

    "stateValues": { 

        "statename":"value"

    },

    "runtimeData": {},

    "emails": ["one or more user emails"]

}

  • channel: required field, must be set as a valid channel name or UUID
  • workflow: required field, must be set as a valid workflow name or UUID
  • stateValues: used to pre-set the workflow states with the specified value, this is optional
  • runtimeData: used to pass additional data that is available to the workflow using the {{runtime}} handlebar reference, this is optional
  • emails: a list of user emails that the workflow should be run for

Remember that all requests to this endpoint require the Inbound-Webhook-Secret header to be set with your Secret values.

Chat Batch Requests

If you want to run more than one workflow with a single request you can pass a batch object as part of the body request

{

    "channel": "chat chanel name or UUID",

    "workflow": "workflow name or UUID",

    "stateValues": { 

        "statename":"value"

    },

    "runtimeData": {},

    "batch": [

        {

            "emails":["user1@example.com"],

            "stateValues": { 

                "statename":"value1"

            }

        },

        {

            "emails":["user2@example.com"],

            "stateValues": { 

                "statename":"value2"

            }

        }

    ]

}

If you specify both batch and emails, batch will be used and emails will be ignored.

Each batch object can specify emails, channel, workflow, stateValues, and runtimeData, the same as the parent object did and multiple requests will be made to start the workflows with the different request details.

If you do not specify channel, workflow, stateValues or runtimeData in the batch object, then the values from the parent object will be used instead. If you want to override stateValues or runtimeData with no values, then you must send an empty object as undefined values will be treated as not set and the parent value will be used.

Workflow Request

Using the Webhook Request URI, you can make a POST request that will start a Bridge Workflow, using the following request body:

{

    "workflow":"workflow name or UUID",

    "stateValues":{ 

        "statename":"value"

    },

    "uid":"a generated unique ID for the request",

    "extra_stuff":{

        "lots":"of it"

    }

}

  • workflow: the only required field and must be set as a valid workflow name or UUID value
  • stateValues: used to pre-set the workflow states with the specified value, this is optional
  • uid: a unique identifier used so our system will ignore duplicate requests if you send the same request multiple times
  • Every other field you send as part of the POST body: passed to the workflow, and is referenced using the runtime handlebars, for example {{runtime.extra_stuff.lots}} with the return of it. any valid JSON value will be passed

Remember that all requests to this endpoint require the Inbound-Webhook-Secret header to be set with your Secret values.

Workflow Batch Requests

If you want to run more than one workflow with a single request you can pass a batch object as part of the body request

{

    "workflow":"workflow name or UUID",

    "batch":[

        {

            "uid": "request1",

            "workflow":"alternative workflow",

            "stateValues":{

                "state":"value"

            },

            "runtimeData":{

                "key":"value"

            }

        },

        {

            "uid": "request2",

            "stateValues":{

                "state":"value"

            }

        }

    ]

}

The batch request object uses the same fields as the main request, with the addition of runtimeData, which is used to set the data available to the {{runtime}} handlebar in the workflow.

If you do not specify a workflow or state values, in your batch request object, the values set in the parent object are used instead, so in the above example, the two workflows would run request1 with the alternative workflow, and request 2 with the initial workflow. If you want to override the parent values with nothing, then you must set an empty object for stateValues, as undefined values will be treated as not set and the parent value will be used. The uid field from the parent object will be ignored when you are using batch requests, but each batch object can set its own uid if required.

Even if each batch object defines its own workflow, the workflow in the main request is still required