Most of the time, automation leaders or customers expect us to deliver use cases quickly, while ensuring they are robust and reliable. In the .30 Automation Success Platform release, there is a new feature called Templates. This feature allows us to create reusable components and publish them in a common public folder. It enables both citizen and professional developers to create and utilize these templates, thereby reducing turnaround time for delivering new or common use cases with much ease.
In this blog, we will explore how to create Custom Templates for task bots. Let's explore a few reusable component ideas you can implement in your organization.
- Industry Specific Reusable Components
- Config Reader
- CRM Login/Logout tasks
- Accessing Terminal Emulator Screens
- Updating error logs and sending notifications
- CRUD Operations in Database
- API operations
- Environment Setup
- File and folder management
- Reporting & Monitoring
- Websites and many more.
Pre-Requisites
Create a custom role and assign the following permissions for both pro and citizen developers who will use the Templates Folder:
- View my bot's permission
- Check in
- Check out
- View content
Template Creation
Create a common Templates Folder in a private workspace, which will be used to store all the reusable tasks.
ConfigReader Template Overview
The Config Reader reusable template will fetch the config node values that are configured in the config.xml file into the respective variables for further usage in the Parent bot. Before it reads the node, it will verify if the given XML is valid or not. If it's valid, it will fetch the node values. If not, it will log the required details and terminate the bot. Feel free to customize the nodes and logic as per your needs.
![](https://uploads-us-west-2.insided.com/automationanywhere-en/attachment/7a3b6b50-28a3-40e4-85ac-ab1eb448b573.png)
Download the Config.xml file from the path below and map the path to the 'sConfigPath' variable. Then, create a Logs.txt file and pass the value to the 'sLogFilePath' variable before running the bot.
Configure Input Variables:
![](https://uploads-us-west-2.insided.com/automationanywhere-en/attachment/c80f840d-1fa5-4161-b638-d2f629236c34.png)
Bot Output:
![](https://uploads-us-west-2.insided.com/automationanywhere-en/attachment/dd710599-9f10-4429-8a71-29efb034a7ba.png)
Find the Template and Config links below for usage:
Template : Link
Config : Link
- Will be using “ConfigReader” task bot developed by pro developer for reading config file values as a template.
![](https://uploads-us-west-2.insided.com/automationanywhere-en/attachment/dcd0d8cd-24ab-48c3-b1aa-72f9e23d7e8e.png)
- On the top right, click on the drop-down button next to the save button, and select the Save as Template option.
![](https://uploads-us-west-2.insided.com/automationanywhere-en/attachment/e783fb8b-1b89-4ea2-93a6-781ce872f23b.png)
- Provide the template name, choose the destination Template Folder and click on Save.
![](https://uploads-us-west-2.insided.com/automationanywhere-en/attachment/29905cc1-6fa1-4f12-9dac-7eaef96ad260.png)
![](https://uploads-us-west-2.insided.com/automationanywhere-en/attachment/d6207b58-dace-4ba3-b065-68b456aff113.png)
- Let's check-in the template to see it in the public workspace.
![](https://uploads-us-west-2.insided.com/automationanywhere-en/attachment/eeaf5e86-8c6a-4be5-8774-9387bb78f092.png)
![](https://uploads-us-west-2.insided.com/automationanywhere-en/attachment/3ab76f17-4b06-4810-97bd-f9462e77a71c.png)
![](https://uploads-us-west-2.insided.com/automationanywhere-en/attachment/76d2b697-8525-4640-b5ff-ab56f825dbe1.png)
- Feel free to edit, copy, delete, export and import the template from the public workspace in the same way we do for task bots.
Create Task Bot from Template
Enable citizen developers to create task bots from templates.
- In the top right corner of the private workspace, click on Create New >> Task Bot from Template.
![](https://uploads-us-west-2.insided.com/automationanywhere-en/attachment/271f06a9-3429-44f9-8316-d8ee15f3b171.png)
- Select the required template from the catalog. Here, we will choose the ConfigReader Template and click Continue.
![](https://uploads-us-west-2.insided.com/automationanywhere-en/attachment/44aac7fa-034f-4729-b1fd-ae3a090660db.png)
- Provide Bot Name, choose the target folder and click on Create & edit button.
![](https://uploads-us-west-2.insided.com/automationanywhere-en/attachment/3d61535c-b495-4654-ab07-10c9d9d2740b.png)
- In a few seconds, the template is converted to a task bot in your private workspace for customization as per business need.
- Checkout templates - known behaviors from this link.
Conclusion
The Automation Success Platform's Templates feature is a game-changer. Citizen and pro developers can build and share reusable task bots, streamlining development. Experience significant time savings and empower your team to automate faster, together.