Logic app - read emails - add proper name

Gabryel, Andrzej 166 Reputation points
2021-07-12T12:50:08.017+00:00

I have developed logic app reading emails attachments and saving them to datalake. I get emails daily and each email has data for different country. I have one issue with attachment name, as each attachment has name like "temp125631". I would like to save attachments with proper name already.

The way to differentiate them is to check from which email I got this message. So emails for US come from email dataforUS@Stuff .com, emails for Canada come from email dataforCanada@Stuff .com. The only difference is UE as data for each country come from dataforEU@Stuff .com. They way to differentiate them is to check CC recipients. One of this recipients will be Germandata@Stuff etc.

Is there some smart name to change name of saved attachment except of nested IFF statement?

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,488 questions
0 comments No comments
{count} votes

Accepted answer
  1. Pramod Valavala 20,656 Reputation points Microsoft Employee Moderator
    2021-07-14T12:56:09.99+00:00

    @Gabryel, Andrzej You could use an object like a map and then reference values using the email addresses as a key. This should work for nested values too.

    Here are some samples of how you can achieve something like this

    114643-image.png

    114681-image.png

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.