Try Catch error handling using Scope in Power Automate

As a programmer, using Try-Catch is a common programming practice to handle exceptions. Now, since we’ve moved more towards low-code platform implementations, error handling here is a must as well.

Generally, if a Flow fails as per below, we should be able to handle the exceptions effectively –


And this is what happened to my action step –

And this Flow will end in Failed Run status. So let’s ensure we handle this in a simple way.

Group actions using Scope

First step is to club the actions into a group which can be accomplished by an action called Scope. This will give us controls as to what happens if this Scope fails, succeeds, times out or is skipped –

  1. Search for Scope in the Flow and add it.

  2. Now, add the actions which needs to be handled for Exceptions in the Scope you just added.

  3. And it should looks like this – Also, consider renaming the Scope as you might want to handle each section of the Flow differently for different potential actions


    Here, your Try block is ready.
  4. Now, let’s design the Catch block. Add one more Scope to the Flow (Ideally, after the Try Scope we just added)

  5. For example, you can add an email step to notify the developer, typically.



Configure Run After

Now, let’s configure the Run After on the ‘Catch SP Exceptions‘ scope we added in the step above

  1. Now, go to the ellipses on the Catch scope we just created.
    You’ll find Configure Run After. This defines that when should this selected Scope Run based on the results of the previous Scopes.

  2. And you can select the criteria you are defining for the ‘Try – SharePoint Actions’ scope’s results.
    The below implies that run ‘Catch SP Exceptions’ block after the ‘Try – SharePoint Actions’ block failed (or any action in it fails)

  3. And at this point, you are done. You can see a little i icon to see what is configured.
    The arrow connecting the steps are also different (in brown as compared to other black/dark gray arrows.)

Testing

Now, let’s test this simple scenario and see how the executions will take place in terms of error.

  1. We’ll resubmit the same failed Run to now go through these Scopes and observe our course of action.
    As you see below, Try – SharePoint Actions scope has failed as expected but because we had configured the Catch SP Exceptions to Run After the Try – SharePoint Actions failed.
    And note that the End Result of the Flow is also a Success.

  2. Now, let’s see what happens if the Exception doesn’t occur and it succeeds.
    But, notice that even the steps after the Catch SP Exceptions didn’t execute.
    Now, I’ll explain below why that happened.

  3. This happened because Catch SP Exceptions itself didn’t execute and the Delay step is connected to Catch SP Exceptions steps by default.
    Now, you’ll need to also configure the Delay Step to Run After the Try – SharePoint Actions is Skipped executed. Then, the Flow will continue it’s normal execution that point on.

  4. And if you Run this again, since the Catch SP Exceptions is Skipped, the Delay will continue to Run.
    And everything after that. See another step added to validate this.

Hope this was quick and easy to understand.

Here are some more Dynamics 365 posts which you might be interested in –

  1. Enable SharePoint Online integration Dynamics 365 | Power Platform Admin Center
  2. Dynamics 365 Storage Utilization | Dataverse Storage | Power Platform Admin Center
  3. Use Hierarchy in Roll Up Fields in Dynamics 365 CRM
  4. Filter records in a View owned by a Team you are a member of | Dynamics 365 CRM
  5. Get GUID of the current View in Dynamics 365 CRM JS from ribbon button | Ribbon Workbench
  6. Dynamics 365 App For Outlook missing on SiteMap in CRM? Use shortcut link [Quick Tip]
  7. Import lookup referencing records together in Dynamics 365 CRM | [Linking related entity data during Excel Import]
  8. Excel Importing Notes (Annotation) entity in Dynamics 365 CRM
  9. Enable/Disable the need to Approve Email for Mailboxes in Dynamics 365 CRM CE
  10. Call Azure Function from Dynamics 365 CRM using Webhooks
  11. Show Ribbon button only on record selection in Dynamics CRM
  12. Accessing multiple occurrences of a field in Business Process Flow using JS in D365 CRM

