Power Automate: Advanced Flow building

Power Automate is one of my favorite tools from the Power Platform. It is extremely versatile and can be used to automate tasks between online services and automate processes ranging from simple to highly complex. In this post, I will share with you 3 advanced expressions I have used recently on my project. One part of the project is to convert XML data to data we can store in the dataverse.

Convert XML to JSON for easy access

For a project I needed to read multiple XML files with millions of rows and store data from the files into the dataverse. XML is harder to use in a Flow then JSON, so with a simple expression I transformed the XML to JSON.

  • Add a compose action with the name XML to JSON with the following code.
json(xml(variables('XML')))
  • Change the variable(‘XML’) to your XML content or store your XML content in that variable.
  • Add a parse json action set the Content to the output of the XML to JSON compose.
  • Add/create the JSON schema.

Using path in JSON

In most cases when you need to save data from JSON you can use the dynamic content to find it.
But sometimes you are looking for a field name that is not unique. In my case I needed a field called country related to the company. But the country field was used multiple times for various blocks. You can select the correct country by using the path (location) of the field in an expression.

  • Select the JSON through the dynamic content.
  • Copy the code from the dynamic content to the Expression.
  • Add the path add the end of the code.
  • I added .company.country to select the country of the company.
body('Parse_JSON').company.country

Dataverse lookup field

Lookup fields in Dataverse are really useful, but when you select them through the dynamic content the value will be the id not the display value. If the data must be readable for users, you can use the following steps to select the display value.

  • Add a compose to the flow.
  • Select the lookup field in the Inputs through the dynamic content.
  • Copy the code from the dynamic content to the Expression.
  • Your output looks something like this.
outputs('company')?['body/rc_countrycode']}
  • Add the @OData.Community.Display.V1.FormattedValue’ after rc_countrycode (your field name will be different).
  • The end results looks like this.
outputs('company')?['body/rc_countrycode@OData.Community.Display.V1.FormattedValue']

Power Automate: Find the current environment

When working with an ATOP setup you might need to know in which environment the Power Automate flow is running. For my solution I needed to know the environment because each environment uses a different Gateway and database credentials. In this post, I will share with you how to find the environment GUID and name.

Creating the flow

  • Create a flow and use the trigger Manually trigger a flow.
  • Add the action Get Environments under Power Apps for Makers
  • Add the Compose action and use the Workflow() expression, to get the current instance of the flow.
  • Parse the Output in a Parse JSON action.
  • Initialize a variable with the name environment as a string.
  • The Value is the EnvironmentName form the Parse JSON output.
  • Now you have the GUID of the current Environment in the variable.
  • To find the name of the current environment we need to go through the results of the Get Environments action.
  • Add a Condition control action and check if the environment variable is equal to the name from the Get Environments actions.
  • This will automatically add an Apply to each, this is because the Get Environments action might return more than one environment.
  • Add a Set variable action in the If yes section and set the variable environment to displayName.
  • Now you have the Name of the current Environment in the variable.
  • The final step is to add a Switch control and switch based on the name of the current environment.
  • The flow will now look like this.

Power Automate: 6 flow building tips

Power Automate is one of my favorite tools from the Power Platform. It is extremely versatile and can be used to automate tasks between online services and automate processes ranging from simple to highly complex. In this post, I will share with you 6 tips and tricks when building flows in Power Automate.

Flow templates

A good way to get started with Power Automate is to use a template. Microsoft created a huge library of templates to choose from. You can browse by category to find your scenario, and then follow the steps in the template to create a flow from the template. You can also us the templates to figure out how to setup certain actions.

Equal to empty

Over the years many colleagues have asked me; how do I check if a value is empty? You can do this with the null expression! Note that sometimes you need to place the null between ‘ ‘.

Use parallel branches

Most flow builders forget to use the parallel branches. With parallel branches you can have two or more actions that run at the same time, after which the flow will only proceed once all parallel steps have completed. Parallel branches can be very useful for approval flows. For example, you have a request that needs to be approved by both IT and Sales, but the approval doesn’t need to be in a particular order. To save time you can run the approvals parallel.

Use scopes

