This blog is part of a series on Teams. For more articles, check back often

Written: 11/11/2021 | Updated: N/A

It’s been such a crazy week! But with a slither of room to breathe I took time to look at Vesa Nopanen’s blog on loop components this morning and decided I wanted to have a bit of a play. You see, Vesa is one of my best mates in IT and we practically talk every day. We organize Teams Nation together. We speak on the circuit together. We have a lot of the same thoughts and interests in the same kind of areas. So this blog really is a follow up to his. I am not going to retrace his steps in this piece, but I am going to start out from where loop components are stored, which is OneDrive. Now, the fact that it is stored in OneDrive makes sense because the loop components in Teams are only available on private chats. This makes me think that when loop components emerge for channels, the .fluid file will be housed in SharePoint. This would be consistent with Teams Meeting Recordings. Yet the fact that they are housed in OneDrive means that we can start using flows and automation with them. That’s right. Let’s create some flows with loop components, or to coin a portmanteau, let’s go ‘flooping’. This is a completely experimental blog and there’s probably going to be loads of roadblocks. But let’s see a few things we can come up with. Just for fun. I’ll bet you by the time I have got to the end of this I would have built a flow right to the very end and it didn’t work on the very last action.

This blog will cover

  • Creating a loop component in Teams
  • Loop component access and storage
  • Flow 1: Simple Notification of when a loop has been modified/deleted
  • Flow 2: Providing a Share Link with the loop component
  • Flow 3: Scheduling a Loop Component Review
  • Flow 4: Listing Loop Components
  • Conclusion

Note this blog will have some abridged steps which will assume some experience with a Microsoft 365 environment, particularly Teams, Power Automate and Lists

Prerequisites

  • Microsoft 365 Licence which includes Teams, Power Automate, Exchange and SharePoint and Planner enabled
  • This functionality is public preview at the time of writing and so users need to be enabled for the functionality

CREATING A LOOP COMPONENT IN TEAMS

1.) Let’s retrace a few steps from Vesa’s blog. Loop Components in Teams are currently created via private chats, or private group chats, in Teams select the Chat app

2.) Select the person you are going to chat with. When posting a message select the loop component messaging extension between attachments and emojis

3.) Select which loop component you would like to build. This example will use Bulleted List

4.) Create the bulleted list and give it a name. Note that by default permissions are set that to the organisation can edit. I don’t want this so I am selecting people currently in this chat. I can also choose between view and edit permissions. Select Apply and then post the message

5.) The loop component is now created

LOOP COMPONENT ACCESS AND STORAGE

1.) As Vesa mentioned in his blog you can access loop components via office.com. From there we can open the loop component in the browser onto what is the loop page

2.) In Terms of storage, the .fluid file for the loop component is stored within the Microsoft Teams Chat Data folder within OneDrive

FLOW 1: SIMPLE NOTIFICATION WHEN A CRITICAL LOOP COMPONENT HAS BEEN DELETED

Ok, lets got. Because the .fluid file is housed in OneDrive this opens the door to using flows. The first one I was thinking about is some kind of notification if a critical loop component is deleted. I am imagining a time when I am going to be working with many loop components with similar names and I may accidently delete one which is really important to the organisation.

1.) Because I don’t want trigger notifications for every item in the Microsoft Teams Chat Files folder I create a dedicated folder called Loop Components and move the .fluid file I created over to it

2.) In Power Automate, I create an Automated Cloud Flow and because one doesn’t exist for ODFB I’ll use a little workaround and use the SPO trigger When a File is Deleted.

3.) I enter the ODFB URL for the site, the library name as ‘Documents’ and then set the folder as the folder with the .fluid file in (in this case Loop Components) and select New Step

4.) I search for an select the Exchange action Send an Email (V2)

5.) I set the email to come to me, a title to confirm that the loop component has been deleted, and dynamic content to specify which component it is. I have also added a description of what the loop component is for, why it is critical and what it is used for as well as a hyperlink to the recycle bin where it will be to be restored

6.) Let’s test it. I deleting the .fluid file in OneDrive after saving, checking and manually triggering the flow. All working. Sweet!

7.) To note, we could mix this up a bit if you had someone who needed to approve the deletion of the loop component. In this case simply add an approval action, a condition, and have the emails reflective of the outcome such as outlined below

FLOW 2: BUILDING AND PROVIDING SHARE LINKS TO THE ORGANISATION

The way I see it, it’s not about everyone in an organisation creating loop components. You could have a situation where only a few, like those who build PowerApps, or Flows, build loop components. If this is the case how could you ensure that others can access the loop components within the organisation and make it easy for them to access them? What about those outside. Sure, we could do it all via private chats or drop copy links into Teams right (at least for those within the organisation – loops with federated chat isn’t supported yet)? Perhaps – but even then I don’t want to spend all day adding permissions, or providing links. I have a job to do. So can I provide a mechanism to give anyone in my org or anyone outside my org, permissions

1.) I create a form in Microsoft Forms which has one question which asks what loop component they want access to, and it also asks for an email address

2.) In Power Automate I select an Automated Flow and set a Forms trigger linked to the Form I just created

3.) I then add another Forms Action which is Get Response Details as this pulls the answers on the form

4.) Next I go and set up a List in Microsoft Lists which will hold the response. One column for the answers to both the loop component and email address

5.) The next step of the flow I add a SharePoint Create Item action which will populate the list

6.) The next step of the flow I add an Approvals Everyone Must Answer action. People shouldn’t just have free access to the loop components. They need to be validated and their needs to be audit trail of that. This can be set to be the creator, or a designated line manager. You could even use sequential or parallel approvals here.

7.) Next? We need to identify the loop component for the requester to get access to. We don’t want to build a flow for every loop component. So we create a Condition action. This is based upon the Title in the List which is the Name of the loop component

