Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

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

(1) ShareShare
ReportReport
Posted on 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 at
    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 at
    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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492