Thank you!!

Remove attachments from Dynamics 365 CRM Notes using Power Automate | Dataverse

If you are looking to remove or delete the attachments from Notes (Annotation entity) in Dynamics 365 CRM / Dataverse (and not delete the Note itself), hopefully this will help!

Disclaimer: I’m not covering ‘how you can save your attachments elsewhere’, I’m only covering how you can delete from Notes given that you have handled your attachments before deleting them.

Identifying Attachments

Here are some points which will help you identify once attachments are included when you create a Note in Dynamics 365 / Dataverse.
Note that these are not in Attachments entity.

  1. You can have a Flow that is triggered on the create of a Note (annotation) in Dataverse.
    So here, the Document is Note is attached on a Note.


    And the Trigger of the Dataverse connector in Flow is on the create of a Note

  2. And when the Note is attached, the triggerOutputs body will show this data that denotes the attachment on the Note.

Clearing Attachments

Here’s how you can clear the attachments from the Notes (by not deleting the actual note). If you want to move to SharePoint, it’s a recommendation, but that’s not something I intend to cover here (Assuming you are doing something with the attachments and then wanting to delete them) –

  1. Now, in this example, I’m attaching a Note which will be further cleared using the Update step which I’ll show.


  2. Here’s an update step I have on the same Note which will set the Document Body & Name to null in order to clear the attachment.



  3. To test this, I had another Flow which is triggered on the update of the Note i.e. the step above.
    Once there’s nothing in the Document (documentbody), the filesize will be 0 & isdocument flag to false automatically. Also, setting the Name to Null is important – Else, you’ll still see the attachment on the Note (Just that you can’t open it)


  4. And when you refresh the Timeline, you’ll see that the attachment is now removed.

Hope this was helpful! Here are some more Dynamics 365 posts which you might be interested in –

  1. Enable SharePoint Online integration Dynamics 365 | Power Platform Admin Center
  2. Dynamics 365 Storage Utilization | Dataverse Storage | Power Platform Admin Center
  3. Use Hierarchy in Roll Up Fields in Dynamics 365 CRM
  4. Filter records in a View owned by a Team you are a member of | Dynamics 365 CRM
  5. Get GUID of the current View in Dynamics 365 CRM JS from ribbon button | Ribbon Workbench
  6. Dynamics 365 App For Outlook missing on SiteMap in CRM? Use shortcut link [Quick Tip]
  7. Import lookup referencing records together in Dynamics 365 CRM | [Linking related entity data during Excel Import]
  8. Excel Importing Notes (Annotation) entity in Dynamics 365 CRM
  9. Enable/Disable the need to Approve Email for Mailboxes in Dynamics 365 CRM CE
  10. Call Azure Function from Dynamics 365 CRM using Webhooks
  11. Show Ribbon button only on record selection in Dynamics CRM
  12. Accessing multiple occurrences of a field in Business Process Flow using JS in D365 CRM

Thank you!!

Create file correctly in SharePoint from Dataverse connector using Power Automate | Using base64ToBinary expression

If you are creating a file from Attachment from a Dynamics 365 CRM record and trying to load it in SharePoint and it doesn’t get created/read correctly?

Although, it might appear it was correctly uploaded, it might not open correctly and could look like this.

Scenario

Consider this scenario – You want to store the Documents that you attach in Notes to SharePoint.

  1. Let’s assume you are uploading this PDF document on the Note and now you want to upload this to SharePoint.

  2. And you have a Flow to send this document to SharePoint which runs when you create a Note in Dataverse (Dynamics 365 CRM)
    Now, the Create file action in SharePoint will look something like this –

    If you use the new Dataverse [green] connector to pick up the attachment from the Note created in Dynamics CRM –


    It’ll let you add the Document to the File context in SharePoint’s Create file action.
    This is triggerOutputs()?[‘body/documentbody’] if you hover over it.

  3. And upon running this Flow, the document will be created in SharePoint.

  4. But when, you open the file, you’ll find this error that you can’t read the file although it appears that is was uploaded correctly.

  5. And also, the browser can’t open it either even if you download it.