8.) If the response is no then the flow terminates. We could also add an addition action here which sends out an email to the requester. If the response is yes, then we can use the OneDrive Create Share Link action which creates the link and sends it to the requester via email

9.) Lets try it out! Complete the form, and the link comes through via email. Please note you can use hyperlinks in the flow to ensure the link is hyperlinked in the email. I just didn’t do that part.

In terms of how this could work with those outside of the organisation, and collaborate on loop components, there isn’t any great way to do this at the current time

1.) Loop components don’t support anonymous access
2.) Adding permissions to the Loop file or generating a sharing link works but the external person still can’t access the loop page
3.) An external user can be added as a guest but a.) cannot currently access the loop page, or if the loop component message link has been copied and pasted into the chat the guest can see the loop component but not the content. I am sure this will be rectified in the future

In the meantime you can do as follows

1.) Download the .fluid file from office.com or OneDrive

2.) Send the .fluid file to who you are collaborating it, and when they upload it to their OneDrive they can work on it a loop page where they can design, download and send back. If the same naming conventions are used it can like for like replace the old loop component

FLOW 3: SCHEDULING A LOOP COMPONENT REVIEW

Ok, this is an easy one. From time to time we may want to collaborate on updating the loop component. Imagine this is a table, or a list.

1.) In Teams, create a group chat and add who you need. Give this group chat a distinguishable name

2.) Copy the message link (card shape in the top right hand corner of the loop component. In this example, it was

https://m365x924162-my.sharepoint.com/:fl:/g/personal/chrish_m365x924162_onmicrosoft_com/EXGBdvQCjFpAspP_NvJ78TcBYnPpa8S9L4_GhLRhcwmC-w?nav=cz0lMkZwZXJzb25hbCUyRmNocmlzaF9tMzY1eDkyNDE2Ml9vbm1pY3Jvc29mdF9jb20mZD1iIS1nR3djX2JaeUVhTWVqWGlrRnpjNmt4XzhNd0wzSVpHdWs0YVF4XzEwX3JWcXRrR1dyaVZTb1VJSzBHNlhEdEsmZj0wMUNDTTNJTlRSUUYzUElBVU1MSkFMRkU3N0czWkhYNEpYJmM9JTJGZGVmYXVsdENvbXBvbmVudCZmbHVpZD0xJnA9JTQwbXMlMkZvZmZpY2UtZmx1aWQtY29udGFpbmVy

3.) In Power Automate, start with a Scheduled Flow. For example, this runs at 5pm every Friday.

4.) Create a Teams Post Message action and include the message link (hyperlinked). Save and test.

5.) The regular review of the loop component can take place either via clicking the hyperlink which takes you to the loop page, or copying and pasting into the message bar which renders the loop component. To note, once messages can render the loop component this will get much slicker and much more effective

6.) Imagine what it would be like when we can automate this into multiple channels via messages or adaptive cards and it renders

FLOW 4: LISTING LOOP COMPONENTS (INVENTORY)

Building on some of the examples above I started thinking about loops components as being like a toolbox of atomic elements which you can put together for situations as and when you need them. Take the example above – the Ignite registration. Wouldn’t it be good to use that component for every Ignite, into multiple chats and channels, and shared channels? For sure. But that functionality doesn’t exist today. But we can create our toolbox. Not all from automation but largely.

1.) Ok, first up I’ll create a list. In that List I am going to build 3 columns. Name, Page Link and Component Link. Name will be single line of text, however the URL columns will be multiple lines of text to avoid the 255 character limit since the URL’s are pretty long and the flow will error. I am going to store this list in a team not a personal list.

2.) Format the Page URL columns with this which will create hyperlinks

{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "a",
"attributes": {
"href": "@currentField",
"target": "_blank"
},
"txtContent": "@currentField"
}

2.) Add this to a Team on a Lists Tab

3.) Now the List is created a Form corresponding to the appropriate columns

4.) Build the flow using a Forms Trigger, Get Response Details Action and then a SharePoint Create Item action as shown below

5.) You can get all the details from the loop component itself. The name is the title of the loop component and the message link (top right of the message looks like white cards) can be can used for both the component URL and the page URL since using it outside a private chat defaults to the loop page

Also consider who you want using this component – your team, the whole org? Set the permissions on the loop component before you add it to the list. By default, without specifying permissions, loop components are set to everyone in the organisation can edit

6.) Once you have the loop component details, add these to the form and Submit

7.) They are now entered into the List in the List App and in Teams

8.) The importance of this is everyone in the team who clicks on the Page URL will be taken to the Loop Page

9.) And everyone who cuts and pastes the component URL can just use it in any private chat they have with someone in their organisation

The awesome thing about this is multiple members of the team can put all their loop components within the list and if the permissions are set, all the team will have a treasure trove of loop components.

In addition, the list can be cleaned up a bit, as in if the team are skilled at using the list and know how to use things like short links then it can be made to look and feel a lot better if you need

CONCLUSION

What can I say? Having played around with flows for loop components there is so much potential. It’s so far away from the finished product we aren’t really even at the start. There are lots of gaps: one for example is that hyperlink columns on the list don’t support more than 255 characters which is a pain so a workaround had to be used. The URL’s for the loop components are seriously long and unwieldy, and you can’t use loop components in federation. In addition, you can’t trigger a loop component in a message by a share link which gives out the loop page URL. But these things will come in time. What is important is that what we have seen opens up a whole need world and so many automation scenarios, so many build scenarios, that there will be pros in organisations who focus on loop components, especially as they begin to surface in other applications outside of Teams. I mean, it hasn’t even come into channels yet. I for one am in at ground zero on this 100%

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.