cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Item Link in approval email includes HTML/CSS in the URL

Hello,

 

I have an approval workflow configured that includes dynamic content pulled from a SharePoint List in the Item Link field.:

GMackay_0-1630009261184.jpeg

 

The field that is being dynamically pulled from SharePoint contains a hyperlink (just used an example link to Power Automate site):

 

GMackay_1-1630009288019.jpeg

 

 

When the approval email is sent, the URL for the Link includes the HTML/CSS formatting and therefore the link does not work:

 

GMackay_3-1630009346935.png

 

How do I solve for this while still keeping the hyperlink in the SharePoint List?

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
v-xiaochen-msft
Community Support
Community Support

Hi @Anonymous ,

 

You need to use some formulas to extract the link from the string.

For example:

vxiaochenmsft_0-1630287878166.png

vxiaochenmsft_1-1630287905513.png

Compose1:

indexOf(outputs('Html_to_text')?['body'],'[https')
 
Compose2:
substring(outputs('Html_to_text')?['body'],add(outputs('Compose'),1))
 
Compose3:
substring(outputs('Compose_2'),0,indexOf(outputs('Compose_2'),']'))
 
vxiaochenmsft_2-1630287959174.png

 

vxiaochenmsft_3-1630287982285.png

 

Best Regards,

Wearsky

 

 

 

View solution in original post

3 REPLIES 3
v-xiaochen-msft
Community Support
Community Support

Hi @Anonymous ,

 

You could use 'html to Text' action.

vxiaochenmsft_0-1630030987839.png

vxiaochenmsft_1-1630030996060.png

vxiaochenmsft_2-1630031011151.png

 

Best Regards,

Wearsky

 

 

 

Anonymous
Not applicable

Hi @v-xiaochen-msft,

 

Thanks for the suggestion. How would I use that as an input to the Item Link field? I tried setting a variable to be an output of the conversion, but the link didn't work correctly:

GMackay_0-1630072501515.jpeg

 

GMackay_1-1630072526551.jpeg

 

GMackay_2-1630072541778.jpeg

 

Thanks.

v-xiaochen-msft
Community Support
Community Support

Hi @Anonymous ,

 

You need to use some formulas to extract the link from the string.

For example:

vxiaochenmsft_0-1630287878166.png

vxiaochenmsft_1-1630287905513.png

Compose1:

indexOf(outputs('Html_to_text')?['body'],'[https')
 
Compose2:
substring(outputs('Html_to_text')?['body'],add(outputs('Compose'),1))
 
Compose3:
substring(outputs('Compose_2'),0,indexOf(outputs('Compose_2'),']'))
 
vxiaochenmsft_2-1630287959174.png

 

vxiaochenmsft_3-1630287982285.png

 

Best Regards,

Wearsky

 

 

 

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (1,626)