We can use the action scope to group actions to make the flow easier to read. There is however another great use for them. The scope action encapsulates a block of actions and inherit the last terminal status (Succeeded, Failed, Cancelled) of actions inside. This in combination with the Configure run after setting we can create a try and catch logic in our flows. In this example the second scope (catch) only runs if the first scope (Try) failed.

  • Create a scope with some actions
  • Create a second scope after the first scope
  • Set the Configure run after setting of the second scope to has failed, is skipped and has timed out.
  • In this scenario the catch scope will only run if the Try scoped failed.
  • The flow will look like this.

Add redundant owners

If you have a flow that is used by your entire team, make sure you add a couple of co-owners. Then you will not be bothered during your vacation when the flow breaks. If you keep adding the same colleaguesas co-owners you can consider creating a security group and add the security group to the flows. Also make sure you add the co-owners to all the resources required by the flow. For example, the shared mailed that is used by the flow.

Connections

Actions use by default the connection (if required) of the creator of the flow. This is not always the best way to setup the connections. For example, if your flow updates a list you might not want to see your name as the modifier. I recommend using a dedicated account (service account) for most shared flows. The added benefit of using a dedicated account is that the flow will keep working even if you change your job.

Office 365: What’s new from Microsoft Ignite

During Microsoft Ignite many innovations that transform the workplace communications have been announced. Its impossible to name them all, so instead I will share with you my favorite innovations. Note that some of these features are already live, being rolled out or still being developed.

SharePoint app bar

The SharePoint app bar might even be my favorite announcement from Ignite. The app bar will be visible on every site on your intranet providing a consistent navigation experience. But it’s not only for navigation, that is just the beginning. The app bar also shows personal relevant sites, news feed and the files.
The SharePoint app bar will appear after you set a SharePoint site as a home site.

thumbnail image 1 of blog post titled 
	
	
	 
	
	
	
				
		
			
				
						
							Introducing a SharePoint app bar that features global navigation
							
						
					
			
		
	
			
	
	
	
	
	

	
	
	 
	
	
	
				
		
			
				
						
							Re: Introducing a SharePoint app bar that features global navigation
							
						
					
			
		
	
			
	
	
	
	
	

	
	
	 
	
	
	
				
		
			
				
						
							Re: Introducing a SharePoint app bar that features global navigation
							
						
					
			
		
	
			
	
	
	
	
	

	
	
	 
	
	
	
				
		
			
				
						
							Re: Introducing a SharePoint app bar that features global navigation
							
						
					
			
		
	
			
	
	
	
	
	

	
	
	 
	
	
	
				
		
			
				
						
							Re: Introducing a SharePoint app bar that features global navigation
							
						
					
			
		
	
			
	
	
	
	
	

	
	
	 
	
	
	
				
		
			
				
						
							Re: Introducing a SharePoint app bar that features global navigation
							
						
					
			
		
	
			
	
	
	
	
	

	
	
	 
	
	
	
				
		
			
				
						
							Re: Introducing a SharePoint app bar that features global navigation
							
						
					
			
		
	
			
	
	
	
	
	

	
	
	 
	
	
	
				
		
			
				
						
							Re: Introducing a SharePoint app bar that features global navigation
							
						
					
			
		
	
			
	
	
	
	
	

	
	
	 
	
	
	
				
		
			
				
						
							Re: Introducing a SharePoint app bar that features global navigation
							
						
					
			
		
	
			
	
	
	
	
	

	
	
	 
	
	
	
				
		
			
				
						
							Re: Introducing a SharePoint app bar that features global navigation
							
						
					
			
		
	
			
	
	
	
	
	

	
	
	 
	
	
	
				
		
			
				
						
							Re: Introducing a SharePoint app bar that features global navigation
							
						
					
			
		
	
			
	
	
	
	
	

	
	
	 
	
	
	
				
		
			
				
						
							Re: Introducing a SharePoint app bar that features global navigation
							
						
					
			
		
	
			
	
	
	
	
	

	
	
	 
	
	
	
				
		
			
				
						
							Re: Introducing a SharePoint app bar that features global navigation
							
						
					
			
		
	
			
	
	
	
	
	

	
	
	 
	
	
	
				
		
			
				
						
							Re: Introducing a SharePoint app bar that features global navigation
							
						
					
			
		
	
			
	
	
	
	
	

	
	
	 
	
	
	
				
		
			
				
						
							Re: Introducing a SharePoint app bar that features global navigation
							
						
					
			
		
	
			
	
	
	
	
	

	
	
	 
	
	
	
				
		
			
				
						
							Re: Introducing a SharePoint app bar that features global navigation
							
						
					
			
		
	
			
	
	
	
	
	

	
	
	 
	
	
	
				
		
			
				
						
							Re: Introducing a SharePoint app bar that features global navigation
							
						
					
			
		
	
			
	
	
	
	
	

	
	
	 
	
	
	
				
		
			
				
						
							Re: Introducing a SharePoint app bar that features global navigation
							
						
					
			
		
	
			
	
	
	
	
	

	
	
	 
	
	
	
				
		
			
				
						
							Re: Introducing a SharePoint app bar that features global navigation
							
						
					
			
		
	
			
	
	
	
	
	

	
	
	 
	
	
	
				
		
			
				
						
							Re: Introducing a SharePoint app bar that features global navigation