Use base64ToBinary conversion

Here’s a step to create a File in SharePoint in your mentioned SharePoint library –

  1. In order to correctly pass this through, use the base64ToBinary expression in the Create file’s File Content field.

  2. And in base64ToBinary, put the Document so that it looks like this – “base64ToBinary(triggerOutputs()?[‘body/documentbody’])

  3. And when you re-run the test, the document will be created in the same way.


    And now when you open it, it’ll open properly.


    Hope this solves the issue!

Dataverse (Legacy) connector

Here’s a difference you’ll notice in when you are using the Dataverse (Legacy) [gray colored] connector –

  1. If you are using the older Dataverse Legacy connector to pick your file from Dynamics 365.

  2. And try to add it to the Create file in SharePoint’s connector –

  3. It’ll let you add it but not let you save it.


    You’ll face a validation error – “Flow save failed with code ‘OpenApiOperationParameterValidationFailed’ and message ‘Input parameter ‘body’ validation failed in workflow operation ‘Create_file’: The parameter with value ‘”@triggerOutputs()? [‘body/documentbody’]”‘ in path ‘body’ with type/format ‘String/bytes’ is not convertible to type/format ‘String/binary’.’.

    Here’s a detailed post of a scenario posted by my friend Linn: https://linnzawwin.blogspot.com/2021/02/handle-base64-and-binary-file-content.html

Hope this was helpful! Here are some more Dynamics 365 posts which you might be interested in –

  1. Enable SharePoint Online integration Dynamics 365 | Power Platform Admin Center
  2. Dynamics 365 Storage Utilization | Dataverse Storage | Power Platform Admin Center
  3. Use Hierarchy in Roll Up Fields in Dynamics 365 CRM
  4. Filter records in a View owned by a Team you are a member of | Dynamics 365 CRM
  5. Get GUID of the current View in Dynamics 365 CRM JS from ribbon button | Ribbon Workbench
  6. Dynamics 365 App For Outlook missing on SiteMap in CRM? Use shortcut link [Quick Tip]
  7. Import lookup referencing records together in Dynamics 365 CRM | [Linking related entity data during Excel Import]
  8. Excel Importing Notes (Annotation) entity in Dynamics 365 CRM
  9. Enable/Disable the need to Approve Email for Mailboxes in Dynamics 365 CRM CE
  10. Call Azure Function from Dynamics 365 CRM using Webhooks
  11. Show Ribbon button only on record selection in Dynamics CRM
  12. Accessing multiple occurrences of a field in Business Process Flow using JS in D365 CRM

Thank you!!

Update Flow Schema [The power flow’s logic app flow template was invalid] error | Power Automate Tip

Error on trigger of the Flow which reads as “The power flow’s logic app flow template was invalid”

This could be because the schema of the Flow is not longer valid and needs to be refreshed. Here’s a simple way on how you can do this.

Scenario

Let’s consider this Scenario where you have an On-Demand Flow in Dynamics 365 CRM which is using a Dataverse (Legacy) trigger –

  1. You see the Flow as below in Dynamics 365 CRM on the record which you can call (Replacement of your classic On-Demand Workflows in CRM 😊)
    Flow didn’t run as expected and hence, the next step was to investigate.

  2. So, to further investigate, you open the Flow and find this error notification already in the Edit mode itself.

    The complete error message reads as –
    The power flow’s logic app flow template was invalid. The ‘type’ property of template trigger ‘manual’ at line ‘1’ and column ‘11024’ has the value ‘Manual’ which is deprecated in schema version ‘2016-04-01-preview’ and onwards.

  3. This means the Schema has been deprecated and you’ll need to refresh the same.

Fix

