How To Create A Deep Link To A Specific Record In The Teams PowerApps

Introduction

A deep link is important when you need to navigate the user to a specific record or a screen through a link. Here we will create a deep link through Power Automate and send it via email. The recipient can click on that deep link to directly navigate to a particular PowerApps screen.

So, in this article we will learn below points: 

  1. How to add your app to the team channel tab?
  2. How to get an App link?
  3. How can we create a deep link and how this can be sent via email?

Step 1 - Sign in to the Microsoft Teams

Step 2 - Create an App in Teams PowerApps

Add PowerApps from the left pane of the teams by clicking 3 dots.

How To Create A Deep Link To A Specific Record In The Teams PowerApps?

 Select the Team, and select the existing app or create a new app.

 For a demo purpose, here I have created one new app named Travel Request management in the Travel Request management team.

How To Create A Deep Link To A Specific Record In The Teams PowerApps?

Step 3 - Add an app to the team channel tab

  • Click on PowerApps from the left pane of teams.
  • Select the Build tab and then select the team in which you have created your app.
  • ​​​​​Click on See all.

How To Create A Deep Link To A Specific Record In The Teams PowerApps?

Click on the 3 dots of the app and select Add to teams.

How To Create A Deep Link To A Specific Record In The Teams PowerApps?

Click on Add to Teams button.

How To Create A Deep Link To A Specific Record In The Teams PowerApps?

Then it will open a popup, in this popup, we can add the app directly in the left pane of teams by clicking Add button, also on clicking the down arrow button we can Add to teams or Add to a chat.

But here I have clicked on Add to teams option. 

How To Create A Deep Link To A Specific Record In The Teams PowerApps?

For adding an app type, a team or channel name and select a team and click on the Set up a tab button.

How To Create A Deep Link To A Specific Record In The Teams PowerApps?

Click on the Save button.

How To Create A Deep Link To A Specific Record In The Teams PowerApps?

Select a team or channel and click on + icon.

How To Create A Deep Link To A Specific Record In The Teams PowerApps?

Once you click on the + icon then you can see all the default apps and those you have added previously. Then select your app and then click on the Save button.

How To Create A Deep Link To A Specific Record In The Teams PowerApps?

How To Create A Deep Link To A Specific Record In The Teams PowerApps?

Step 4 - Get an App link 

Select a team or channel and click the arrow icon from the above tabs of the app tab. 

Then select Copy link to tab and you will get the link to the app then convert this link to decode the URL and use this URL as a deep link.

How To Create A Deep Link To A Specific Record In The Teams PowerApps?

For example, here is my Encode URL (Copy link to tab)

How To Create A Deep Link To A Specific Record In The Teams PowerApps?

Decode URL 

How To Create A Deep Link To A Specific Record In The Teams PowerApps?

Step 5 - Create an app link and send it via email

  • We can use this decoded URL in the email body.
  • Add your required parameters in subEntityId with some random charters.
  • Here I have used AAAZZZ.

How To Create A Deep Link To A Specific Record In The Teams PowerApps?

Now, let’s add the redirection logic in PowerApps as below:

1. In my case I have the below screens.

How To Create A Deep Link To A Specific Record In The Teams PowerApps?

2. Add a logic as ClearCollect(ParametersCol,Split(Param("subEntityId"),"AAAZZZ")); On Visible of the first screen (Here my first screen is SplashScreen)

ClearCollect(ParametersCol,Split(Param("subEntityId"),"AAAZZZ"));

3. On the Splash screen, add one timer control, and on that add the below logic on the OnTimerEnd property.

//Check if the deep link has parameters
If(CountRows(ParametersCol)>0,If(!IsBlank(First(ParametersCol).Result)&&!IsBlank(Last(ParametersCol).Result),UpdateContext({VarRequestID:First(ParametersCol).Result});Navigate(OperationScreen,ScreenTransition.Fade,{BackTo:DashboardScreen});ViewForm(Form1);Set(varorder,LookUp('Travel Requests',ID=Value(VarRequestID))),If(!IsBlank(First(ParametersCol).Result),UpdateContext({VarRequestID:First(ParametersCol).Result});Navigate(OperationScreen,ScreenTransition.Fade,{BackTo:DashboardScreen});ViewForm(Form1);Set(varorder,LookUp('Travel Requests',ID=Value(VarRequestID))),Navigate(DashboardScreen))),Navigate(DashboardScreen));

4. If you see the below URL I have passed the request ID as 31, thus the user will navigate to the Operation screen, where he can see the details of request ID 31.

How To Create A Deep Link To A Specific Record In The Teams PowerApps?

Conclusion

In this article, we have learned how to create a deep link in team PowerApps.


Similar Articles