Microsoft Flow – extremely flexible email merge without any hardcoded mapping

  • Post category:Flow
  • Post comments:0 Comments

Imagine an Email Merge process that doesn't require any mapping per se. A process that is as easy as composing an email. Look no further! The pros of this workflow are: uses a single SharePoint list that can be easily reused for another Email Merge need; use the same SharePoint list to send email merges with a few or lot of fields; preserves all custom html formatting of an email; doesn't use paid connectors and premium Power Automate license; no need for data mapping - you just compose an email using special tags; can have as many columns and as many tags as you would like. Please note, as this workflow is quite complicated logically, I would encourage you to make my example fully work on your side first, then apply its concept to your business needs second. PREREQUISITES: 1) Let's create a SharePoint list. Rename its Title column to…

Continue ReadingMicrosoft Flow – extremely flexible email merge without any hardcoded mapping

PowerShell – Office 365 – Enable or disable service plan options within each license package while respecting current configuration for each user

Even when using PowerShell, Microsoft doesn't make it simple when it comes to adjusting licensing in bulk and service plan options/apps within. Mainly that is because there is no easy way to keep a current configuration - any license change you apply to a user overwrites their existing setup. To address that letdown I created a script you can find below. I tried to make this script very flexible and user friendly, please see the highlights of the script: the script is interactive - just select all actions; no need to predefine any variables; works with all license packages; allows both enabling and disabling services/apps; respects the currents configuration for each user. This script assumes you are already connected to the right services and have all modules installed. # List License Packages $LicensePackageChoices = @() $i = 0 $LicensePackages = Get-MsolAccountSku ForEach ($LicensePackage in $LicensePackages) { $outObject = "" |…

Continue ReadingPowerShell – Office 365 – Enable or disable service plan options within each license package while respecting current configuration for each user

PowerShell – SharePoint – Move folders between site collections, subsites, and libraries

There are several ways to move data between libraries in SharePoint. One of them is using UI. While this method has become better over the years, it's still slow and buggy at times. Just recently I had an issue where SharePoint UI would not move more than 20 folders, it would time out.  Another method is using PowerShell to do such a task. Out there you can definitely find scripts that would move data; however, you need to provide all prerequisite information and do it correctly. A typo or a library display name vs different internal name would leave you scratching your head for quite some time. If you do use subsites in your site collections, then things become progressively more complicated. To address most of the struggle I decided to create a script that will do it all. The goal was to automate everything where an admin would only…

Continue ReadingPowerShell – SharePoint – Move folders between site collections, subsites, and libraries

PowerShell – SharePoint – Permission report for all lists and libraries within every site collection and subsite

Here is a script that comes very handy when you need to replace some SharePoint groups with other ones. While doing so you definitely want to make sure no one has lost access. So you need to know where each group has been used. To create this script I used Salaudeen Rajack's PnP PowerShell to Export Document Library Permissions in SharePoint Online script posted here (https://www.sharepointdiary.com/2019/02/sharepoint-online-pnp-powershell-to-export-document-library-permissions.html), then did some adjustments to it including converting it to a function. Then added my code to go through each site collection and subsite. What this script does and how it might be beneficial to you: goes through every site collection and subsite, then library and list; has a list of site collections to exclude; does not include Office 365 Group sites; outputs the following data - site/subsite URL, library/list title, user/group name, user/group type, permission level, how it's granted. This script might take…

Continue ReadingPowerShell – SharePoint – Permission report for all lists and libraries within every site collection and subsite

PowerShell – Script to migrate a security group and all its members from AD to AAD

When you decide it's time to migrate your security groups from on-premise AD to the Cloud, you might find it very tedious and prone to mistakes. Of course that is if you have lots of groups to move. The script in this post should come to your aid as it finds the group you would like to migrate, creates a new group in AAD with a name you choose, then it adds all users and nested groups into the newly created group - the same as your AD group had. A few nice things this script also does: checks if the group you are about to migrate exists in AD; makes sure a group you will be creating in AAD doesn't already exist; combines description and notes, then adds them to a newly created group in AAD. Note that for this script to work well all nested groups must be…

Continue ReadingPowerShell – Script to migrate a security group and all its members from AD to AAD

Adaptive Cards – edit default approval Adaptive Card

This post will describe what steps to take to adjust a default Approval Adaptive Card. Why would one want to do that? Well, by default it shows some unnecessary information, Requested by First Last Name note is probably the most questionable.  In the example below a Power Automate Flow will be used to post a card into Microsoft Teams. Please note it's easy to break an Approval Adaptive Card when changing its JSON code. Let's create a Flow that creates an approval request, posts an Adaptive Card, and then waits for its result. Make the Flow run - what we really need is the output of it. Copy the code from the Message field as shown below. Go to https://adaptivecards.io/designer/ and paste the previously copied code into the Card Payload Editor. As soon as you change any element in your card using the visual editor, the code in the Card Payload…

Continue ReadingAdaptive Cards – edit default approval Adaptive Card

PowerApps Form – submit multiple forms at once without Patch and extra buttons

Everyone knows that PowerApps Forms are much trickier than their siblings - PowerApps Apps. So when it comes to creating a multi form experience it's not the same for PowerApps Forms. In fact Microsoft PowerApps Team recommends using a Patch function or other workarounds. So officially multi forms for PowerApps Forms are not supported. It's obvious why one would like to use multiple forms over a huge single form - a better user experience and a natural feel. So it is doable and the benefits of using it the way I described below are: No extra buttons. While a custom button can compliment your form and expand its functionality, you still have standard buttons you cannot hide. All columns can stay required on a SharePoint level. The forms will react to those required fields as needed. No Patch function. Don't get me wrong, the Patch function is very useful but…

Continue ReadingPowerApps Form – submit multiple forms at once without Patch and extra buttons

Microsoft Flow – parse email and extract information

If you have a 3rd party system that sends standardized notifications and you would like to automatically process those notifications, then this Flow can be helpful. The flow below parses a predefined email, extracts information for you to take further actions with it. Those actions can be: saving data into a SharePoint List; forwarding part of an email to another system; removing all formatting and so on. The flow is pretty simple and consists of these steps: 1) Trigger - When a new email arrives. 2) Action - Html to text - convert email body from HTML to plain text. 3) Action - Initialize variable - store a carriage return value in it. Peek code view: { "inputs": { "variables": [ { "name": "CRLF", "type": "String", "value": "\n" } ] } } 4) Action - Compose - split output from #2 into an array. Expression: split( trim( uriComponentToString( replace( uriComponent(…

Continue ReadingMicrosoft Flow – parse email and extract information