# Salesforce and 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.
# 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 is intended to serve as an example. Recipe modifications such as trigger and action configuration and conditional logic may require adjustments if you plan to include this recipe in your own workflow.
Sign in to your Workato account and navigate to the workspace project where you plan to add the recipe.
Set up connections for Salesforce and Workbot for Slack using the steps in the following sections:
Set up your Salesforce connection.
Complete the following steps to set up your Salesforce connection:
Click Create > Connection.
Search for Salesforce
in the New Connection page.
Provide a name for your connection in the Connection name field.
Salesforce connection setup
Use the Location drop-down menu to select the project where you plan to store the connection.
Use the Sandbox dropdown-menu to determine the account connection type.
Optional. Click Advanced to configure advanced connection options.
Optional. Select the Custom OAuth profile. App requests use the profile specified in Workato when you select this option. This 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.
Click Connect, enter your Salesforce account credentials when prompted, and then click Log In to verify the connection.
Log in to your Salesforce account
Set up your Workbot for Slack connection.
Click Create > Connection.
Search for and select Workbot for Slack
in the New Connection page.
Provide a name for your connection in the Name field.
Workbot for Slack connection setup
Use the Location drop-down menu to select the project where you plan to store the connection.
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.
Optional. Click Advanced to configure Slash commands verification tokens, custom help content, your Slack app status (classic or not), and your Custom OAuth profile.
Click Connect, sign in to your Slack workspace when prompted, and click Continue to verify the connection.
Click Create > Recipe.
Provide a name for your recipe in the Name field and select the project in which you plan to store the recipe from the Location drop-down menu.
Ensure that Trigger from an app is selected under Pick a starting point and click Start building.
Set up your recipe
Set up your Workbot for Slack trigger.
Search for Workbot for Slack
in the Choose an app search box and select the Slack connection app you created in the preceding steps.
Choose Workbot for Slack as your app
Select New command as your trigger.
Click Save.
Click the +
Add step button and select Action in app.
Add action
Set up your Salesforce Search records (Account) batch action.
Search for Salesforce
in the Choose an app search box and select the Salesforce connection you created in the preceding steps.
Choose Salesforce as your app
Select Search records (Account) batch as your action.
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 configuration
Click the +
Add step button 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).
Set up your Salesforce Account ID is not present IF condition.
Select Account ID under Salesforce Search Accounts (Step 2 output) to add the Account ID | Step 2
datapill to the Data field.
Configure IF condition is not present
Use the Condition drop-down menu to select is not present
.
Click the +
Add step button in the Yes statement and select Action in app.
Select the app and action when the condition is met
Search for and select Workbot for Slack
as the app and select Post command reply as your action.
Click the Add block to message button > select Section with text from the Type menu > map the Workbot for Slack Name | Step 1
datapill to the Section text field > and then map the Workbot for Slack Name | Step 1
datapill to the Attachment text field.
Configure your post reply message
Click the +
Add step button under the No statement, search for and select Workbot for Slack
as your app, and select Post command reply as your action.
Select the app and action when the condition is met
Click the +
Add step button and select IF condition.
Set up your Salesforce Account ID is present IF condition.
Map the Salesforce Account ID | Step 2
datapill into the Data field and enter is present
in the Condition field.
Configure IF condition is present
Click the Add block to message button > select Section with text from the Type menu > and enter your message in the Section text field.
Configure the section text
Click the Divider Show button > select Divider from the Type drop-down menu and > and map the Account ID | Step 2
and Account Name | Step 2
datapills into the Section text field.
Configure the divider
Click the Attachment fields Show button 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.
Click Save.
Your Workbot for Slack and Salesforce recipe is ready to test and implement.
Last updated: 11/4/2024, 6:09:46 PM