Constructing URL Links

Build a notification URL from a fixed address and a dynamic value, then format the value or supply a fallback.

Use a Dynamic Expression to build a URL from a fixed address and a value that changes. This page shows you how to build a notification link, format its text, and handle missing values.

In this example, a webhook sends a status value. You'll add that value to a fixed address in the URL field of a New Notification action. Start with a webhook Automation where Body is available. If you haven't added the action yet, follow Custom Notifications.

1. In URL, enter https://site.test/.

2. Type {{ at the end of the address. A list of available values and functions opens.

3. Select GET. The expression editor opens with the cursor inside the function's parentheses.

4. Enter trigger.body, "status" inside the parentheses.

5. Select Done. The expression appears after the fixed address in URL:

URL

https://site.test/{{ GET(trigger.body, "status") }}

If the webhook sends open as the status, the link resolves to https://site.test/open.

Join text and values

Mixing ordinary text with an expression produces a string. You can also use CONCAT to join two or more strings without adding a separator. This expression builds the same link as the example above:

URL

{{ CONCAT("https://site.test/", GET(trigger.body, "status")) }}

Use these text functions to adjust the address or the value you add to it.

To do this

Use this expression

Result

Replace every space with a hyphen

{{ REPLACE("https://site.test/a b", " ", "-") }}

https://site.test/a-b

Convert text to lowercase

{{ LOWERCASE("HTTPS://SITE.TEST/Path") }}

https://site.test/path

Remove spaces at the start and end

{{ TRIM(" https://site.test/path ") }}

https://site.test/path

Supply a fallback for a missing value

Wrap the dynamic part in IFEMPTY to supply a fallback when it’s empty or unresolved. Here, the link ends in unknown if the webhook doesn't supply a status:

URL

https://site.test/{{ IFEMPTY(GET(trigger.body, "status"), "unknown") }}

Without a fallback, unresolved values become empty text in notification Message and URL fields and in custom email messages.

Read a value from a webhook

Use GET(trigger.body, "status") to read the status property when Body is available. GET reads the JSON body even when the webhook supplies it as text. If the path doesn't exist, GET returns an undefined value.

To read from query parameters instead, use the webhook's query parameter data as the first argument to GET. Use the parameter name as the second argument, then insert the expression where that value belongs in your URL.

Common questions

Use the triggering idea’s full URL as the destination for the email button. See Context Variables for values from the trigger.

Add a condition before the notification action that matches only when the link value is present. If the condition doesn’t match, the notification step won’t run; see Conditions.

In Send Email, add a button and use a dynamic expression for its destination. Choose the available link for the relevant idea or collection; see Custom Emails.