question

JK-9260 avatar image
0 Votes"
JK-9260 asked BrunoLucas-9843 edited

How to create a Variable with a URL for Logic App?

I created a workflow in logic app consumption plan wherein the logic app will send emails to recipients that are in a table. Inside the mail body, I want to insert a URL wherein part of the URL is a variable coming from the table.

ex.
Table Data
FIrstName LastName ID
John Smith 1234

in the email body:
Link=www.abc.com/@ID (result will be www.abc.com/1234)

azure-logic-apps
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @JK-9260
Do you mean something like this, but rather than the http you have something like a database trigger?

199087-image.png

This produced this email:

199185-image.png


0 Votes 0 ·
image.png (23.4 KiB)
image.png (5.2 KiB)

1 Answer

BrunoLucas-9843 avatar image
0 Votes"
BrunoLucas-9843 answered BrunoLucas-9843 edited

Hi @JK-9260

There are a few different ways to accomplish that.
For email sending tasks (outlook or gmail) you can preferably use a string variable or the composer task.

With the composer you can actually generate the who mail message dynamically:

199169-image.png

Than drag it into the email body:

199271-image.png

The gmail task will take it even direct:

199233-image.png

if you prefer variables, initialize one in the top of the flow:
199272-image.png

set the value inside the loop:

199264-image.png

and apply on the email body

199265-image.png

Outlook also worked just fine:

199245-image.png

Testing the email, the link is fully functioning:

199256-image.png

Please don't forget to click on "Accept Answer" or upvote button whenever the information provided helps you.



image.png (24.0 KiB)
image.png (30.1 KiB)
image.png (8.3 KiB)
image.png (18.2 KiB)
image.png (16.8 KiB)
image.png (22.9 KiB)
image.png (31.0 KiB)
image.png (6.0 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.