# Display Salesforce account details with Workbot for Slack recipe

This use case guides you through connecting Salesforce and Workbot for Slack to Workato to create a powerful automation.

# What does this recipe do?

This recipe enables Workbot for Slack to display Salesforce customer account details directly within Slack. This automation triggers when a specific command is entered into Slack, bringing critical customer information directly to where discussions are happening without the need to switch applications or disrupt your workflow.

flowchart TD subgraph M[" "] direction TB subgraph D[&nbsp Workbot for Slack New command trigger &nbsp] direction RL mm(setup) --- mmm(Trigger) end subgraph H[&nbsp Salesforce Search records batch action &nbsp] hh(Action) --- E(setup) end end A([Create recipe]) -- Configure your recipe --> M --> B([Automated workflow]) D --> H classDef default fill:#fff,stroke:#67eadd,stroke-width:2px; classDef WorkatoTeal fill:#67eadd,stroke:#b3e0e1,stroke-width:2px,color:#000; classDef SubgraphDash fill:#e1fffc,stroke:#f66,stroke-width:2px,color:#000,stroke-dasharray: 5 5 class D,H SubgraphDash class A,B,mm,mmm,hh,E WorkatoTeal

# Create your recipe

Complete the following steps to create a recipe that displays Salesforce account details in Slack:

USE CASES ARE INTENDED AS EXAMPLES ONLY

This use case serves as an example. Modifications to triggers, actions, or conditional logic may be necessary to adapt this recipe to your workflow.

1

Sign in to Workato.

2

Select the project where you plan to create the recipe.

3

Create connections for Salesforce and Workbot for Slack:

Create a Salesforce connection.
1

Click Create > Connection.

2

Search for and select Salesforce on the New connection page.

3

Provide a name for your connection in the Connection name field.

Salesforce connection setupSalesforce connection setup

4

Use the Location drop-down menu to select the project where you plan to store the connection.

5

Use the Auth type drop-down menu to select the authentication method. The default is OAuth 2.0.

6

Use the Sandbox drop-down menu to specify whether the Salesforce account is a sandbox account.

7

Optional. Expand Advanced settings to configure advanced connection options.

8

Optional. Use the Custom OAuth profile drop-down menu to select a custom OAuth profile for your connection.

  • This custom OAuth profile ensures that the connection is restricted to the same set of scopes you selected for all users with the profile, and the authentication flow uses the client app linked to the custom profile.
9

Click Connect.

10

Enter your Salesforce account credentials and click Log In.

Salesforce connection setupLog in to your Salesforce account

Create a Workbot for Slack connection.
1

Click Create > Connection.

2

Search for and select Workbot for Slack on the New connection page.

3

Provide a name for your connection in the Name field.

Workbot for Slack connection setupWorkbot for Slack connection setup

4

Use the Location drop-down menu to select the project where you plan to store the connection.

5

Optional. Select the NLU provider you plan to use, such as DialogFlow or Amazon Lex NLU. You must connect to the NLU provider for it to appear in the drop-down menu.

6

Optional. Click Advanced to configure Slash commands verification tokens, custom help content, your Slack app status (classic or not), and your Custom OAuth profile.

7

Click Connect, sign in to your Slack workspace when prompted, and click Continue to verify the connection.

4

Go back to your project and click Create > Recipe.

Create a new recipeCreate a new recipe

5

Enter a name for your recipe in the Name field.

6

Select the project where you plan to store the recipe from the Location drop-down menu.

7

Click Start building.

Start building your recipeStart building your recipe

8

Click Pick a starting point, then select Trigger from an app.

9

Click Select an app and trigger event.

10
Set up your Workbot for Slack trigger.
1

Search for Workbot for Slack and select it as your app.

Choose an appChoose Workbot for Slack as your app

2

Select the New command trigger.

3

Click Save.

11

Click + Add step and select Action in app.

Add actionAdd action

12
Set up your Salesforce Search records (Account) batch action.
1

Search for Salesforce and select it as your app.

Choose SalesforceChoose Salesforce

2

Select the Search records (Account) batch action.

3

Select Account from the Search for drop-down menu and map the Workbot for Slack Name Step 1 datapill into the Account name field.

Salesforce action configurationSalesforce action configuration

13

Click + Add step and select IF condition.

How do IF conditions work?

An IF condition enables you to make decisions based on specific conditions. You can control your recipe workflow by executing different actions depending on whether a condition you specify is present or not present (true or false).

flowchart TD A([Search accounts in Salesforce]) --> B(Is the account present?) B -->|Yes| C(Return the account details in Slack.) B ---->|No| E(Return a message in Slack that \n the account is not present in Salesforce.) classDef default fill:#67eadd,stroke:#b3e0e1,stroke-width:2px,color:#000; classDef WorkatoPink fill:#f3c1c2,stroke:#f3c1c2,stroke-width:1px; class E WorkatoPink
14
Set up your Salesforce Account ID is not present IF condition.
1

Select Account ID under Salesforce Search Accounts (Step 2 output) to add the Account ID Step 2 datapill to the Data field.

If condition is not presentConfigure IF condition is not present

2

Use the Condition drop-down menu to select is not present.

3

Click + Add step in the Yes statement and select Action in app.

If condition is met configurationSelect the app and action when the condition is met

4

Search for Workbot for Slack and select it as your app.

5

Select the Post command reply action.

6

Click Add block to message and select Section with text from the Type menu.

7

Map the Workbot for Slack Name Step 1 datapill to the Section text field.

8

Map the Workbot for Slack Name Step 1 datapill to the Attachment text field.

If condition is not presentConfigure your post reply message

9

Click + Add step under the No statement.

10

Search for Workbot for Slack as your app.

11

Select the Post command reply action.

If condition is met configurationSelect the app and action when the condition is met

15

Click + Add step and select IF condition.

16
Set up your Salesforce Account ID is present IF condition.
1

Map the Salesforce Account ID Step 2 datapill into the Data field and enter is present in the Condition field.

If condition is presentConfigure IF condition is present

2

Click Add block to message and select Section with text from the Type menu.

3

Enter your message in the Section text field.

Section textConfigure the section text

4

Expand the Divider section and select Divider from the Type drop-down menu.

5

Map the Account ID Step 2 and Account Name Step 2 datapills to the Section text field.

DividerConfigure the divider

6

Expand the Attachment fields section and add the account information you plan to display in your reply. For example, enter Name in the Title field and map the Account phone Step 2 datapill into the Value field.

7

Click Save.

Your Display Salesforce account details with Workbot for Slack recipe is ready to test and implement.


Last updated: 1/17/2025, 6:16:43 PM