Contact Free trial Login

Anypoint Exchange

Home to the complete listing of connectors, templates, examples and APIs.
Discover and use proven assets built by the MuleSoft ecosystem, or add assets to a private
tenant of Anypoint Exchange for collaboration and sharing of internal best practices.

Import Contacts Into Microsoft Dynamics

Import Contacts Into Microsoft Dynamics

(0 reviews)

Learn how to upload a CSV file of contacts to Microsoft Dynamics.

Screenshot of the main flow in Anypoint Studio, view full image here


This application uses pre-packaged tools to intelligently connect with Microsoft Dynamics CRM. Based on a simple use case, the application takes a CSV file of contacts and uploads the contact information to an active Dynamics CRM user account. It uses the Anypoint DataMapper Transformer to map and transform data, thereby facilitating quick integration with this Software as a Service (SaaS) provider.

Example Use Case

The application accepts CSV files which contain contact information – name, phone number, email – and uploads them into a Microsoft Dynamics account, automatically inserting the correct data into each field.

Set Up and Run the Example

  1. Create your free trial MS Dynamics account here. Remember your registration data as you will need it to connect to Dynamics, namely: a username, a password and a company name.
  2. Open the Example project in Anypoint Studio from Anypoint Exchange. Do not run the application.
  3. In your application in Studio, click the Global Elements tab. Double-click the MS Dynamics CRM global element to open its Global Element Properties panel.
  4. Change the contents of the Username, Password and Organization Service Url fields to your account-specific values as follows:

      Username:            <USERNAME>@<COMPANY_NAME>
      Password:                         <PASSWORD>
      Organization Service Url:    https://<COMPANY_NAME>

    Then click OK to save your changes.

  5. In the Package Explorer, right-click the connect-with-ms-dynamics project name, then select Run As > Mule Application. Studio runs the application on the embedded server.
  6. This project includes a sample CSV file, called contacts.csv. In the Package Explorer, click the src/main/resources folder to expand it, then find the contacts.csv file inside this folder. Click and drag the contacts.csv file into an input folder in the same directory.
  7. The File connector in the application polls the input folder every ten seconds. It picks up the CSV file, processes it, then deposits it into the output folder in the same directory. (Hit F5 to refresh the contents of the input and output folders.)
  8. In your browser, access your Dynamics account, then navigate from Sales menu to the Contacts tab.Use the drop-down menu to display All Contacts, then scan your contacts for two new entries:
    • John Doe
    • Jane Doe
  9. Stop the Mule application by clicking the square, red terminate button in the Console and delete the two sample contacts from your MS Dynamics account.


Read full documentation in GitHub

Examples to Try Next

If you understood this example
Datamapper with Flow Reference Lookup - Learn how to append data to a message payload and perceptively connect with Salesforce.View
If you struggled with this example
Import Contacts Into Salesforce - Learn how to take a CSV file of contacts and upload them to Salesforce.View


Log into Anypoint Platform to download this asset


Created by
MuleSoft Organization
Published onJun 22, 2017


VersionRuntime version
Show more