How to connect Mongodb to Salesforce – Step-by-Step Guide

Published: May 24, 2024 - 6 min read

Vijay Srinivas

How to Connect MongoDB to Salesforce

Connecting MongoDB to Salesforce can streamline your data management processes and improve your business insights.

This blog will guide you through three methods to achieve this connection efficiently: using Coefficient, MuleSoft, and Talend.

Advantages of Connecting MongoDB to Salesforce

  • Enrich customer profiles: Combine customer data from MongoDB with Salesforce records to create more comprehensive customer profiles.
  • Streamline data management: Automate the transfer of data from MongoDB to Salesforce, reducing manual effort and ensuring data consistency.
  • Enable advanced analytics: Leverage Salesforce’s analytics capabilities to gain deeper insights into your MongoDB data.

Connecting MongoDB and Salesforce: 3 Methods

Integrating MongoDB and Salesforce is crucial for businesses looking to streamline their data management and ensure a single source of truth across their organization.

With a range of solutions available, each catering to different needs and technical capabilities, there is an option suitable for every scenario.

SolutionBest For
CoefficientNon-technical users who want to import MongoDB data into Salesforce for reporting and analysis, leveraging Google Sheets as an intermediary for data transformation.
MuleSoftLarge enterprises with complex data architectures that require a scalable, API-led approach to integrate MongoDB with Salesforce and other systems in real-time.
TalendCompanies that need to perform advanced data transformations and data quality checks when moving data.

How to Connect MongoDB to Salesforce

Method 1: Coefficient – No-Code, User-Friendly

Coefficient connects your spreadsheet to all your business data without a single line of code. It provides a user-friendly interface and automatic data updates, making it a reliable option for both technical and non-technical users.


  • Simple, no-code setup
  • Automatic data updates
  • Affordable pricing plans


  • Scheduled automations are not free but affordable

Step 1. Install Coefficient

For Google Sheets

Open a new or existing Google Sheet, navigate to the Extensions tab, and select Add-ons > Get add-ons.

Select Get Add-ons option in Google Sheets Menu Bar

In the Google Workspace Marketplace, search for “Coefficient.”

Search and Choose Coefficient from Google Workspace

Follow the prompts to grant necessary permissions.


Launch Coefficient from Extensions > Coefficient > Launch.

Launch Coefficient Data Connector in Google Sheets

Coefficient will open on the right-hand side of your spreadsheet.

Coefficient Sidebar in Google Sheets

For Microsoft Excel

Open Excel from your desktop or in Office Online. Click ‘File’ > ‘Get Add-ins’ > ‘More Add-Ins.’

Find Coefficient Add-in from Microsoft Office Store

Type “Coefficient” in the search bar and click ‘Add.’

Add Coefficient Add-in to Excel from Microsoft Office Store

Follow the prompts in the pop-up to complete the installation.

Once finished, you will see a “Coefficient” tab in the top navigation bar. Click ‘Open Sidebar’ to launch Coefficient.

Coefficient Sidebar in Microsoft Excel

Step 2. Import Data from MongoDB into Your Spreadsheet

In the Coefficient sidebar, click on “Import From” and select “MongoDB” from the list.

Choose MongoDB as your data source in Coefficient sidebar

Paste your MongoDB connection string and fill in your database name.

Note: Before starting, make sure to whitelist the provided IP addresses in your MongoDB security settings.

Fill prompted information to authorize MongoDB connection through Coefficient

Click “Connect” to establish the connection.

nder “Connected Sources,” click on your MongoDB connection and select “Import Data.”


Choose “From Collections and Fields” to select specific data to import.

Choose Collections & Fields after choosing Import in Coefficient

Step 6: Configure the data import

In the import preview, select the table you want to import data from.

Select data to be connected from MongoDB to Google Sheets using CoefficientImage28

Choose the columns you want to include by checking or unchecking them.

Preview for MongoDB Data Export to Google Sheets using Coefficient add-on

Optionally, add filters, change the sort order, or limit the number of records imported.


Click “Import” to fetch the data into your Excel spreadsheet.

MongoDB Data Exported into Google Sheets successfully

Step 3. Export Data from Your Spreadsheet to Salesforce

Before starting, make sure you’ve connected to Salesforce. 

Then, navigate to Coefficient’s menu. Click “Export to…”

Choose Export option in Coefficient sidebar

Choose Salesforce from the list of available data sources.

Choose Salesforce as the data source in Coefficient sidebar

Select the tab and header rows in your spreadsheet that contain the data you want to export.

Define your tab and header row.

Select tab and headers rows of the data exported to Salesforce from Google Sheets using Coefficient

Note: Coefficient will automatically map the fields for you if the data in the sheet came from an import from Salesforce using Coefficient.

Coefficient Excel Google Sheets Connectors
314,000 Pros Sync Live Data from Their Business Systems into Spreadsheet

