Overview
This documentation outlines the integration between Salesforce and Slack using Make.com (formerly Integromat). The goal is to automatically create Leads in Salesforce, evaluate conditions (company size and location), and post relevant messages to different Slack channels based on predefined criteria.
Integration Workflow
- A Lead is created or updated in Salesforce.
- Salesforce triggers a Record-Triggered Flow.
- The Flow makes an API Callout to Make.com via a Webhook.
-
Make.com processes the data and routes it based on:
-
Number of employees:
- If > 10,000 → Post to Enterprise Slack channel
-
Country:
- USA → Post to US Slack channel
- Canada → Post to Canada Slack channel
- Others → Post to Other Countries Slack channel
-
Number of employees:
- Slack receives the appropriate message.
- Errors (if any) are captured via Webhook response.
Prerequisites
- Salesforce Account (Admin access)
- Slack Workspace (Admin permissions to create webhooks)
- Make.com Account
- Salesforce Named Credential and Permission Set for API callout
- Slack Incoming Webhooks for each Slack channel
Step-by-Step Implementation
1. Salesforce Setup
A. Create a Record-Triggered Flow
- Navigate to Setup → Flows → New Flow.
- Select Record-Triggered Flow.
-
Configure:
- Object: Lead
- Trigger: Created or Updated
- Entry Conditions: (Optional)
-
Add an Action → HTTP Callout to Make.com.
B. Configure API Callout to Make.com
- In Setup → Named Credentials, create a named credential if using OAuth.
-
In the Flow, configure the HTTP Callout:
- Method: POST
- Endpoint URL https://hook.eu2.make.com/0aan2oxrajdpihxp8lh4mhnbqqlt7aq3
-
Headers:
- Content-Type: application/json
-
Request Body:
{ "leadId": "{!$Record.Id}", "address": { "country": "{!$Record.Country}" }, "firstName": "{!$Record.FirstName}", "lastName": "{!$Record.LastName}", "company": "{!$Record.Company}", "email": "{!$Record.Email}", "phone": "{!$Record.Phone}", "leadSource": "{!$Record.LeadSource}" }
-
Save and Activate the Flow.
2. Make.com Scenario Setup
A. Create a New Scenario
- Go to Make.com → Scenarios → Create New Scenario.
- Add the Webhook Module (Custom Webhook).
- Copy the generated Webhook URL and paste it into Salesforce HTTP Callout.
- Set the data structure using the sample JSON from Salesforce.
B. Add a Router Module
- Add a Router after the Webhook.
-
Create 4 filters:
- Condition 1: employeeCount > 10000 → Enterprise Channel
- Condition 2: country == "US" → US Channel
- Condition 3: country == "Canada" → Canada Channel
- Default Route: All other countries → Other Countries Channel
C. Post Message to Slack
- After each route, add a Slack Module → Create a Message.
-
Configure:
- Connection: Connect to Slack using Webhook/Token
- Channel: Based on the filter condition
-
Message Text:
New Lead Created Lead Id : {{13.leadId}} FirstName : {{13.firstName}} LastName : {{13.lastName}} Company : {{13.company}} Employee:{{13.NumberOfEmployees}}
D. Add Error Handling (Optional)
- Add a Webhook Response module for error tracking.
- Configure error route to log or notify issues.
E. Save and Activate Scenario
- Save all changes.
-
Turn ON the Scenario.
3. Slack Setup
- In your Slack workspace, go to App Directory → Incoming Webhooks.
-
Create incoming webhooks for the following channels:
- Enterprise
- US
- Canada
- Other Countries
- Use the webhook URLs while setting up Slack modules in Make.com.
-
Data are coming into these channels:
-
Enterprise Channel:
-
US Channel:
-
Canada Channel:
-
Other channel:
-
Enterprise Channel:
Testing & Debugging
- Submit a test Lead in Salesforce.
- Check Make.com Execution Logs.
- Confirm Slack messages appear in the correct channels.
- Use Salesforce Flow Debug Logs for troubleshooting.
- Validate Webhook request and response formats.
Conclusion
This integration achieves:
- Automated Slack messaging based on dynamic Lead data.
- Scalable communication workflows.
- Enhanced lead management visibility for different teams.
Have any questions? Feel free to drop an email to support@astreait.com