In our scenario - CRM 365 v9.0 0n-prem, IFD - ADFS 3.0 (WS 2012 R2), OAuth 2.0 enabled, I managed to use Web APIs (read/write) using custom connector with On-premise Gateway in Logic Apps. I had to use URL http://{servername}:5555/{orgName}/api/data/v9.0/ with Windows Authentication. Ideally I'd like to use OAuth2 but unfortunately you cannot add custom parameter "resource" in the Custom Connector which is required by the ADFS OAuth2 endpoint. At this stage upgrading to ADFS 4.0 is not an option for us. Anyway if anyone managed to connect via OAuth2 I'd be interested to hear.
Once you are connected it is straight forward building your actions within the Custom Connector. As @JoeO suggested do yourself a favor and I install the Rest Builder into your CRM (UAT) which is a great help.
BTW, @JoeO thanks for the lead making this happen.
@AJ15 I did not use Postman to create/import the custom connector, though you can. IIRC, you may need Plan 2 to have that functionality. Creating a custom connector is straightforward and self explanatory. Postman is btw an awesome tool! I use it all the time. All you need to get started with Flow and Custom Connectors, is an on-premise gateway. For production, add more than 1 on-premise gateway and cluster them
Use one of the following options to trigger a Flow from Dynamics on-prem (e.g. trigger a flow when a new customer was added, or record was modified).
SQL - When an item was modified (never write directly to your Dynamics SQL database).
Dynamics Plugin or Javascript (or Webhook in version 9) to post to a "When a HTTP request is received" Flow trigger.
Schedule Based.
You could of course perform any supported dynamics WebAPI operation using Custom Connectors, including functions and actions. This includes things like:
Create record
Update Record
Associate/Disassociate records (1:N and N:N)
Delete Records
Run (call) a workflow
FetchXML Query
Calculate Rollup field
Add user to Team
Add item to Queue
Import/Export Solution
SendEmail
...and 100's more. Refer to the above link.
As @Pavel-Neuzil mentioned, CRM Rest Builder is going to be your best friend. Use your browser's DevTool (F12 > Network in Chrome) to see the operation executed by CRM Rest Builder
I was able to connect via Windows Auth (http://{servername}:5555/{orgName}/api/data/v9.0/ with Windows Authentication, not OAuth 2.0). When creating custom connector in Logic Apps you are not able to set "resource" parameter thus you will not be able to connect using https.
I was planning to try to setup the "resource" parameter in Postman and then import. This parameter is required by ADFS 2012 when using connecting via OAuth 2.0