Tech

Order cupcakes using MuleSoft Composer and Bots (part1)

Photo of Olga Kepa, MuleSoft Developer Written by Olga Kepa, MuleSoft Developer,   Dec 1, 2022

In the previous blog, Birthday wishes from MuleSoft Composer, we explained how to use Composer and its connectors to configure and set up simple process automation. We automated repetitive tasks of tracking and sending birthday and work anniversary wishes to our employees. Today we utilise MuleSoft further to deliver end-to-end automation of the complete process. In addition to messages, we will build Bots to order and post delicious Lola's cupcakes for our special occasions.

Invoking the bot with MuleSoft Composer

MuleSoft Composer is a powerful no-code solution for creating and configuring system integrations. You don't need IT skills to quickly connect apps and data sources. Our integration starts with setting a daily executed scheduler in MuleSoft's Composer. The scheduler initiates our workflow.

trigger workflow

The next step is to connect to Breathe HR, our cloud-based HR platform. MuleSoft Composer's HTTP Connector fetches information about employees from Breathe HR.

breath hr employee data

In the Exit Example Response, we set the response to include only data required to order the cupcakes, such as the employee's name, address, or mobile number.

{
   "employees":[
      {
         "id":6048,
         "first_name":"John",
         "middle_name":null,
         "last_name":"Smith",
         "email":"john.smith@breathehrsandbox.com",
         "join_date":"2020-09-27",
         "address1":"18 Broadway",
         "address2":"",
         "address3":"",
         "city":"London",
         "postcode":"SW53 9XQ",
         "country":"United Kingdom",
         "personal_mobile":"01234 56789"
      }
   ]
}

We find employees whose work anniversary is in two days.

search for a birthday person

When we discover a lucky person, we call the cupcake-order Bot responsible for ordering the cakes. To do that, we first need to establish the connection and Select the action, RPA Process, and Output.

invoke MuleSoft RPANow, we fill in the Input fields using the employee's data retrieved from Breath HR. For the delivery date, we build a custom expression to deliver the cupcakes exactly on the special day.

input fieldsOnce the bot finishes the execution, MuleSoft Composer publishes a message to the Slack channel to report the successful completion.

message to Slack

The message includes RPA execution ID and RPA Execution status. You can see the example message below:

mulesoft composer complete process

And that's it! In part two of this blog, we will explain how to build and execute a MuleSoft Bot that orders cupcakes for special occasions. We'll include a video to help you follow the whole process.

Topics: MuleSoft Tech RPA

We’d love to hear your opinion on this post