Integrate Salesforce Data into Slack and Email Notifications | MuleSoft Documentation
# Integrate Salesforce Data into Slack and Email Notifications
Cloud IDE 
Desktop IDE 
**Open Beta Release** : The **cloud IDE is in open beta**. Any use of Anypoint Code Builder in its beta state is subject to the applicable beta services terms and conditions, available from the IDE.
Create an integration that notifies you through email or Slack when a new case is created in Salesforce.
The integration that you build contains a flow with the following logic:
  * The creation of a new case in Salesforce triggers your flow.
  * If the case is escalated, your application sends an email to the regional leader including the case number, origin, reason, priority, and status.
  * If the case is not escalated, your application sends a message to a Slack channel with the same information.


## Before You Begin
Before you begin, ensure you:
  * Set up your MuleSoft environment.
See Getting Started with Anypoint Code Builder for more information.
  * Set up a Salesforce demo environment.
    * Sign up for a developer organization.
    * Create a developer security token.
  * Have a personal or business Gmail account.
  * Have a personal or business Slack account.


### Set Up Your Slack Workspace
  1. Navigate to Slack and log in using your organization credentials.
If your work organization restricts users from creating new workspaces, log in using your personal email account.
  2. Create a new Workspace called **Integration Test**.
  3. Skip the step to invite new users and type a brief description of your Workspace, for example, **This is a test Workspace**.
  4. Navigate to Your Apps and click **Create an App** :
  5. Select **From scratch**.
  6. Name your app **OAuth for Anypoint Code Builder** , and select your **Integration Test** workspace.
  7. Click **Create App** :
  8. Click **Install App** :
  9. Click **Permission scope** :
  10. Scroll down to the **Scopes** section and, under **Bot Token Scopes** , select **Add an OAuth Scope** , and select **chat:write.public** :
  11. Select **Add scopes** when prompted to add other necessary scopes for `chat:write.public`.
  12. Scroll up to the **OAuth Tokens for Your Workspace** and select **Install to Workspace**.
  13. Under **Bot User OAuth Token** , click **Copy** and save it on a safe location.
You use this token to connect to your Slack workspace from Anypoint Code Builder:
  14. Create a new public channel called "this-is-a-test" in your **Integration Test** workspace.
  15. Add the OAuth for Anypoint Code Builder app to the `this-is-a-test` channel.


### Set up an App Password for Your Email
Later in this tutorial, you configure the Email Connector to send emails to your configured email account. To avoid using your email password, follow Google instructions to configure an App password.
The Gmail account must have 2-factor authentication enabled to configure an App password.   
---  
## Create an Integration
  1. Navigate to Anypoint Code Builder.
  2. Open the Command Palette.
Show me how
     * Use the keyboard shortcuts:
       * Mac: Cmd+Shift+p
       * Windows: Ctrl+Shift+p
     * In the desktop IDE, select **View** > **Command Palette**.
     * In the cloud IDE, click the (menu) icon, and select **View** > **Command Palette**.
  3. Provide the following command:
```
MuleSoft: Develop an Integration
```

  4. Provide integration project properties to the **Develop an Integration** form:
    1. Under **Project Name** , provide the name **New Case Salesforce**.
    2. Under **Project Location** , click **Browse** , and then select your home directory.
    3. Under **Create** , select **Empty Project**.
    4. Select a **Mule runtime** and **Java** version.
You can select any of the supported Mule runtime and Java versions. The IDE saves your version settings to the project’s `mule-artifact.json` file. For information about version support and automated Mule patch updates, see Mule and Java version support. To set default Mule runtime and Java versions for the projects you create, see Version Settings for Mule, Java, and Connectors.
  5. Click **Create Project**.
The IDE provides a notification if it is necessary to download the selected Mule runtime or Java version for the project. Mule runtime downloads to `${user.home}/AnypointCodeBuilder/runtimes`, and the selected Java version downloads to `${user.home}/AnypointCodeBuilder/java`.
  6. Proceed to Create a Configuration File for Slack and Salesforce to create configuration files for connectors.