Here’s how you can quickly fix this –

  1. Remove the trigger


  2. And then re-add the same trigger. In this case, Dataverse (Legacy)


  3. Note that the references will be removed since you removed this step/trigger.


    Now, for this particular Flow Trigger, I further faced issues while receiving the Body correctly. And got something like this –

    I’ll further investigate this and update this post

    Now, save the Flow and re-attempt Running it.
    Note: Since the schema has been updated, you’ll need to investigate the check the rest of the Flow for any changes you might need to make.
  4. For Logic Apps, Microsoft Docs has provided this directive – https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-schema-2016-04-01#upgrade-your-schema?WT.mc_id=DX-MVP-5003911

Hope this helps!

Here are some Power Automate posts you want to check out –

  1. Call Flow from Webhooks in Dynamics 365 CRM | Power Automate
  2. Call a Flow from Canvas Power App and get back response | Power Platform
  3. Showing Sandbox or Non Production Apps in Power App mobile app
  4. Create a Power Apps Per User Plan Trial | Dataverse environment
  5. Install On-Premise Gateway from Power Automate or Power Apps | Power Platform
  6. Co-presence in Power Automate | Multiple users working on a Flow
  7. Search Rows (preview) Action in Dataverse connector in a Flow | Power Automate
  8. Suppress Workflow Header Information while sending back HTTP Response in a Flow | Power Automate
  9. Call a Flow from Canvas Power App and get back response | Power Platform\
  10. FetchXML Aggregation in a Flow using CDS (Current Environment) connector | Power Automate
  11. Parsing Outputs of a List Rows action using Parse JSON in a Flow | Common Data Service (CE) connector
  12. Asynchronous HTTP Response from a Flow | Power Automate
  13. Validate JSON Schema for HTTP Request trigger in a Flow and send Response | Power Automate
  14. Converting JSON to XML and XML to JSON in a Flow | Power Automate

Thank you!

Call Flow from Webhooks in Dynamics 365 CRM | Power Automate

In case you are wondering if there are other ways to call a Flow apart from just Dataverse connectors, well – There are ways! 😊

Here’s how you can use Webhooks registered on Dynamics 365 CRM to call a Flow in Power Automate using HTTP Request trigger

Pre-Requisites

Given that you already have Admin Access to create Flows with HTTP Request Triggers, you’ll need to have Plugin Registration Tool in case you are not familiar – Download Plugin Registration Tool for Dynamics 365 CRM using PowerShell

Initiate a Flow

Here’s how you start building your Flow –

  1. You must select the HTTP Trigger when you start a new flow. This will be your Flow trigger.

  2. Now, in order to be able to get the URL of the HTTP Trigger which you’ll need, you’ll need to save the Flow first.
    And for that, Flow needs to have more than 1 step. So just go ahead and add a variable, maybe. 😊

  3. Once you save the Flow, the URL will be generated which you can copy

  4. Copy this URL and paste it in the Notepad. We’ll come to it later.
    It should look like this –

    So we’ll come to this later. Let’s keep this handy in clipboard since you’ve copied it anyway and let’s move towards registering the Webhook itself.

Register Webhook in Dynamics 365 CRM

