MuleSoft Composer: An approach to simple integrations (including a practical use case)

Mohammad.Jani
Another Integration Blog
5 min readDec 16, 2022

Overview

  1. Introduction to MULESOFT COMPOSER
  2. Demonstrating a Practical use case using GOOGLE SHEETS and SLACK

Introduction to MuleSoft Composer:

MuleSoft composer follows a low code approach, which allows you to design the entire automation integrating multiple systems in just a few clicks. MuleSoft Composer does come with many pre-built connectors like NetSuite, Tableau, Slack, Workday, Teams, Stripe, Twillio, Google Sheets, Salesforce and many more which enables automating simple integrations between these systems. As a result of MuleSoft Composer’s low-code approach, you will be able to automate processes and build integrations with little to no coding. In the following article we will see just how simple it is to integrate between Google sheets and Slack using Composer.

Getting Started with MuleSoft Composer

  1. Login into the Salesforce Org which is enabled with MuleSoft Composer
  2. Create a New Flow (flow is a designer which contains of system events.)

3. Once you’ve created a new flow, you will have 2 options to choose from:

  • System Events (choose this if you want your flow to be triggered by some system events like salesforce , NetSuite, teams, etc.)
  • Trigger (Use this to Trigger the flow within particular time intervals)

Practical Use case:

In the following part of the blog we will explore how to integrate between a Google sheet and slack.

Google Sheets: Google Sheets is a web-based spreadsheet editor that lets you create and edit spreadsheets directly from your web browser

Slack: Slack is a messaging app which is almost ubiquitous in workplaces

GOAL💡:

  • Process data from google sheets as a message to slack channels
  • The google sheets contain data relating to employee purchasing limits
  • Process the message to the supervisory channel if the requirement is over a certain amount, else we send the message to the manager

LETS BUILD🏃‍♀️:

  1. Rename your flow to your desired name

2. Choose System Event

3. From the available options, select Google Sheets

4. Click on “Add new Connection” like shown below

5. Set a name for your connection

6. Click on “Create”

7. Choose “Sign in with Google”

8. Choose your google account

9. Click “Continue”

10. Make sure you have a Google sheet ready which contains the required data

If the employee is submitting approval for an expense that is more than $15,000 we will want to set up the flow so that the triggered message reaches the SUPERVISORY CHANNEL for approval.

If the employee is submitting approval for an item that costs less than $15,000 then we will want to set up the flow so that the triggered message reaches the manager through Slack.

11. Below we are updating the trigger accordingly:

Here we are choosing “New Row” (so that every time a new row is created in the spread sheet it will automatically trigger the flow)

12. Next, under the “Select Fields” option choose all the available fields previously mentioned in our spreadsheet

13. Click “Apply”

14. In the next step choose for a if/else block

Here we can write our own condition by choosing custom expression or we can select from the drop down.

As Mentioned above, if the cost greater than $15,000 then we want the message to be posted to the supervisory Slack channel.

15. To connect to Slack, click on the ‘+’

16. Choose a system action

17. I am choosing Slack!

18. Login in to the Slack the exact way as we did for the Google Sheets

19. Login into your Slack account and then from the avilable options choose, “Post message to channel” or direct message or mail

20. Choose the person name/random name

21. Now for the message choose custom expression and write the message as desired and click “Apply”

22. Next, add an else condition

23. In that screen choose the system actions within all the options available, here I am choosing slack itself

24. Design the else block in similar way as before

25. Now click on “Test”

26. Once the Flow starts Running successfully without any errors you can add new data in the spread sheet as shown below:

Finally, once the data in Google sheets is updated we should be able to observe a message in slack like the one pictured below:

If at this point, every scenario is working then you can click on “Activate” which will deploy the application and enables the flow to run continuously.

Congratulations! You’ve successfully built a Google Sheets and Slack Integration using clicks, not code!

--

--