Harnessing the scaffold suggested in my last post, I would like to suggest a simple way to automatically backup Dynamics 365 solution with Flow/Logic Apps.
The following Flow will allow you to copy Dynamics 365 solution file into Dropbox account on schedule for backup or any other purpose.
You can download the scaffold Flow solution here and import into your Flow environment. Then, update the necessary details according to the following walkthrough. The last Dropbox related Action is not included, you’ll add it yourself.
- Access to Microsoft Dynamics 365 online instance and Flow environment
- Register Microsoft Dynamics 365 online instance in Azure AD and have the Application Id key ready.Make sure you set the oauth2AllowImplicitFlow as described here.
- Have an accessible Dropbox account.
Here is the full Flow collapsed Flow:
- Download the scaffold Flow solution here and import into your Flow environment
- Edit the imported Flow and set the following variables with values to match your environment:
- Client id & Dynamics 365 instance URL
- Set Dynamics 365 instance user name and password
- Set the target Dynamics 365 solution unique name and state the Dropbox target folder name (where the solution file will be created).
Set false is the target solution is unmanaged, true otherwise
- Add the Dropbox ‘Create File’ Action after the Parse JSON Action:
Authenticate to your Dropbox account to allow creating the solution File in the target folder
Once the Flow is activated, the target solution file will be created on schedule in the target Dropbox folder