Given that you have Plugin Registration Tool and you are logged in, you can proceed with registering a Webhook in the environment –

  1. In the menu, select Register a Webhook option.

  2. Now, you can start by giving it a name.
    Then, in Endpoint URL – copy only till the work invoke
    https://prod-131.westus.logic.azure.com:443/workflows/6092c774224e498ebe413f3d7c05a45e/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=gvfm52Mpnhsz4Ew4ufRllNM_VhfC6a-GkCpM7AigPU0

    Also, select the Authentication as HttpQueryString

  3. Now, coming the next part, you can start add properties to this –
    Green are the Properties, Pink are the Values

    https://prod-131.westus.logic.azure.com:443/workflows/6092c774224e498ebe413f3d7c05a45e/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=gvfm52Mpnhsz4Ew4ufRllNM_VhfC6a-GkCpM7AigPU0

    Also, in case you are wondering what does the %2F mean – It’s the HTML encoding for a slash symbol “/
    Ref Link: https://www.w3schools.com/tags/ref_urlencode.ASP

    And, the properties should look like below –


  4. Now, you can go ahead and add a Step just like you would do in a Plugin assembly


    And then, for example, register a step on Associate. It could be any message.

  5. And, when you Associate a record, example – Assigning a security role to a User –

  6. The Webhook will call the HTTP Request Flow


    And if you open the Flow, you can expand the first step and see the Detailed outputs






  7. You can copy the above Outputs and use this to generate Schema for the HTTP Trigger so that you can use it further in the Flow


    And this is how it will be generated

Hope this helps!

Here are some Power Automate posts you want to check out –

  1. Showing Sandbox or Non Production Apps in Power App mobile app
  2. Create a Power Apps Per User Plan Trial | Dataverse environment
  3. Install On-Premise Gateway from Power Automate or Power Apps | Power Platform
  4. Co-presence in Power Automate | Multiple users working on a Flow
  5. Search Rows (preview) Action in Dataverse connector in a Flow | Power Automate
  6. Suppress Workflow Header Information while sending back HTTP Response in a Flow | Power Automate
  7. Call a Flow from Canvas Power App and get back response | Power Platform\
  8. FetchXML Aggregation in a Flow using CDS (Current Environment) connector | Power Automate
  9. Parsing Outputs of a List Rows action using Parse JSON in a Flow | Common Data Service (CE) connector
  10. Asynchronous HTTP Response from a Flow | Power Automate
  11. Validate JSON Schema for HTTP Request trigger in a Flow and send Response | Power Automate
  12. Converting JSON to XML and XML to JSON in a Flow | Power Automate

Thank you!

Connections used in which Flows or Power Apps | Power Platform Tip

If you are wondering that it would be easy to find which all Flows are using a certain Connection in Power Automate, you are right – it is easy. 😊

Here’s a quick tip!

Power Automate Admin Center

