Monday, January 9, 2017

Using Logic Apps to create records in Dynamics 365 - Part 1

According to Microsoft documentation, Logic Apps is a service to simplify and implement scalable integration and workflows in the cloud. As a CRM professional I was aware of Microsoft Flow but not of Logic Apps. Microsoft Flow is actually built on Logic App Most of the features and API connections are the same.

The major difference is that Microsoft Flow is targeted for business users whereas Logic Apps is targeted towards IT professionals and developers. Logic Apps can have some additional connections like BizTalk APIs. The other major difference is that Microsoft Flow workflows are created in production but Logic Apps provides the DevOps and security assurance.

The following link details the comparisons between Microsoft Flow and Logic Apps
For this Blog I am building a Logic App that will act as endpoints to create records in Dynamics 365. The good thing is that we don’t need to write code to create the endpoints.

Create a Logic App

  1. Logon to the Microsoft Azure Portal.
  2. Create a new Logic App by Navigating to New>>Web +Mobile>>Logic App as shown in the screen shot below.

  3. Enter the app name and other information as required and click Create. (I generally checked “Pin to Dashboard” to open the app straight from the dashboard)

  4. Open the newly created app.

  5. Click on Edit to open the designer.

  6. Select Request from the list of the managed APIs as shown in the screen shot.

  7. Enter the JSON schema for the request. I have created a customer object with first name, last name, street address and city.

  8. Click Save. It will populate the URL field of the request. This URL will be used as endpoints to call the Logic App.
  9. Click New step and choose Add an action.

  10. Select Dynamics 365 – Create a new record from the managed APIs list.

  11. Choose the Organisation Name, choose the Contacts as the entity name and map the first name, last name, street address and city with the JSON schema added in step 7.

  12. Click New step and choose Add an action as shown in the screen shot below.

  13. Select Response from the list.
  14. Enter the following information as shown in the screen shot below
    • Status Code of 200 (Which represents successful call).
    • Enter the “content-type” in the Headers section.
    • Enter the JSON in the body section. I am returning the contactid of the newly created contact.2017-01-08_17-52-28
  15. Save the app and test it.

Testing the Logic App

For testing we need to call Logic App using URL created for Request step 8 of Create a Logic App.


For this blog, I am not creating a new application to call the endpoints(Logic App). I am using PostMan to create and send the request. Here are the steps.

  1. Open the PostMan application.

  2. Enter the URL copied from the Request.
  3. Enter the Headers as shown in the screen shot below. The endpoints are expecting JSON.

  4. Enter the Body and Click Send. The  Logic App will return the customer id as shown in the screen shot below.

  5. Open the CRM and check the contact is created.
  6. If there is an error, go to Azure portal and look the app summary and troubleshoot the error.


That is it . You got your Logic App as callable endpoints.



  1. Thank you for the auspicious writeup. It in fact was a amusement account it. Look advanced to far added agreeable from you! However, how can we communicate? Build Your Own Mobile App Without Programming Skills

  2. I always spent my half an hour to read this website's articles everyday along with a mug of coffee. How To Create An App Without Coding Skills

  3. I really like what you guys are up too. This type of clever work and exposure! Keep up the great works guys I've added you guys to our blogroll. Become A Mobile App Reseller

  4. you're in reality a excellent webmaster. The website loading speed is incredible. It seems that you are doing any unique trick. Furthermore, The contents are masterpiece. you have performed a wonderful activity in this topic! How To Create An App Without Coding Skills

  5. May I simply just say what a comfort to find someone who really understands what they are talking about over the internet. You certainly understand how to bring an issue to light and make it important. More people should check this out and understand this side of your story. I was surprised you aren't more popular given that you surely have the gift. Best Mobile App Reseller Program And Business

  6. It is in point of fact a great and helpful piece of info. I'm glad that you shared this helpful information with us. Please stay us up to date like this. Thank you for sharing. Create An App From Mobile Website