Home site in Teams

Your intranet (home site) is coming to Microsoft Teams. With the home site app for Microsoft Teams users gain direct access to the SharePoint Home site in Teams. The home site app in Teams gives your users global navigation across sites, communities, and teams; quick access to sites they use regularly; and a personalized news feed.

thumbnail image 1 captioned The home site app for Teams brings the power of your SharePoint-based intranet home site seamlessly into Microsoft Teams.

SharePoint: News boost

Microsoft listened to our request; we are getting the ability to boost news! With this feature you wil be able to boost the visibility of your important news articles. You can boost a news post until it has been read, for a set number of impressions, or until a given date.

thumbnail image 3 of blog post titled 
	
	
	 
	
	
	
				
		
			
				
						
							Innovations for workplace communications and employee engagement in Microsoft 365

SharePoint: news digest 

Keeping up with all the all the news and information can be harder than it seems. With the automatically generated news digest you will receive an email summary of the news articles you have missed. This will ensure that everybody will be well informed. The news digest can be customized with your organization’s branding.

thumbnail image 5 of blog post titled 
	
	
	 
	
	
	
				
		
			
				
						
							Innovations for workplace communications and employee engagement in Microsoft 365

Teams: Dynamic view

Dynamic view makes uses of AI to optimize shared content and video participant, it intelligently arranges the elements of your meeting for an optimal viewing experience. The viewing experience will change when people join, turn on video, start to speak or when starting to present. You will still be able change the layout based on your preference.

thumbnail image 1 of blog post titled 
	
	
	 
	
	
	
				
		
			
				
						
							What's New in Microsoft Teams | Microsoft Ignite 2021

SharePoint spaces 

SharePoint spaces is a very powerful new tool for 3D interactions. SharePoint spaces enables you to make immersive and engaging mixed reality experiences for 3D content, models and 360° imagery.

Office 365: What’s new?

The updates for Office 365 keep coming and coming, Microsoft is not sitting still! I am very excited for the following new features. Note that some of these features are already live, being rolled out or still being developed.

Microsoft Viva

Microsoft Viva is an employee experience platform, helping you create a work environment that puts people first, driving better business results.

It consists of Topics, Connections, Learning and Insights which are (partly) modules based on Microsoft Project Cortex technology. It brings together people, knowledge, e-learning using Microsoft Teams and SharePoint. And it also brings a Viva Insights app into Teams, utilizing data from Workplace Analytics.

Teams: Virtual Breakout Rooms

The virtual break out rooms are here! The meeting owner can create break out rooms to be used by the meeting participants for smaller group discussion. Participants can be assigned to a room and call them back to the larger group when the breakout is complete.

Teams: End-of-meeting notification

Microsoft Teams will notify the meeting participant when there is 5 minutes left in the scheduled meeting time. This will help users to be on time for the next meeting or shorting meetings that might drag on for too long.

Teams: Attendee Dashboard

Download the attendance list with a simple button.

Teams: Spotlight

It’s now easier to see if you are in the spotlight and to remove yourself from the spotlight.

SharePoint: 250GB file size support

The new upload limit for large files is now 250 GB for Teams, SharePoint, and OneDrive

SharePoint: Image Lightbox

Users can click on an image web part while in view mode, to see a larger version of the image.

Teams: 20 Tips and tricks

Most of use have been working from home for months and use Teams on a daily basis. Working remotely can be challenging especially if you just started working with Teams. The following 20 tips and tricks should help you get more out of Teams even if you are an experience user.

This blog post is an extension of the older Teams: Tips and tricks post.

