Re: Send an email that includes the link, when a new message is added in Microsoft Teams
@romey2000
View the Message Outputs
If you insert the Message dynamic content from the When a new channel message is added action and run a test, you can view the outputs of what is returned.

The link to the message can be accessed using the webUrl key.

Get the Message URL
Insert another Compose action. Insert an expression, type in a question mark, square brackets and single quotes.
?['']
In between the single quotes, enter the key. In this case, it's webUrl. You must ensure the text matches the key.

Place your cursor at the start of the expression. Tip: Press the up arrow key.
Select the Message dynamic content.

Run a test. This will return your URL. You can use this in your email now.
Add Link to Email
Highlight your link text in the Send an Email (V2) action, click on the link button. You won't be able to select the dynamic content here. Enter any text (this is just temporary) into the Link Target field and press add.

Click the Code View button.

Highlight the text you entered for the Link Target (it will be the text between the double-quotes). Insert the Outputs from the Compose action that is holding your message URL.

Should look like this.

Hope this helps!
If I helped you solve your problem—please mark my post as a solution ✅. Consider giving me a 👍 if you liked my response!
|