Alex
Alex

Reputation: 1

Power Automate - Send a hyperlink from an email to a team channel

I'm using Power Automate to post a message to the Teams channel when emails arrive. But I can't post an email hyperlink from an email message as a hyperlink in the command channel, only as text: [https://link.com]. Do you have any solutions, please? Image

First I convert Htlm to Text. Second create NewLine. Next use:

split(outputs('Html_to_text')?['body'], outputs('newLine'))

Then Filter array:

length(trim(item()))

And take line number four:

body('Filter_array')[4]

After all post line number four.

Upvotes: 0

Views: 2884

Answers (2)

Brandon
Brandon

Reputation: 1

Found this trying to fix a "Post a message in a chat or channel" action in Power Automate.

'Identity' answered it but left out a key part.

Add a step and search 'Initialize Variable' Name that variable LinkURL (or whatever you want) set the type to String and past the web url in the Value field.

You can then use the 'Add dynamic content' feature to place the linkURL as displayed in 'Identity's answer

Screenshot of my now fixed and working automation

Upvotes: 0

Identity
Identity

Reputation: 1

I stumbled onto this post after I was having the same issue. I was able to resolve it by using the Code View option on the "Post a message in a chat or channel" action in Power Automate and adding an HTML link.

Example Power Automate Flow

Once you have opened Code View inside of the action, you are able to use an HTML link in the format of:

<a href="url">link text</a>

Replace the href value with the variable holding the URL and you should be set!

Upvotes: 0

Related Questions