Workflow: How to use dynamic variables in your URL


#1

Use dynamic variables in your workflow webhook

Dynamic variables can be used to send values in the webhook URL. These “variables” will be evaluated and sent as URL parameters.

For example, if you want to include the customer’s email in the webhook, you can use the dynamic variable to do so. The webhook URL would then be:

https://yourwebservice.com/helpmonks?email=$sender_email$&id=$conversation_id$

In this example, the webhook will evaluate the variables and will pass the following to your system:

https://yourwebservice.com/helpmonks?email=awesome@customer.com&id=af768a69046d

Please take a look at the available default variables in the below table. In addition, to the default dynamic variables, you can use any custom field, also.

Using custom fields as dynamic variables

You can use any custom field to populate the variable with its value. To do so, please make sure that your “Custom Field Variable Name” has a value (you can also just click on “Save” within the custom field edit dialog and it will create it for you). Once done, you can use that “custom field variable” and include it in your webhook URL like:

https://yourwebservice.com/helpmonks?myfield=$project_name$

The example above assumes that you have a custom field called “Project name” with the variable “project_name”.


Default Dynamic Variables

These are all the built-in dynamic variables that you can use as URL parameters

Variable Value
$conversation_id$ The ID of the conversation
$mailbox_id$ The ID of the mailbox
$conversation_subject$ The SUBJECT of the conversation
$sender_id$ The ID of the last user who replied
$sender_first_name$ The FIRST NAME of the last user who replied
$sender_last_name$ The LAST NAME of the last user who replied
$sender_email$ The EMAIL of the last user who replied