web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : c1eGMJARyyMcbuAOUjZzPZ
Power Automate - Building Flows
Answered

Building a flow to assign metadata to attachments based on email content

Like (1) ShareShare
ReportReport
Posted on 19 May 2021 11:29:16 by 6

Hello all, 

 

I am trying to build a flow that will take attachments off of an email and then assign metadata to the attachment based on the content of the email. I have already built the attachment part of this but I am struggling to figure out how to have the email read and assigning of metadata based on its content. 

 

For instance if I was trying to assign date, name and document type (all of which are columns in this library) based on the first line of the email received. The email would contain that information in its first line (or subject) if thats easier in a format similar to this 12/31/2020-Fund A-Schedule A. 

 

Anyone have any idea if this is something that is possible or have experience with this  ?

 

Thanks,

Tyler

  • tlkamps Profile Picture
    6 on 25 May 2021 at 13:25:09
    Re: Building a flow to assign metadata to attachments based on email content

    @tom_riha, thank you so much for the response here. This is exactly the type of logic that I was looking for. Based on that would I be able to build that into a flow that would take each of those and tag it as meta data to the attachment that came along with that same email?  

     

    Thanks,

    Tyler

  • Verified answer
    tom_riha Profile Picture
    10,127 Most Valuable Professional on 20 May 2021 at 17:39:46
    Re: Building a flow to assign metadata to attachments based on email content

    Hello @tlkamps ,

    it's easier for sure to get the information from the email subject than from the email content. If you can guarantee that the email subject will always have the same format, e.g. date-fund-schedule (pieces separated by - character), you can use the split(...) expression on the subject to split it by that character

    split([SubjectDynamicContent], '-')

    That will give you an array with the - separated pieces, e.g.

    [
     "12/31/2020",
     "Fund A",
     "Schedule A"
    ]

     and since it's an array, you can access it by the index in the array [x] starting from [0]:

    split([SubjectDynamicContent], '-')[0] will give you "12/31/2020"
    split([SubjectDynamicContent], '-')[1] will give you "Fund A"
    split([SubjectDynamicContent], '-')[2] will give you "Schedule A"

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2