The tips and tricks

  1. Pin favorite chats
  2. Pop out chat
  3. Pop out list
  4. Use mentions in chat messages
  5. Turn on do not disturb
  6. Create rich-text messages
  7. Send urgent chat message
  8. Save / bookmark a post for later
  9. Mute a chat
  10. Slash commands
  11. Shortcuts
  12. Expand tabs
  13. Send an email to a channel
  14. Change the order of the teams
  15. Hide teams or channels
  16. Pin a channel
  17. Record meetings
  18. Mark messages as read
  19. Mark messages as unread
  20. Change channel notifications

Pin favorite chats

By default, the most recent chats are shown under chats. This means that all the chats with users and your meetings are mixed together. This can be a bit confusing since is changes all the time. You can pin frequent conversations to the top of your chat list, to create a clear and use full overview.

  • Open the chats in Teams.
  • Click on the … or right click on the chat you want to pin.
  • Click on Pin.
  • The pinned chats will be grouped above the recent chats.

Pop out chat

When working with Teams you might feel stuck with one screen, but this is not the case. When you hover over one of your chats, you’ll see the Pop out icon. Choose that option and the chat will be opened in a new pop out window.

Pop out chat window screenshot

Pop out list

When working in Teams you might feel stuck with one screen, but this is not the case. You can pop out a connected SharePoint list.

  • Select the pop out icon.

Use mentions in chat messages

To make sure a specific colleague in a group chat or channel reads your message, use the mention option.

  • In a chat window type @ and fill in or select the correct colleague.
@mention with suggested people

Turn on do not disturb

Constant messages and alerts are a productivity killer when you’re trying to focus. You can turn off those messages by enabling the do not disturb mode. 

  • Click in teams on your profile picture.
  • Click on the > next to the current availability.
  • Select Do not disturb.

Create rich-text messages

Some messages need rich formatting to be more effective. In a chat message click on the format icon for all the options.

Format a message in Teams.

Send urgent chat message

If you need an immediate reply on a message, tag the message as urgent.
The recipient will get notifications every two minutes for the next 20 minutes or until it’s read.

Save / bookmark a post for later

No time to read an important post? Save the message to make sure it does not get lost. Use the slash command /saved to access all the saved messages.

  • Click on the … of a message and select Save this message.

Mute a chat

Chat messages from meetings can be a bit noisy, mute them if you are not involved in the conversation. When you mute a chat, you’ll still be included in the conversation, but won’t get notifications from it. 

  • Click on the … of the chat and select Mute.

Slash commands

Slash commands are command you use in the search bar and all start with you quested it a / (slash). These commands will help you be as efficiency as possible.

  • Type / in the search box to see all the available commands.

Shortcuts

Microsoft Teams has a lot of useful shortcuts. Use the slash command /keys to see all the options.

Expand tabs

Most tabs can be expanded to focus on the content and hide the navigation.

  • Click on the expand icon, the two arrows.
This image has an empty alt attribute; its file name is image-12.png

Send an email to a channel

If you want to send an email to a channel in Teams, you can use the channel email address. Once an email is part of a channel, anyone can reply to it to start a conversation.

  • Click on the … of the channel and select Get email address.
  • Click on copy in the popup window.

Change the order of the teams

The order of the teams can be changed, simply drag and drop the teams in the preferred order.

Image of teams list

Hide teams or channels

If you don’t want a team or channel to show in your teams list, because you almost never use it you can hide it.

  • Click on the … of the channel or team and select Hide.

Pin a channel

Pin your favorite channels for fast and easy access. Pinned channels stay at the top of the list so you don’t have to hunt them down.

  • Click on the … of the channel and select Pin.

Record meetings

Recording meetings can be incredibly helpful. You can watch the discussions, find out what the decisions where, listen to the training again or watch a meeting you missed (recorded by someone else).

  • During a meeting click on the … followed by Start recording.

Mark messages as read

Chat messages from meetings or chat conversions you did not take part in or from a while back might not be that interesting. You can simply mark them all as read and ignore them.

  • Click on the … of the chat and select Mark as unread.

Mark messages as unread

In Teams you can mark a message as unread so you can come back to it later. Use the slash command /unread to see all the unread messages.

  • Click on the … of the channel and select Mark as unread.

Change channel notifications

Not all channels are equally important. Reduce the notification noise by customizing the notifications for specific channels.

  • Click on the … of a channel.
  • Click on the > next to the Channel notifications.
  • Select the preferred option.