
Hi Steve,
Yes, it’s definitely possible to use an Azure Logic App to pull emails from Office 365 and push them into an on-prem Dynamics 2016 instance, but there are a few key things to consider:
Since it’s an on-premises deployment, you’ll need to expose the Dynamics Web API or Organization Service externally (securely) so that Logic Apps can reach it. This typically involves:
For Dynamics 2016, you’ll likely be using the SOAP-based Organization Service (/XRMServices/2011/Organization.svc) or the Web API (/api/data/v8.0/).
To create an email activity, you’d POST to the Email entity and associate it with the relevant records (e.g., Contact, Case, etc.).
If your workflows are set to trigger on email creation or regarding record updates, they should still work as long as the email is created via the API with the correct metadata (e.g., RegardingObjectId, DirectionCode, etc.).
You’ll need to authenticate against the on-prem instance. If using IFD, this typically involves OAuth with ADFS or legacy authentication depending on your setup.
If Logic Apps becomes too complex due to network/security constraints, consider using Power Automate Desktop or a custom middleware hosted on-prem to bridge the gap between O365 and Dynamics.
Let me know if you need help with the API payload or setting up the connection!
Best regards,
Daniel