Applies to

Bridge by Smartsheet

Inbound webhooks reference

PLANS

  • Bridge by Smartsheet

Workflow request

Using the webhook request URL, you can make aPOSTrequest 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"

}

}

  • 工作流程:The only required field and must be set as a valid workflow name or UUID value
  • stateValues:An optional field used to preset the workflow states with the specified value
  • 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 theInbound-Webhook-Secret头与你的设置Secretvalues.

This solution doesn’t support webhooks, which include a challenge request. This will require a new custom integration to be built.

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 ofruntimeData, which is used to set the data available to the{{runtime}}handlebar in the workflow.

If you don’t specify a workflow or state values in your batch request object, the values set in the parent object are used instead. In the above example, the two workflows would runrequest1with the alternative workflow, and request 2 with the initial workflow.

If you want to override the parent values with nothing, set an empty object forstateValues. 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.

Was this article helpful?
Yes No