web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Deep Linking- Leave Re...
Power Apps
Answered

Deep Linking- Leave Request template

(0) ShareShare
ReportReport
Posted on by 318

Hi All,

 

I have a working Leave Request App, I have used the template and changed the data source from Excel to Sharepoint. Everything is working fine.

I wanted to attach a link in the email where manager can redirect to this page directly and Approve or Decline the leave, 

VikasNagaraj_0-1640017114965.png

I am still using the default Email template from the app.

ClearCollect(EmailTemplate,
"<html>

<head>
<meta http-equiv=""Content-Type"" content=""text/html; charset=us-ascii"">
</head>

<body>
<p>
There is a leave request from: {SubmitterName} pending your approval. <ul><li>Type: {LeaveType}</li><li>Title: {LeaveTitle}</li><li>Description: {LeaveDescript}</li><li>Start Date: {LeaveStart}</li><li>End Date: {LeaveEnd}</li>" &
"</p>
</body>
</html>"
)
);

 

I tried to add the below code to the email tepmlate, but the app stopped displaying everything.

<a href="https://apps.powerapps.com/play/7c6e4d74-4f37-4c14-8439-b108388d73c2?tenantId=a45674ca-6ebb-4f37-8498-151d559ab4a2">
Click here to go to App
</a>

Please help, Thank you.

Categories:
  • Sid_Jafri Profile Picture
    478 on at

    Is there any reason that you don't want to use the Power Automate Approval process? You can send all that information in the email and/or Teams with Approve/Reject button

  • VikasNagaraj Profile Picture
    318 on at

    @Sid_Jafri 

    Thanks for the reply, I did try at the begining and not very good at flow so taught this would be alternative, If i could get a help with flow i will be happy with that as well, i basically need a email where my manager can aprove and reject it thats all. Will you be able to help me with the flow?

  • Sid_Jafri Profile Picture
    478 on at

    You can create Power Automate Flow on When item is created or modified in Sharepoint, in next step select the site address  and sharepoint list. In next action item check the condition and validate if the Status column value is "Pending" then add the Approval action item. You can use below template and add the condition before approval start. 

    https://canada.flow.microsoft.com/en-us/galleries/public/templates/f42bcec1cafa4ff2a6be6f58a15456f4/send-approval-email-when-a-new-item-is-added/

     

    You can also watch any video on youtube to get some help but if still have an issue please feel free to message me.

    Please accept this as a solution if it resolve your issue


  • VikasNagaraj Profile Picture
    318 on at

    @Sid_Jafri 

    I tried the same thing earlier and since i have used the default leave request template everything is hard coded. I did get to a point where i was able to get emails for approve and reject but in the app it mess up again. it just sits there as approve and reject and once it is approved or declined, it does not show in approved or decline tab. the requests displays on "All" tab thats all.

    VikasNagaraj_0-1640019302493.png

     

  • Verified answer
    Al_10 Profile Picture
    1,691 Super User 2024 Season 1 on at

    @VikasNagaraj 

     

    if you want to add a URL to the email template, need to use single quotes.

    your code will look like:

    ClearCollect(EmailTemplate,
     "<html>
    
     <head>
     <meta http-equiv=""Content-Type"" content=""text/html; charset=us-ascii"">
     </head>
    
     <body>
     
     <p>
     There is a leave request from: {SubmitterName} pending your approval. 
     <ul>
     <li>Type: {LeaveType}</li>
     <li>Title: {LeaveTitle}</li>
     <li>Description: {LeaveDescript}</li>
     <li>Start Date: {LeaveStart}</li>
     <li>End Date: {LeaveEnd}</li>
     </ul>
     </p>
     
     <a href='https://apps.powerapps.com/play/7c6e4d74-4f37-4c14-8439-b108388d73c2?tenantId=a45674ca-6ebb-4f37-8498-151d559ab4a2'>
     Click here to go to App
     </a>
     
     </body>
     </html>"
    )
    

     

     

  • VikasNagaraj Profile Picture
    318 on at

    @Alex_10 

     

    Thank you very much, This solved my issue. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 223

Last 30 days Overall leaderboard