You can navigate to the Power Automate portal i.e. <region>.flow.microsoft.com.

  1. In this example, this is my Power Automate (which is https://[region].flow.microsoft.com/en-us/).
    In that, I’ll expand Data from the left hand menu and go to Connections.


  2. In Connections, you’ll see redundant Connections based on how you might have created them.

  3. Select any one of them, click on the three dots i.e. the Ellipses and look for Details.


  4. In Details, you’ll see the section called as Flows using this connection. Meaning, this will show that the particular Connections is used in which Flows.

  5. In Flows using this connection, you’ll see the list of all Flows.


  6. Opening any one will only open all the Flows and not do anything else. Won’t navigate to the selected Flow.


  7. Same is also true for Power Apps as well.


  8. At this point, the naming/renaming connections is not possible but could be available soon.

Hope this helps!

Here are some Power Automate posts you want to check out –

  1. Showing Sandbox or Non Production Apps in Power App mobile app
  2. Create a Power Apps Per User Plan Trial | Dataverse environment
  3. Install On-Premise Gateway from Power Automate or Power Apps | Power Platform
  4. Co-presence in Power Automate | Multiple users working on a Flow
  5. Search Rows (preview) Action in Dataverse connector in a Flow | Power Automate
  6. Suppress Workflow Header Information while sending back HTTP Response in a Flow | Power Automate
  7. Call a Flow from Canvas Power App and get back response | Power Platform\
  8. FetchXML Aggregation in a Flow using CDS (Current Environment) connector | Power Automate
  9. Parsing Outputs of a List Rows action using Parse JSON in a Flow | Common Data Service (CE) connector
  10. Asynchronous HTTP Response from a Flow | Power Automate
  11. Validate JSON Schema for HTTP Request trigger in a Flow and send Response | Power Automate
  12. Converting JSON to XML and XML to JSON in a Flow | Power Automate

Thank you!

Follow up message in Teams using Power Automate for Teams app

Now that Power Automate is in GA in Teams, there are a ton of automations you can perform and quite a few of them already ready to be consumed right within the templates itself without you having to do anything at all.

One such important Flow is setting Follow up on messages! Let’s look at how we can find and use this

Power Automate in Teams

Power Automate is now in Teams as well. Here’s how you can get it –

  1. You can go the Apps in Teams. Then, look for Power Automate.

  2. Now, you’ll see this populate template called as Follow up on a message which is already created completely for you.


  3. Once you select this, you’ll just need to confirm. I’ll just call it Follow up on a message. Then, I’ll simply click on Create flow.

  4. Once you click on Create, you’ll see a confirmation message that the Flow has been created.

  5. You’ll see it turned on in your Home in Power Automate.

  6. Now, once this is setup, you’ll see a Bot on the Chat list in Teams.

  7. And it will show you that the Flow is ready to run.


Following up on a message in Teams

So here’s how it does –

  1. Let’s say I got a message from a colleague that he’ll get back to me in 5 mins.

  2. Now, in case I forget, it’ll be gone and I might remember this by myself much later. Here’s where I can add a follow up to this. So, I’ll click on the three dots (ellipses) and go to More Actions and then see the Flow I created.

  3. Now, it’ll ask me some details as to when I want to follow up and what should show up.
    So, I’ll enter the Date & Time of when I want to be reminded and what the reminder should say.

  4. And, at the given time, the Flow Bot will pop this message in it’s own chat window.
    I can go to the message.


  5. And it’ll simply take me to the message. On the phone app, it subtly glows for a brief moment (Perhaps this could some to Teams in a more prominent way)


Hope this helps!

Here are some Power Automate posts you want to check out –

  1. Showing Sandbox or Non Production Apps in Power App mobile app
  2. Create a Power Apps Per User Plan Trial | Dataverse environment
  3. Install On-Premise Gateway from Power Automate or Power Apps | Power Platform
  4. Co-presence in Power Automate | Multiple users working on a Flow
  5. Search Rows (preview) Action in Dataverse connector in a Flow | Power Automate
  6. Suppress Workflow Header Information while sending back HTTP Response in a Flow | Power Automate
  7. Call a Flow from Canvas Power App and get back response | Power Platform\
  8. FetchXML Aggregation in a Flow using CDS (Current Environment) connector | Power Automate
  9. Parsing Outputs of a List Rows action using Parse JSON in a Flow | Common Data Service (CE) connector
  10. Asynchronous HTTP Response from a Flow | Power Automate
  11. Validate JSON Schema for HTTP Request trigger in a Flow and send Response | Power Automate
  12. Converting JSON to XML and XML to JSON in a Flow | Power Automate

Thank you!

Range function in Power Automate | Quick Tip

Here’s a pretty simple look at how you can create an Array of numbers from a Start of the number to the End number and an Array of the range will be created

Example Variable

I’m just creating a sample variable to hold the array I’m creating –

  1. Initialize a variable and it should look like below

Range function in Power Automate

Now, if you look at the Dynamic Content section, you’ll be able to find the range function. Let’s see how –

  1. In Dynamic Context, search for range function

  2. In the range function, you first need to input the Start number of what the array should start.
    In this example, I’m starting from number 4

  3. And once I put a comma, I’ll mention how many items in the array from the number 4 should be contained in the array (including 4 as well)
    So, I enter 12. This doesn’t mean the ending number of the Array should be 12, it means put 12 items.

  4. And then just click OK to set the Array in the variable. Then, save and Run.

  5. Now, when you Run the Flow, you’ll see the Output as below.
    Starting from number 4, there are 12 items and hence, ending at 15

Hope this was helpful!

Here are some more Power Automate / Flow posts you might want to check out –

  1. Retrieve Metadata of Global OptionSets from Dynamics 365 in Power Automate | HTTP with Azure AD action
  2. Primary Key of Activity type entity in a Dataverse connector in Power Automate | Quick Tip
  3. Split On in Power Automate in SharePoint trigger for Item updates
  4. Search Rows (preview) Action in Dataverse connector in a Flow | Power Automate
  5. Suppress Workflow Header Information while sending back HTTP Response in a Flow | Power Automate
  6. Invalid XML issue in Dataverse connector for List Rows action | Fetch XML Query | Power Automate
  7. FetchXML Aggregation in a Flow using CDS (Current Environment) connector | Power Automate
  8. Invalid type. Expected Integer but got Number error in Parse JSON – Error at runtime after generating Schema | Power Automate
  9. Asynchronous HTTP Response from a Flow | Power Automate
  10. Setting Lookup in a Flow CDS Connector: Classic vs. Current Environment connector | Power Automate Quick Tip

Thank you!

Block Connector access in Power Platform Admin Center | Power Apps & Power Automate

You can define policies in Power Platform Admin to restrict the use of certain connectors, both – prebuilt and custom connectors in the Power Platform.

Setting DLP Policy for Connectors – Blocking connectors

You’ll need to go to Power Platform Admin Center (https://admin.powerplatform.microsoft.com/)


  1. In Power Platform Admin Center, you’ll need to expand the section called as Policies and you’ll find the option called as Data Policies

  2. In this, you can create Policies for the Connectors which are used in Power Automate / Power Apps

  3. Once you start to create your Policy, give it a suitable name –


  4. Next, I’ll get a list all uncategorized Connectors which I can either choose to select and start Blocking them or send them to Business category.


  5. Let’s say you want to set a policy to restrict certain Actions on the connector called as Power Automate Admins connector. I want to now move this connector to Blocked category.
    So, I find the connector, select and and click on Block as shown below.


  6. Now, I’ll see this connector in the Blocked section.


  7. For now, I’ll ignore the Custom Connectors because I don’t have any for now.

  8. And then, proceed further to define the Scope of this policy i.e. on Environment level.
    For this example, Add all environments is selected since I want to have this for all environments and not selective ones. Quite self-explanatory.

  9. Finally, I’ll Create this Policy.

  10. And you’ll see your Policy created like this –

Policy Usage

Now, let’s review how this policy will work.

  1. Now, in a Flow, I’ll select the Connector for which we’ve set the Policy for. The policy doesn’t hide anything, it let’s you select it first.


  2. And if you select any Action from the Flow, the Flow Checker indicator will light up indicating an error.

  3. And if you expand, it’ll state that the connector is not allowed to be used.
    This won’t allow you to save the flow, forcing you to revoke the step you have performed.



Blocking selective Actions in Connectors

Given you don’t want to Block the whole connector but want to only restrict selective Actions in a connector, here’s what you can do –

  1. While we are tweaking our existing policy, let me take a chance to also show you that you can edit the Policy from the List. Select it, and then click on Edit Policy.

  2. Now, let’s assume our Connector not blocked in the first place and exists in either of the categories i.e. Business or Non-Business.
    Find the connector. Then find the three dots and expand the menu to further show Configure connector (preview) and then select Connector actions

    Remember, this is in Preview and we’ll need to wait to use it for Production once in GA.
  3. Now, you can select what all Actions should be allowed and what all shouldn’t be in order to restrict any unwanted operations configured by other Admins.
    In this scenario, let’s just allow ‘Disable Flow as Admin‘ action and restrict all other ones.

  4. Now, the allowed one will not have any issues.


  5. And the ones we have not allowed, will show the error in the Flow Checker.


Here are some Power Automate posts you want to check out –

  1. Showing Sandbox or Non Production Apps in Power App mobile app
  2. Create a Power Apps Per User Plan Trial | Dataverse environment
  3. Install On-Premise Gateway from Power Automate or Power Apps | Power Platform
  4. Co-presence in Power Automate | Multiple users working on a Flow
  5. Search Rows (preview) Action in Dataverse connector in a Flow | Power Automate
  6. Suppress Workflow Header Information while sending back HTTP Response in a Flow | Power Automate
  7. Call a Flow from Canvas Power App and get back response | Power Platform\
  8. FetchXML Aggregation in a Flow using CDS (Current Environment) connector | Power Automate
  9. Parsing Outputs of a List Rows action using Parse JSON in a Flow | Common Data Service (CE) connector
  10. Asynchronous HTTP Response from a Flow | Power Automate
  11. Validate JSON Schema for HTTP Request trigger in a Flow and send Response | Power Automate
  12. Converting JSON to XML and XML to JSON in a Flow | Power Automate

Thank you!

Install On-Premise Gateway from Power Automate or Power Apps | Power Platform

Here’s your summary to understand what are On-Prem Gateways in Power Automate and how you can set them up.
The same can be done from Power Apps as well (https://make.powerapps.com/)



So let’s see how you can set it up and get started. This post is for beginners who are looking to install an on-premise gateway. So this should be fairly simple process! 😊

Create an On-Prem Gateway in Power Automate

Here’s how you can create an On-Prem Gateway in Power Automate

  1. Expand the Data section and look for Gateways. Then, when you go in Gateways, you will see + New gateway button.


  2. Then, you’ll be taken to a new webpage (https://powerapps.microsoft.com/en-gb/downloads/). Here’s you’ll be able to Download an on-prem Gateway

  3. Once you click on Download, it’ll start downloading the Installer on your machine.


    It’ll complete, then you can simply open it to start installing.

  4. Once you begin the installation, choose where the Gateway folder path should be.
    Then, click Install.


    And it’ll install and will take a few moments.
  5. Once completed, it’ll ask for the email address (or rather username needed to install the Gateway)


  6. Further, authentication will take place as below (in case you have MFA enabled, that will be occur too)


  7. And, it’ll Sign you in.

  8. Once in, it’ll ask if this is a migration or the first time setup.
    Since I’m installing it for the first time, I’ll choose the first option as this is a fresh install.

  9. Upon clicking Next, I’ll be asked to set Properties for the gateway.
    So, to identify the machine, I’ll select a name with which I can identify and then enter a Recovery Key which I will store safely with me.
    Then, click Configure.


  10. It’ll take a few moments to configure.




  11. And now, you’re done in a few moments. Finally, the Gateway is now installed.


Configuration & Info

Given that your Gateway is now installed, you can always go in the File Explorer where you set it up and open the below app

If you wish to check the configurations in detail, you’ll need to Sign In again

And in Power Automate, you’ll see the Gateway is listed.


And if you open it up, you’ll see the high-level details and status of it.

Here are some Power Automate posts you want to check out –

  1. Co-presence in Power Automate | Multiple users working on a Flow
  2. Search Rows (preview) Action in Dataverse connector in a Flow | Power Automate
  3. Suppress Workflow Header Information while sending back HTTP Response in a Flow | Power Automate
  4. Call a Flow from Canvas Power App and get back response | Power Platform\
  5. FetchXML Aggregation in a Flow using CDS (Current Environment) connector | Power Automate
  6. Parsing Outputs of a List Rows action using Parse JSON in a Flow | Common Data Service (CE) connector
  7. Asynchronous HTTP Response from a Flow | Power Automate
  8. Validate JSON Schema for HTTP Request trigger in a Flow and send Response | Power Automate
  9. Converting JSON to XML and XML to JSON in a Flow | Power Automate
  10. Duration field in Dynamics 365 converts Hours value to Days in Dynamics 365 | [Flow Workaround to convert in Hours and Mins]

Thank you!