Stop exporting data manually. Sync data from your business systems into Google Sheets or Excel with Coefficient and set it on a refresh schedule.

Next, select the Salesforce Object you want to export data to, e.g., “Opportunity”, “Contacts”, etc.

Select the action to be done - update,insert,upsert,delete

Then, select the type of action you want to perform—Update, Insert, Upsert, or Delete.

Step 5: Map Fields

Map the fields from your spreadsheet to the corresponding Salesforce fields.

Map the fields between Google Sheets and Salesforce

Note: If you imported data from Salesforce into your spreadsheet previously, Coefficient will auto-detect and map these fields.

(Optional) Specify additional settings such as batch size, whether to export empty cells on an update, and the column for results.

Select the necessary formatting options if required from advanced settings

Note: Batch size is capped at 10,000 rows due to Salesforce API limitations.

Step 7: Select Rows to Export

Confirm your settings and click “Export”.

Confirm the settings to push data into Salesforce from Google Sheets in Coefficient Add-on

Then, highlight the rows you want to update or export. You can choose to export all rows or specific rows.

Highlight the google sheet rows to be updated

After you’re finished, review your settings and click “Export.”

Follow the prompts to confirm your changes.

Click on "Update Rows in Salesforce" to push the data from Google Sheets to Salesforce

In a few seconds, data from your spreadsheet will push to Salesforce.

Data exported to Salesforce successfully using Coefficient add-on

Your spreadsheet will display updated records, along with their export status and the date/time stamp of the update.

Method 2: MuleSoft – API-Led Connectivity


MuleSoft provides a scalable solution for large enterprises with complex data architectures. It facilitates real-time integration of MongoDB with Salesforce and other systems using APIs.


  • Scalable and robust
  • Real-time data integration
  • Supports complex data architectures


  • Requires technical expertise
  • Higher cost compared to simpler solutions

Step-by-Step Guide:

  1. Set Up MuleSoft:
    • Sign up for MuleSoft and install Anypoint Studio.
    • Create a new Mule Project and configure the MongoDB connector by adding your MongoDB connection details.
  1. Configure Salesforce Connector:
    • Add the Salesforce connector to your project and enter your Salesforce credentials to establish the connection.
  1. Create Integration Flows:
    • Design your integration flow to fetch data from MongoDB and push it to Salesforce.
    • Use MuleSoft’s drag-and-drop interface to map fields between MongoDB and Salesforce objects.
  1. Deploy and Monitor:
    • Deploy your project to Anypoint Platform.
    • Monitor the data flows and ensure the integration is working as expected.

Method 3: Talend – Advanced Data Transformations


Talend is ideal for companies that need to perform advanced data transformations and data quality checks when moving data from MongoDB to Salesforce.


  • Supports advanced data transformations
  • Ensures high data quality
  • Flexible and powerful


  • Requires technical skills
  • Setup can be complex

Step-by-Step Guide:

  1. Install Talend:
    • Download and install Talend Open Studio for Data Integration.
    • Create a new project and open the Talend workspace.
  1. Connect to MongoDB:
    • Add the MongoDB connection component and configure it with your MongoDB connection details.
  1. Connect to Salesforce:
    • Add the Salesforce connection component and configure it with your Salesforce credentials.
  1. Design Data Flow:
    • Use Talend’s graphical interface to design your data flow from MongoDB to Salesforce.
    • Add components for data extraction, transformation, and loading (ETL).
  1. Execute and Monitor:
    • Run your data integration job.
    • Monitor the job execution to ensure data is transferred correctly and meets quality standards.


Integrating MongoDB with Salesforce can significantly enhance your data management capabilities. Whether you choose Coefficient, MuleSoft, or Talend, each method offers unique advantages tailored to different business needs. For a seamless integration experience, get started with Coefficient today.

Sync Live Data into Your Spreadsheet

Connect Google Sheets or Excel to your business systems, import your data, and set it on a refresh schedule.

Try the Spreadsheet Automation Tool Over 350,000 Professionals are Raving About

Tired of spending endless hours manually pushing and pulling data into Google Sheets? Say goodbye to repetitive tasks and hello to efficiency with Coefficient, the leading spreadsheet automation tool trusted by over 350,000 professionals worldwide.

Sync data from your CRM, database, ads platforms, and more into Google Sheets in just a few clicks. Set it on a refresh schedule. And, use AI to write formulas and SQL, or build charts and pivots.

Vijay Srinivas GTM @ Coefficient
Vijay Srinivas is an engineer turned marketer who loves to dabble in data and has 6 years of experience in GTM for Startups and SaaS orgs. Building his skills currently to be a PLG & spreadsheet expert.
350,000+ happy users
Wait, there's more!
Connect any system to Google Sheets in just seconds.
Get Started Free

Trusted By Over 20,000 Companies