?? Understanding Workato Message Templates: A Guide with Examples
Vinay Kumar N
Integration Developer | Workato Certified | Mulesoft Certified | CCNA and MCSE Enthusiast
Workato message templates enable you to create static templates for commonly used messages. They utilize Mustache as the templating language, making it easy to generate HTML, text, JSON, or XML messages. By separating the message composition logic (designing the message) from the generation logic (sending the message), developers can modify message formats without altering the underlying recipes.
? Key Features of Workato Message Templates
??? Template Basics and Syntax
1.Variable Substitution: Variables are placeholders for dynamic content.
Example:
<p>{{name}}</p>
?If the variable name is "Fiona Summers," the output will be:
<p>Fiona Summers</p>
2. HTML Escaping: Variables are HTML escaped by default. To disable escaping, use triple braces ({{{ }}}) or an ampersand ({{& }}).
3.Sections:
4.Comments: Comments, enclosed in {{! }}, are ignored during rendering. 5.Partials: Reusable snippets defined with {{> partial_name }} inherit the parent context.
?? Real time examples
For one of our enterprise customers, we implemented an integration for onboarding and offboarding, utilizing an HTML message template to design the format according to their specific requirements.
领英推荐
Input:
{ "name": "John", "company": "Twenty20 Sytems", "location": "New Jersey", "joining_date": "31-01-2025" }
Output:
Another example involves creating a custom page in Confluence with employee data. Using this message template, we implemented the format to meet the specified requirements.?
Input:
[{ ? ? "First_name": "John", ? ? "Last_name": "Doe", ? ? "Gender": "Male", ? ? "Age": 29, ? ? "Department": "Engineering", ? ? "JobTitle": "Software Engineer", ? ? "EmployeeId": "E12345", ? ? "City": "New York", ? ? "Country": "USA" ? }, ? { ? ? "First_name": "Jane", ? ? "Last_name": "Smith", ? ? "Gender": "Female", ? ? "Age": 34, ? ? "Department": "Marketing", ? ? "JobTitle": "Marketing Manager", ? ? "EmployeeId": "E12346", ? ? "City": "Los Angeles", ? ? "Country": "USA" ? }, ? { ? ? "First_name": "Carlos", ? ? "Last_name": "Gomez", ? ? "Gender": "Male", ? ? "Age": 41, ? ? "Department": "Sales", ? ? "JobTitle": "Sales Executive", ? ? "EmployeeId": "E12347", ? ? "City": "Madrid", ? ? "Country": "Spain" ? }, ? { ? ? "First_name": "Anna", ? ? "Last_name": "Ivanova", ? ? "Gender": "Female", ? ? "Age": 28, ? ? "Department": "Finance", ? ? "JobTitle": "Financial Analyst", ? ? "EmployeeId": "E12348", ? ? "City": "Moscow", ? ? "Country": "Russia" ? }, ? { ? ? "First_name": "Liam", ? ? "Last_name": "Brown", ? ? "Gender": "Male", ? ? "Age": 35, ? ? "Department": "Human Resources", ? ? "JobTitle": "HR Manager", ? ? "EmployeeId": "E12349", ? ? "City": "Sydney", ? ? "Country": "Australia" ? }]
Output:
?? Using Templates in Workato Recipes
To use templates in recipes:
?? Conclusion
Workato message templates are a powerful feature for creating structured, reusable, and dynamic messages. By leveraging their flexibility and modularity, developers can simplify automation workflows while maintaining high-quality communication outputs. Whether for emails, notifications, or reports, message templates provide an efficient and scalable solution??
If you're interested in automating updates or exploring similar integrations, feel free to reach out: Learn more here.
CTO @ Twenty20 Systems | We are Hiring !
2 周Great write up Vinay Kumar N ??