If you're running a chatbot on your site and your sales team lives in Salesforce, you know the pain: conversations happen in one tool, customer records live in another, and everyone ends up copying and pasting info back and forth. Integrating Chatfuel with Salesforce can save you a lot of hassle, but it's not as "plug and play" as marketing copy likes to claim. This guide is for anyone who wants to connect their Chatfuel bot to Salesforce—without getting lost in vague promises or half-baked tutorials.
You don't need to be a developer, but you should be comfortable poking around browser tabs, copying API keys, and reading error messages. I'll walk you through what actually works, what to skip, and where you'll probably hit snags.
Why Bother Integrating Chatfuel with Salesforce?
Let's be honest: most chatbot conversations are only as valuable as what you do with the data. If your bot is capturing leads, booking demos, or gathering support requests, you want that info in Salesforce—automatically, not manually. Done right, integrating the two means:
- Leads get into Salesforce the minute they talk to your bot.
- Sales reps see the whole chat history, not just a name and email.
- No more "where did this lead come from?" detective work.
Of course, "done right" is doing a bit of heavy lifting here. Chatfuel doesn’t have native Salesforce integration. So, you’ll need to use webhooks, a middleware tool (like Zapier or Make), or do some direct API work. This guide will show you the two most practical routes: using a middleware (easier, less error-prone) and direct API (more control, more pain).
Step 1: Map Out What You Actually Need
Before you touch any settings, get clear on what you want:
- Are you just sending new leads from the bot to Salesforce?
- Do you want to update existing records, or create new ones?
- What fields do you need to capture? (Name, email, company, chat transcript, etc.)
- Does the bot need to get info from Salesforce, or just send it in?
Write this down. It’ll save you from a lot of frustration later, and helps you focus on what matters instead of chasing every possible feature.
Pro tip: Start small. Get the basics working—like creating a lead—before you try fancy stuff.
Step 2: Set Up Your Chatfuel Bot for Data Collection
If you already have a Chatfuel bot, skip ahead. If not, set up a simple flow that collects the info you need. In Chatfuel:
- Create a new block for your lead capture flow.
- Add user attributes for each data point you need (e.g.,
{{full_name}}
,{{email}}
,{{company}}
). - Use "Ask a question" cards to collect these details from users.
- Make sure each user response is saved to the right attribute.
You want all the data packaged up in a way you can send to Salesforce. You don’t need a fancy flow. Just make sure you can test with real data.
Step 3: Decide How You'll Connect Chatfuel to Salesforce
Here’s the honest rundown:
- Middleware (Zapier/Make): Good for most people. Less code, more handholding, but you’ll pay a monthly fee.
- Webhooks + Salesforce API: More control, no extra monthly cost, but you’ll have to wrangle Salesforce’s (notoriously picky) API.
If you just want leads or simple records sent across, use Zapier or Make. Only go direct if you have a good reason (e.g., complex updates, custom objects).
Step 4A: Integration Using Zapier (or Make)
What You’ll Need
- A Zapier account (or Make, if you prefer)
- Admin access to Salesforce
- Chatfuel Pro plan (needed for webhooks)
Steps
- Set Up a Webhook in Chatfuel
- In your Chatfuel flow, add an “Action” and choose “Send a Webhook.”
-
You’ll need a webhook URL from Zapier (see next step).
-
Create a New Zap in Zapier
- Trigger: Choose "Webhooks by Zapier" > "Catch Hook."
-
Zapier will give you a unique URL. Copy this.
-
Paste the Zapier Webhook URL in Chatfuel
- Paste the URL into your Chatfuel webhook action.
-
Set up the payload—add all the user attributes you want to send (e.g.,
{"name": "{{full_name}}", "email": "{{email}}"}
). -
Test the Webhook
-
Run through your Chatfuel flow and make sure Zapier picks up the sample data.
-
Connect Zapier to Salesforce
- Action: Add Salesforce as the action app.
- Choose “Create Record” (or “Update Record,” as needed).
- Map the fields from Chatfuel to Salesforce fields. Double-check that the field names match (Salesforce is picky about this).
-
Test it. If it fails, Zapier's error messages are usually decent.
-
Turn on Your Zap
-
Once you see a test record in Salesforce, turn the Zap on.
-
Check the Results
- Go into Salesforce and make sure the data came through as expected.
- If you’re missing fields or seeing errors, tweak the mapping and try again.
What Works:
This is by far the easiest way. You don’t have to touch code or read Salesforce documentation. Zapier’s error handling is decent, and you’ll get notified if something breaks.
What Doesn’t:
- Zapier isn’t free, and the more records you process, the more you pay.
- You’re limited by Zapier’s (or Make’s) available Salesforce actions. Some advanced features (like custom objects or attachments) can be tricky.
- There’s a small delay (usually seconds, sometimes minutes) between Chatfuel and Salesforce.
Step 4B: Integration Using Direct Salesforce API
Who Should Bother?
If you hate monthly fees, have complex Salesforce setups, or want full control, this is your route. But be warned: Salesforce’s API is not beginner-friendly. You’ll need:
- Salesforce admin access (and API permissions)
- Chatfuel Pro (for webhooks)
- Some comfort with JSON and APIs
Steps
- Create a Salesforce Connected App
- In Salesforce, go to Setup > Apps > App Manager > New Connected App.
- Enable OAuth settings. Add the required callback URL (can be anything for this use case).
- Select OAuth scopes: “Access and manage your data (api)” is essential.
-
Save and wait for Salesforce to provision the app (can take a few minutes).
-
Get Your API Credentials
- Grab your Consumer Key and Consumer Secret from the Connected App.
- Set a callback URL (even if you won’t use it).
-
Create a Salesforce user for the integration, or use your own (not recommended for production).
-
Figure Out Authentication
- You’ll need to use Salesforce’s OAuth 2.0 to get an access token.
-
There’s no way to do a full OAuth flow in Chatfuel, so you’ll have to set up a separate process (or use a service like Postman) to get your access token, then paste it into Chatfuel’s webhook headers.
-
Set Up a Webhook in Chatfuel
- Add a webhook action in your Chatfuel flow.
- Use the Salesforce REST API endpoint for creating a lead:
POST https://yourInstance.salesforce.com/services/data/vXX.X/sobjects/Lead/
- In the headers, add:
Authorization: Bearer <your_access_token>
-
In the body, send your collected data. Example: json { "FirstName": "{{first_name}}", "LastName": "{{last_name}}", "Email": "{{email}}" }
-
You’ll need to match Salesforce’s field names exactly (case-sensitive).
-
Test Your Webhook
- Run through your bot and see if the record shows up in Salesforce.
-
If you get errors, check your token, endpoint, and field names. Salesforce’s error messages are rarely helpful, so Google is your friend.
-
Handle Token Expiry
- Salesforce access tokens expire after a while. You’ll need a process to refresh it and update Chatfuel’s webhook header.
- This is the part that makes this approach fragile for non-developers.
What Works:
- No extra monthly fees.
- You can use any Salesforce object or field.
- Full control over the payload.
What Doesn’t:
- Painful OAuth setup and token management.
- No built-in error handling or retry logic.
- If Salesforce changes their API, you’re on your own.
Pro Tips and Real-World Gotchas
- Test with Sandbox First: Don’t experiment on your live Salesforce data. Use a sandbox org until you’re confident.
- Field Mappings: Salesforce field names are case-sensitive and weirdly picky. Double-check spelling and capitalization.
- Error Logs: Zapier gives you logs; direct API does not. If you go the API route, set up some kind of notification for failed webhooks (even if it’s just sending yourself an email).
- Data Cleanliness: Chatbot users will give you garbage data. Add validation in Chatfuel where you can.
- Keep It Simple: The more custom logic you add, the more things break. Start with the basics.
Wrapping Up
Integrating Chatfuel with Salesforce can save hours of grunt work—but only if you keep it simple and test as you go. Start with a narrow use case, get it working, then iterate. If in doubt, use Zapier or Make: you’ll get 90% of the value with 10% of the headache. Only go down the direct API route if you’re ready to deal with Salesforce’s quirks.
Don’t let perfect be the enemy of done. Get your bot and CRM talking, and improve things bit by bit.