In this article, I will demonstrate how to provision a SharePoint online modern site using a Power automate flow. As there is no standard Power automate action for creating a SharePoint site (previously called “site collections”) using SharePoint connector, we will use the Send an HTTP Request to SharePoint action and SharePoint REST API in Power automate flow.
Follow below steps to create a SharePoint online modern communication site using Power Automate flow:
1. Go to make.powerautomate.com and create a new Instant cloud flow with Manually trigger a flow trigger.
2. Add Send an HTTP request to SharePoint action in Power automate flow.
3. Use configurations for Send an HTTP request to SharePoint action in below format:
{
"request": {
"Title": "My Communication Site",
"Url": "https://contoso.sharepoint.com/sites/MyCommSite",
"Description": "My Communication Site created using Power Automate flow",
"Owner": "gsanap@contoso.com",
"Lcid": 1033,
"WebTemplate": "SITEPAGEPUBLISHING#0",
"SiteDesignId": "6142d2a0-63a5-4ba0-aede-d9fefca2c767",
"ShareByEmailEnabled": false
}
}
Where,
Url
URL for the new SharePoint online modern site (site collection)
LCID
Locale identifier (LCID) for the site language. 1033 is for English language, check LCID for other languages at: Language.Lcid property
WebTemplate
WebTemplate property is used to specify which type of SharePoint site to you want to create. You can use following values for this property:
Communication Site: SITEPAGEPUBLISHING#0
Team Site (not connected to M365 group): STS#3
SiteDesignId
SiteDesignId property is used to apply site template (previously called “site design”) to newly created SharePoint site.
If you want to apply an out-of-the-box available site template, use the following values:
Topic: 96c933ac-3698-44c7-9f4a-5fd17d71af9e
Showcase: 6142d2a0-63a5-4ba0-aede-d9fefca2c767
Blank: f6cc5403-0d63-442e-96c0-285923709ffc
ShareByEmailEnabled
If this property is set to true, it will enable sharing SharePoint files via Email.
Your final Power automate flow should look like this:
Create a SharePoint online site using Power Automate flow
4. Save your flow and Run it using Test > Manually options at the top right corner. After flow run completes successfully, navigate to the site URL mentioned in Send an HTTP request to SharePoint action in Power automate flow and you will see a newly created SharePoint online modern communication site like:
SharePoint online modern communication site created using Power Automate
Approvals… We always need to approve something. In the corporate world, you can’t do much without obtaining approval from your boss, project team, Finance, or Legal department. Luckily, we have a few quick ways to request Document approvals in SharePoint. The below post summarizes both options.
Use Cases for Document Approvals
There are plenty of use cases when you might want to obtain approval for a document. These are just a few from my good old corporate days…
Obtain approval from Finance for an invoice before processing it
Obtain approval from Legal for a contract before sharing it with the customer
Obtain approval for a budget from your boss
Obtain approval for a project Charter from Project Owner/Sponsors
Obtain approval from a project team for meeting minutes and action items
How to obtain document approval in SharePoint Online
There are two ways for you to obtain approvals in SharePoint. You can do so via SharePoint document library or an Approval Team Apps. I document both below. Both options vary in terms of user experience but rely on the same Power Automate logic.
Option 1: Document Approval via SharePoint document library
The first option to approve documents is via the SharePoint Document Library. You can easily check the box next to the document and Request Sign-Off. I provided step-by-step instructions here.
Option 2: Document Approval via Approval App in Teams
The second option is a bit more “elegant” and is possible thanks to a recent addition to Teams – the Approval App. I once again documented the process in this article.
Which option to choose?
Use SharePoint Request Sign-Off if…
You primarily access documents via the SharePoint interface and not Teams
You primarily need to request sign-off from documents in a specific document library
You prefer that recipients approve via Email (Outlook) rather than the Teams interface
Use Teams Approvals App if…
You primarily live in Teams, rather than SharePoint or Outlook
You primarily need to request approvals from various sources (document libraries)
You prefer that recipients approve via Teams rather than Email (Outlook)
We have all been there, we need to check the difference between 2 dates, and if you ever had to implement this you would need to use some crazy mathematical equations using the ticks() expression. But now.. I’m not sure when this expression got added, but we can now use dateDifference() expression instead of using … Continue reading "Get the difference between two dates EASY"
At the moment we have official documentation available on how to upgrade an existing Microsoft Workflow Manager installation to SharePoint Workflow Manager and how perform a fresh installation of SharePoint Workflow Manager. What is missing are the required steps if an existing Microsoft Workflow Manager should be replaced with a new SharePoint Workflow Manager on […]
On ne fait des choses géniales avec l’IA. Tenez, par exemple avec Elicit, un assistant de recherche qui utilise des modèles de langage comme celui de GPT-3 pour automatiser certaines parties du travail des chercheurs.
L’action principale d’Elicit est d’abord d’examiner de la littérature scientifique qu’on trouve en accès libre sur internet. Ainsi, en vous posant une simple question (ou en laissant Elicit les générer pour vous), le site vous montrera des articles scientifiques pertinents avec des résumés des informations clés qu’ils contiennent.
C’est merveilleux ! Ce moteur de recherche propulsé à l’IA peut ainsi trouver des documents pertinents même s’ils ne correspondent pas exactement aux mots clés que vous avez entrés.
Elicit utilise la similarité sémantique, et trouve des articles liés à votre question même s’ils n’utilisent pas les mêmes mots clés. Par exemple, il peut retourner des articles sur la « méditation » même si votre requête ne mentionne que « la pleine conscience ».
Pour chaque résultat de recherche, Elicit lit l’abstract du document et vous pondra un résumé personnalisé qui sera en accord avec votre question. Ça permet d’avoir une meilleure compréhension du sujet pour mieux évaluer la pertinence du document.
Une fois un document spotté, vous pouvez même poser des questions à Elicit qui tentera de vous répondre avec les données présentes dans le document. C’est un peu comme discuter avec un bouquin. Et le plus magique là dedans, c’est que vous pouvez y importer vos propres PDF et ensuite lui poser vos questions pour en sortir l’essentiel. Vraiment pratique !
Elicit est donc un service formidable pour les chercheurs mais également les gens qui sont curieux et qui aiment gratouiller un peu la littérature scientifique sans forcement tout capter. Avec ses fonctionnalités avancées de recherche, de filtrage et d’organisation des documents, on peut comme ça trouver plus rapidement l’information qu’on cherche.
We recently announced the release of SharePoint Workflow Manager which is a replacement for Microsoft Workflow Manager. Meanwhile new documentation has been released covering the installation and configuration of SharePoint Workflow Manager: Install and configure workflow for SharePoint Server
One of the relatively recent additions to Microsoft Teams was the addition of an Approval app. In this article, I want to explain to you what it is all about and how to make the most out of this wonderful addition.
What is an Approval App in Teams?
Approval App in Teams is an app that allows users to bring together and centralize all of the workflow approval processes. Specifically, it will enable the users to approve or reject items/documents submitted by others or initiate an approval workflow themselves.
Think of Teams App as a subset of the Power Automate application brought inside of Microsoft Teams.
Approval App is a personal App
It is imperative to note that the Approval App is a personal application, not a group one. I explained the difference between the two in this post. That means it shows only the workflows/approvals sent directly to the user or initiated by the user. The App does not show the workflows/business processes created and managed by others.
How to install the Teams Approval App
To install the application, click on three dots on the sidebar on the left, then search for Approvals
The App will now be added to the sidebar for easy access. You can pin it from there so it stays there permanently.
Team Approval App components
Received Approvals
If you are looking to approve or reject items submitted by others, you would need to click on the Received tab
There, you will get a dashboard of all requests submitted to you for Approval
Clicking on the item, will provide you with the history of the approval/submission
And if you need to approve or reject, you can do as well
And it will be marked as such in the dashboard
Sent Approvals
If you have submitted a document for review (more about this below), you will need to click on the Sent Approvals tab. It will state to who you sent Approval requests to and their status.
New Approval Request
You can also initiate new approval requests from the Teams Approval App. Just click on the New approval request
Create or Manage Approval Templates
There is also a way for Admins and team Owners to create approvals based on common business scenarios (i.e., vacation requests). This is probably a topic for another post, so I will make sure to write a separate article later on how to configure those for your team or organization.
Microsoft is pleased to announce the release of SharePoint Workflow Manager, a new workflow engine to power the SharePoint 2013 Workflows platform for SharePoint Server and replace Service Bus and Microsoft Workflow Manager. SharePoint Workflow Manager is compatible with SharePoint Server 2013, 2016, 2019, and Subscription Edition. We recommend that all SharePoint Server customers using […]
Wouldn't it be nice if we can Test our Flows without executing some of the actions like Sending Emails, creating items in SharePoint or Dataverse?
Guess what we can! And its very easy to do. Check this out!
Uploading data from Power Apps can be scary on a security standpoint, since the user will need access to the Data Source. Lets use Child Flows to get around this, and use any connection we want.
Is your IF condition always evaluating to False? Debugging and Testing your Flows should be easy. When using a Condition in Power Automate, in the run we cannot see the expression or the results of what is being evaluated.
I will go over a quick workaround to debug and find out what is happening in the condition
Lets use Power Automate inside Power Virtual Agents to get all the users details who is interacting with the bot. We can customize our greetings, or simply use any information that Office365 returns
I encountered an issue when trying to filter a a file by filename, that was in a SharePoint document library.
When needing to get a specific SharePoint file ID. It can be troublesome to filter the Files. For example Using a 'Get files' action we can see that the properties of the file are encased inside {} meaning that SharePoint is using some calculation on the Document Library to create these fields.
Did you know that Power Automate has a Date Time action that can easily convert, and format time zones in one action?
Why is this important? Power Automate natively uses UTC as its time zone, as well as most SharePoint sites. Using an action can be easier than using expressions.
I’ve created enough Power Automate routines to know that they all eventually fail for some reason or other and it’s important to add resiliency to your production Flows where you can. This can include:
Using service-accounts for your connections. This removes the impact of account actions like password changes or user deactivations.
Adding co-owners to the Flow. This increases the options for support and continuity if the primary owner is not available.
Handling errors whenever possible. This allows for known issues with the data, actions and other conditions that are acceptable within the business process that can be predictably dealt with in the Flow.
All of my production Flows include steps that will catch errors and let me know that there was a problem. The out-of-the-box Power Automate failure notification emails lack detail and are not real-time enough for my production routines. There are many ways of handling errors in Power Automate and, in this post, I will share how I do it for my own Flows using Scope actions and Microsoft Teams Adaptive Cards.
Scope: Encapsulate a block of actions and inherit the last terminal status (Succeeded, Failed, Cancelled) of actions inside.
At a high-level our Flow pattern will try to run the primary actions that make up the workflow. If there are errors, catch them and take follow up actions for known issues. If there are still issues it can run a final set of fail-safe actions. This type of exception handling is known as Try-Catch-Finally.
In Power Automate we will use Scope actions as containers for the Try, Catch and Finally blocks of work. In addition, our Flow will capture any debug information using a string variable that will be used for our Adaptive Card notification.
My typical Flow looks like the image below.
Part 1 – Add debug variable.
Add an Initialize variable action and set:
Name to “varDebug”.
Type to “String”.
Value to “List of action names and statuses:
“.
The added line spacing is intentional and makes the debug information more readable within the Adaptive Card.
Part 2 – Add Try block.
Add a Scope action, rename it to “Scope – Try” and place all the primary workflow actions within the Try block. This name is used in later actions, so precision is important.
Part 3 – Add Catch block.
Add another Scope action, rename it to “Scope – Catch” and then:
Click Menu for Scope – Try. Hint: the ellipse button.
Select Configure run after.
Set Scope – Try to “has failed” and then click Done.
This setting ensures that the Catch block only runs if the anything in the Try block has failed. Notice that the arrow between the Try and Catch Scope actions is now red showing that it only runs on error.
Within Scope – Catch, add an Apply to each action and set:
Select an output from previous steps to the following expression: result('Scope_-_Try')
Add an Append to string variable action and set:
Name to “varDebug”.
Value to: “ – Action Name: @{items(‘Apply_to_each_-_varDebug’)?[‘name’]} – Action Status: @{items(‘Apply_to_each_-_varDebug’)?[‘status’]}
“.
Add a Compose action, to the Apply to each loop, rename it to “Compose – varDebug” and set Inputs to “varDebug”. This name is used in later actions, so precision is important.
Add a Post adaptive card in a chat or channel action and set:
Post as to “Flow bot”.
Post in to “Chat with Flow bot”.
Recipient to your Flow owner. In my sample Flow the owner is included in an object variable definition, hence the “variable(…)” reference in the sample image. For my production Flows I store owner info in a table and is queried for at run time.
Adaptive Card to JSON code listed in this text file.
Customize the following lines of code in the Adaptive Card to meet your needs:
C) Flow name “text”: “@{variables(‘varParameters’)[‘varFlowName’]}”
Ensure that Outputs from the Compose – varDebug action display exactly as shown below. This is the captured debug information from an error.
My completed Scope – Catch block looks like the image below.
Any errors in the Try block are captured in the Apply to each loop, formatted into a single string using the Compose action and then sent to the Flow owner using the Adaptive Card. In the sample image below I get a breakdown of the Flow steps, statuses and quickly see where the failure occurred.
For my production Flows that are related to Microsoft Lists or Dataverse data I include an action button that links to the specific item / record on the Adaptive Card.
Part 4 – Add Finally block.
Add another Scope action, rename it to “Scope – Finally” and then:
Click Menu for Scope – Try. Hint: the ellipse button.
Select Configure run after.
Select all options in Scope – Finally and then click Done.
This setting ensures that the Finally block always runs regardless of any failures in the Try and Catch blocks. The Finally block is ideally suited for central logging activities outside of the core business process that the Flow is supporting.
My completed Flow looks like the image below. Making a Flow fail can be tricky, so to test consider updating a code based actions like Parse JSON or Post adaptive card in a chat or channel in Try block with an expected character to force an error.
All things with technology eventually fail. Using a Try-Catch-Finally approach to exception handling in Power Automate will help to add resiliency to your production Flows.
Thanks for reading!
NY
Error-handling-12
nyoung30
My typical Flow
Initialize variable action
Scope - Try action
Configure run after has failed
Notice that the arrow between the Try and Catch Scope actions is now red showing that it only runs on error.
Append to string variable action
Compose action
Post adaptive card in a chat or channel
Adaptive Card sample
Outputs from the Compose - varDebug action
My completed Scope - Catch
In the sample image below I get a breakdown of the Flow steps, statuses and quickly see where the failure occurred.
Scope - Finally
Select all options in t Scope - Finally and then click Done
One of the cool things you can do from a canvas Power App is call a Power Automate flow. This is a great way to do something simple – like sending an email – or many more complex things you might want to trigger from the Power App. Many have written about how to implement these sorts of things, so I won’t cover that ground here.
Once you’ve got it set up and time goes by, your users may start to see an error message similar to this when they take the action to trigger the flow in the Power App. It might be a button click, changing a number in a field – it can really be anything where you can connect to an event in the Power App.
That’s:
{"code": "InvokerConnectionOverrideFailed", "message": "Failed to parse invoker connections from trigger 'manual' outputs. Exception: Could not find any valid connection for connection reference name 'shared_office365_1' in APIM tokens header."}
The contents of the error you see may be a little bit different, but every report I saw mentioned InvokerConnectionOverrideFailed.
This is a post which shouldn’t need to exist, in my opinion. Once we have the connection between the Power App and the Power Automate flow, it should just work going forward. But after some indeterminate amount of time has passed, you may start to see the error above. The two tools somehow lose their connection.
We had this happen at a client recently, so I went off to the InterWebs to see if I could find an answer. There are multiple posts about it with multiple answers. I’ll summarize the one I found that worked for me here.
In my particular case, the Power App enables event signups. Each event has one or more available time slots with a maximum number of registrations. When the event is coming up, the admins may need to provide a roster for each time slot to the event organizers, who are often outside the organization. We have a button in the Power App visible only to the admins which triggers a flow. That flow creates an export of a set of the specific event’s signup data in an Excel spreadsheet and the admin is notified via an email with a link to the Excel file when it is complete.
Here’s the sequence that solved the issue for me:
Export the existing flow. The old flow was named CSRRosterExport1.
Import the exported flow’s ZIP file with a new name, but everything else exactly the same. The new flow’s name was ExportEventRoster.
In the Power App, add the newly instantiated flow as a connection. To do this, from the top menu, choose Action/ Power Automate and specify the Flow you’d like to call.
Replace all calls to the old flow with calls to the new flow. In this case, it was the onSelect events for two buttons, each of which passed slightly different parameters to the flow. It amounted to changing the CSRRosterExport1.Run() instances with ExportEventRoster.Run().
Now that I know the fix, it probably takes about 10 mins – at most. When our users see the error message, we can easily Band-Aid the problem. Of course, this issuE shouldn’t happen in the first place, so let’s hope Microsoft fixes it before we ever see the error again.
Somewhere between the classic Alerts functionality and Power Automate flows, we find the ability in Microsoft Lists to create rules for lists. Rules allow us to do some pretty basic – but VERY common things.
Creating a rule for a list is fairly straightforward. In the toolbar at the top of the list view, click on automate, and Create a rule.
There are only four options right now, but I expect this will expand. Microsoft is getting better at building what I think of as “bridging functionality”. Rather than the old days, where almost everything useful required a developer, there are now multiple options along a spectrum to accomplish many things.
The four options today are Notify someone when…
A column changes
A column value changes
A new item is created
An item is deleted
Note that #2 and #4 weren’t even possible not that long ago. We had to do all kinds of hocus-pocus for #2 and there simply wasn’t a “hook” for #4.
If you think about it, a huge number of SharePoint Designer workflows were built over the years JUST to send email notifications. This applies the 80/20 rule (one of my favorite rules – aka the Pareto Principle) to those use cases.
When you choose which rule you’d like to use – and I love how the graphics make it much easier to decide – you land on a screen where you just need to select a few values to set things up. If you’ve ever created a rule in Outlook to shuffle emails from specific sources into folders, you’ll recognize this type of logic.
The screen is also “list aware” – it knows which columns might make sense for each slot and what its possible values are. Here, I’m asking the list to notify me when the Category column is (equals) “(1) Category1”.
For the notification, all Person columns in the list are available.
As you can see, there’s little thinking involved: the columns are available in a dropdown when you need them.
Once you’ve set up a rule or rules, you can manage them from the same dropdown.
The ensuing screen shows you all the rules you have created, allowing you to delete them or just turn them off. The “Off” toggle is excellent to have when you’re loading content or making bulk metadata changes. You can stop the flood of notifications easily but equally easily turn the rule(s) back on.
Under the covers, this capability undoubtedly uses the web hooks for list items. This means the notifications will be fast and painless.
By the way, you may be wondering what those notifications look like. Truth is, they are nothing fancy. But they probably look better than 80% of the notifications you ever built in SharePoint Designer workflows over the years. This is another area where I expect the capability will expand, allowing some level of customization for the emails.
So the next time someone asks you to write a flow just to send an email when list items change, make sure to think about using rules instead. They will be amazed how fast you solve the problem.