+
+

Module 2: Invoke RPA Services from Composer

Overview

MuleSoft RPA Connector for MuleSoft Composer enables you to invoke RPA processes and configure polling triggers from your Composer flows. You can use the RPA connector to invoke an RPA process, pass data to an RPA process and retrieve results from the RPA process.

In this Module you can choose the location of where to send the data {email} for the Bot to execute the registration, this could be a CRM (like Salesforce) or googlesheet. For our Module, we will use Salesforce to RPA BOT to Slack notification.

For more information, refer to the MuleSoft RPA Connector for Composer documentation for configuration and usage details.

Setting up your System for Composer Flow Build

  1. In a Google Chrome Window, log into the MuleSoft composer. This is the env where you will create the flow that listens to new Googlesheet row and write into the BOT and you get notification in Slack.

    URL: https://composer.mulesoft.com
    Username: ase_workshop_user
    Password: <to be provided by the instructor>
  2. In the new Chrome Tab, sign in to salesforce. This is where you can enter the names.

    URL: https://login.salesforce.com
    Username: automationworkshop@nto.com
    Password: <to be provided by the instructor>

In MuleSoft Composer Clone the Composer Flow

Mule Team has built the following Flow : Draft Newsletter Signup Process - SF Contact - Do Not Delete, you can clone the project. Be sure to rename it with your initials.

2 1 1
  1. Click the elipsis (three dots) next to the "Draft Newsletter Signup Process - SF Contact - Do Not Delete" Composer Flow and select clone.

  2. Click the pencil icon next to the Flow name and replace "Copy of" with your initials, then click Save.

Review the Composer Flow

Lets take a look at what the Composer Flow is doing. Do not make changes

2 1 2
  1. Expand the Salesforce trigger by clicking on the expand icon next to step 1

    1. Notice the trigger is monitoring for a new or updated contact.

  2. Collapse the Salesforce trigger

  3. Expand the RPA Step

    1. Notice the action is calling a RPA Bot with the email address returned from the Salesforce trigger.

  4. Collapse the RPA Step

Modify the Composer Flow

You can now make change ;)

Now we are going to modify the trigger condition and add a condition that if the RPA Bot is successful we will post a slack message saying the registration was a success and if it fails, we will post a message saying the registration failed.

Update Trigger . Expand the Salesforce Trigger "Trigger: On New or updated record in Salesforce" . Change the Operator to "Equals" and enter your name in "Value"

Create If/Else block . Click the Add Step Icon below the RPA Step and select If/Else Block. .. In the Field Textbox select "RPA Execution Status" .. Change the Operator to equals .. In the Value textbox type SUCCESS (Success must be capitalize)

  1. Click the Add Step Icon inside the If/Else Block

    1. Click "Select Action", choose the Slack Connector and select Notification Connection in the Choose a Slack connection dialog.

    2. In the Action dropdown box, select "Post Message to channel"

    3. For Channel Name, click the Magnifying Glass and select "Pick from List" and then select "automation-workshop"

    4. Click the Message textbox and select "Custom Expression"

    5. Click the Data section and select Full Name and then in the Message box continue typing "newsletter registration successful." Leave the rest of the fields blank.

    6. Click Apply.

  2. Click "Add Else"

  3. Click the Add Step Icon inside the Else Block

    1. Select System Action

    2. Choose the Slack Connector

    3. Click Notification Connection in the Choose a Slack connection dialog.

    4. In the Action dropdown select "Post message to channel"

    5. For Channel Name, click the Magnifying Glass and select "Pick from List" and then select "automation-workshop"

    6. Click the Message textbox and select "Custom Expression"

    7. Click the Data section and select Email and the in the message continue typing "newsletter registration failed."

    8. Click Apply.

    9. Leave the rest of the fields blank.

  4. Click "Save", in the top right corner

  5. Click "Test"

Trigger the Composer Flow from Salesforce

  1. Switch to Salesforce tab

  2. Click ContactsNew

  3. Make sure Contact is selected and click Next

  4. Enter your first name & last name

  5. Under Account Name select Northern Trail Outfitters

  6. Enter an Email, must be proper email format. i.e. abcde@sample.com

  7. Click Save

View Activity

  1. Instructor will show slack activity

Submit your feedback!
Share your thoughts to help us build the best workshop experience for you!
Take our latest survey!