Template Examples
These examples show common ways to use a template. Replace the placeholder names with the fields your workflow provides, and create each one as described in Creating a Template.
JSON request body
Type: JSON. Build the body for a REST call from workflow data.
Quote text values. Leave numbers and booleans bare. Use json for a whole object or list. For example, with customer.name set to Ada, customer.points set to 120, and one item, the result is {"customer": "Ada", "points": 120, "items": [{"sku": "A1"}]} in a single document.
XML payload
Type: XML. Keep a single root element.
Values are escaped for markup, so a name such as Smith & Sons is written safely.
HTML email
Type: HTTP (HTML). Do not add scripts, inline event handlers, or javascript: links.
Plain-text message
Type: Text. Nothing is escaped, so use it for SMS or log lines.
Choose between two blocks
Type: Text. The same blocks work in an HTTP (HTML) template. In a JSON template, make sure each branch writes valid JSON.
Share one template across workspaces
- Create the template at the Organization level and publish it. To share a template that already exists in a workspace, promote it instead. A promotion cannot be undone and fails if the organization already has a template with that name.
- In each workflow, select the template in the Template activity. It shows (Organization) after the name.
Workflows that already used a promoted template keep working.