List of best practices with examples to create, maintain and use Workato Recipes:
Workato Recipes are automation of manual business processes. A Workato recipe is a set of one or more actions and a trigger. It runs the actions based on triggering events. For example, automation for the Employee Onboarding Process or automation of routine customer service processes. Workato provides an easy-to-use, drag-and-drop, low-code/no-code interface so even non-technical employees can easily use the platform.
If you want to design efficient Workato Recipes that work flawlessly and reduce human labor and human errors, you should get into the habit of following the best practices while designing, creating, maintaining, and using these recipes.
To help you with this, we have come up with this excellent resource where you can find all the best practices for Workato Recipes in a single place and in a concise form. So let’s begin!
Best Practices for Designing Workato Recipes
Learn about various best practices to design, create and maintain Workato Recipes:
1. Understand Requirements
First and foremost, you need to study and understand the existing manual processes that you want to automate. While reviewing the manual processes, note the finer details and ask questions like –
- What tasks/processes am I automating,
- Can it be broken down into smaller steps,
- What are the business rules I need to follow,
- What kind of data is involved,
- What is the format of incoming/outgoing data,
- Is there any data validation needed,
- Which apps will be involved,
- Which tasks each app will automate,
- What kind of errors might occur and how do I handle them.
Once you brainstorm all such questions and gather as much information as possible, your project becomes easier to plan and execute.
2. Choose the right Trigger Type: Real-Time, Polled, Batch, Scheduled
Four types of triggers or events can be used in Workato Recipes, i.e.
- Real-Time Events/Triggers
- Polled Events/Triggers
- Batch Events/Triggers
- Scheduled Events/Triggers
You need to select the triggering event carefully based on the time to respond and the outcome you plan to achieve. Refer to the table below to get an idea-
|Time Frame to Respond||Trigger Type||Outcome/Process Examples|
|Immediately||Real-time||Respond to website downtime instantly
Respond to marketing leads within 5 mins
|Within a set time frame||Polled||Track if a new hire accepted the job offer
Initiate onboarding process for new hires
|Run the job at fixed intervals||Scheduled||Execute monthly account reconciliation on the 5th of every month
Run data backup every Monday at 11 pm
|Work with many records at a time||Batch||Periodically sync the accounts or inventory
Load new data into the software app
3. Control Triggering Events
To ensure only relevant events trigger your recipe, Workato provides two methods for filtering your trigger events-
- Filter at the source:
Triggers like poll and batch triggers can be programmed to work by querying apps like Jira, ServiceNow, Salesforce, and so on. Depending on the triggering app, you can select fields to narrow the query. Some apps even have their specific query languages. You can use them to choose the specific fields depending on the business rule you need to implement.
- Filter by condition:
After filtering triggering events at the source you can use Workato’s granular filter to create conditional logic to narrow the triggering events further. This filter condition can work for any application. Refer to the table below to understand how you can filter the triggering events.
|What objects||Issues in Jira|
|What type of changes||All incidents or selected events like a bug|
|Past and/or future||Last 7 days, all historical data, etc.|
|Is the process time-sensitive||Every 5 mins, at 5 pm daily, and so on|
|How many at a time||Many events vs a single event|
4. Design for Idempotence
The recipe you create may generate duplicate records if you are not cautious about them while designing your Workato Recipe. Duplicate records lead to poor data quality and loss of data integrity.
A simple ‘Create’ action may not check if the record already exists and might create duplicate records. To avoid them, you need to use the ‘Upsert’ action instead of ‘Create’ while designing your recipes. Upsert database action is used to update a record if it already exists else create a new record if it does not exist. Let’s understand it using an example-
As you can see in the image above, you can design your own ‘Upsert’ operation in the Workato recipe to update a record if it already exists or create a new record.
5. Avoid Infinite Loops
Infinite loops can cause a lot of trouble in a recipe during execution. They can lead to a single task using the entire bandwidth, unwanted API calls, unnecessary job runs, etc. Infinite loops can be caused if a recipe calls itself repeatedly or when 2 recipes trigger one another.
You can avoid infinite loops by using trigger filters. For example, you can use a dedicated ‘integration_user’ account to filter events and cross-reference identifiers across apps. Then use a trigger filter to disregard updates created by Workato and avoid infinite loops.
6. Modularity and Reuse
Use callable recipes, whenever you can, to boost productivity, lower maintenance efforts, and make your recipes easier to read. Callable recipes can be compared to ‘Functions’ in a programming language. Workato provides this feature so the repetitive work can be done by calling a single recipe.
7. Handle Errors and Exceptions
When you automate a manual process, human judgment is missing, creating errors and exceptions during the execution. To catch these exceptions, Workato provides a ‘monitoring block’.
These monitoring blocks search for errors in a set of actions and specify what to do if errors occur. Make it a habit to use the Monitor-OnError block in your recipes to handle errors gracefully.
Best Practices for Workato Recipe Security
1. Considerations for Token, OAuth 2.0, or JWT
Consider distributing a JWT token encapsulating the Auth Token secret instead of the secret itself. JWT tokens are signed, include the client identity, and can have an expiration date.
2. API Tokens are like passwords
API tokens like passwords are confidential information that can grant access to your API to anyone. Make it a practice not to distribute API tokens to clients through insecure channels like text messages, emails, and so on. Use a secure messaging system or a document system such as Dropbox to which both the API owner and the intended client have access.
3. Don’t distribute the same API token to multiple people
Don’t distribute the same API token to multiple people. Each API token identifies a client. It enables monitoring requests in the API dashboard for that specific client. If multiple people have the same API token, there is no way to determine who is making calls to your API.
4. Have the policy to refresh API Tokens
Consider having the policy to refresh API tokens periodically. This is similar to expiring a password and ensures that any compromise of an API token does not provide long-term access to systems. The other option is to distribute a JWT token with an expiration date/time. This will limit the lifetime of the token.
5. Use IP whitelisting
Use the IP whitelisting part of the Access Profile for a client to restrict the originating IPs that are allowed to have API access.
However, some clients may not have a fixed IP address, for example, clients connected from a home network may get varied IPs from their providers, or may connect from multiple IP addresses (for example, while traveling). In this case, it may not be readily possible to whitelist their IPs. So use this if it does not restrict access to valid requests.
6. Using data pills to encapsulate sensitive information
Make sure you never expose sensitive data as plain text within a recipe. Do make it a habit to pass data such as user names, passwords, personal information, or anything which should be kept private using account properties or data pills.
Also read =>> Why API Security is a big deal?
Best Practices for Organizing Workato Recipes
1. Organize API recipes based on resource and functionality
Organize Workato recipes based on the functionality and resource it is serving. This practice will help you or anyone else clearly understand what purpose each API is designed for.
For example, if all the recipes related to customers are in a single place it is faster and more efficient to find the one you need. Else you will spend a significant amount of time just searching for the right one. It will also help to avoid duplicate recipes.
The image below shows one of the many ways you can organize your Workato Recipes.
2. Follow Naming Conventions
Create and use a recipe and an API naming convention to name all the recipes and APIs created by your team. The first part of the name can be the functional area and the last part should describe the purpose.
Also, remember to include the version number for easy identification. This will help you when communicating with your team members. See an example of a naming convention in the image below-
3. Version API Collections
For efficient management of recipes, you need to enforce a versioning system in your organization. This will help communicate changes made to the latest version of the APIs to developers who are using your APIs.
Best Practices for Scalability and Performance
1. Turn API Caching on
API Caching reduces the response time and subsequent calls to the API are much faster. So consider turning API Caching ‘On’ for use cases where API responses are generally the same based on the parameters provided.
2. Set limits for API Calls
Make it a practice to use API policies such as to set rate limits to prevent API clients from overconsuming the APIs. This is especially important for APIs that are connected to legacy backend systems which may not be able to handle a large volume of incoming requests.
We have listed the best practices to follow for Workato Recipes with examples and organized them based on the designing phase, security, performance, organization, and so on. Make it a habit to follow these practices for optimum performance and resource utilization.
At Incepta Solutions, our certified and experienced Workato developers have been following these best practices for all of our Workato projects. As a result, we have received rave reviews from the clients about the project quality, security features, and work ethics of our developers.
If you want to learn more or are looking to automate your mundane error-prone manual business processes and make them fast, efficient and error-free then contact our Workato team today!
Incepta Solutions | Powered by innovation, driven by results