@Sergio Antonelli Thanks for reaching out. There is no out of box feature to get the csv link and you need to use the regex expression to extract the link from the body of your email. You can either use logic app inline code (that needs Integration account) to perform this operation or offload this function to Azure function. For your reference I am share the email body of my trigger and based on my body I have used the regex to extract the link
Email Body Content:
"<html><head>\r\n<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="Generator" content="Microsoft Word 15 (filtered medium)"><style>\r\n<!--\r\n@font-face\r\n\t{font-family:"Cambria Math"}\r\n@font-face\r\n\t{font-family:Aptos}\r\np.MsoNormal, li.MsoNormal, div.MsoNormal\r\n\t{margin:0cm;\r\n\tfont-size:11.0pt;\r\n\tfont-family:"Aptos",sans-serif}\r\na:link, span.MsoHyperlink\r\n\t{color:#467886;\r\n\ttext-decoration:underline}\r\nspan.EmailStyle17\r\n\t{font-family:"Aptos",sans-serif;\r\n\tcolor:windowtext}\r\n.MsoChpDefault\r\n\t{font-size:11.0pt;\r\n\tfont-family:"Aptos",sans-serif}\r\n@page WordSection1\r\n\t{margin:72.0pt 72.0pt 72.0pt 72.0pt}\r\ndiv.WordSection1\r\n\t{}\r\n-->\r\n</style></head><body lang="EN-IN" link="#467886" vlink="#96607D" style="word-wrap:break-word"><div class="WordSection1"><p class="MsoNormal">This is the test link</p><p class="MsoNormal"> </p><p class="MsoNormal">This is the test <a href="***" originalsrc="https://testsite/Free_Test_Data_200KB_CSV-1.csv" shash="*">link</a></p></div></body></html>"
JavaScript Code:
var text = workflowContext.trigger.outputs.body.body;
let match=text.match(/originalsrc="([^"]*)"/)
if (match) {
return match[1];
} else {
return String.Empty
}
Note: The above regex is only for reference and may need to change as per your body content of email by the trigger. If you have more than one link then you need to match the csv format as well. Please modify and test the regex at your end.
For your reference sharing the you can refer to the inline document. Once you have the link you can use the HTTP action to call any HTTP/HTTPS native URL.
Feel free to get back to me if you need any assistance.
Please "Accept Answer" if the answer is helpful so that it can help others in the community.