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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Appending Email Attach...
Power Automate
Unanswered

Appending Email Attachment file name with email details

(0) ShareShare
ReportReport
Posted on by

Hi,

I have a flow running successfully that triggers when a new email arrives into a certain Outlook folder that has an attachment.  We have vendors that send files to this Inbox all throughout the day and I have Outlook rules running that drop them into this certain folder based on criteria either in the subject/body or the email address.

 

Once the trigger starts, it grabs the attachments, adds a date/time value into the filename, and then uploads it to our SFTP site.  The problem is the files are all randomly named and there's no good way to differentiate them once they are on the SFTP site.  I tried adding a Category to the Rule in Outlook that would categorize the email when it moves the file out of the Inbox, but I found that the Category is not an output on the Power Automate Email "When a new email arrives (V3)" trigger.

 

Long story short, I am trying to come up with a way to dynamically add a vendor name or some identifying factor to the filename of the attachment so we can easily determine within the file system who the file belongs to.  We can't use the sender address, as there could be many different senders that don't have the vendor name in the email address, etc....  I thought adding the Category was the simplest since I could apply that at the Outlook rule level.

 

The only way I could really think of otherwise is to have separate flows looking at every single sub-folder and then statically adding the vendor name as part of the filename changes.  This isn't really scalable solution as there could be 100s of these to manage and maintain.


Curious to see if anyone had any ideas or have run up against something similar to this in the past.  It's too bad the Outlook rule couldn't append the name of the Rule into the subject or something similar so each email got "tagged" with the respective value.

 

Thanks in advance for any help.

Categories:
I have the same question (0)
  • Verified answer
    v-xiaochen-msft Profile Picture
    on at

    Hi @cmsciggs ,

     

    Here is the method to get the mail category.

    vxiaochenmsft_0-1673937690894.png

    https://graph.microsoft.com/v1.0/me/messages/@{triggerOutputs()?['body/id']}

    vxiaochenmsft_1-1673937727152.png

    vxiaochenmsft_2-1673937762207.png

     

    Best Regards,

    Wearsky

  • VictorIvanidze Profile Picture
    13,073 on at

    Hi @cmsciggs,

     

    it looks like you have to assign category after receiving a message.  Have a look at this: https://ivasoft.com/assigncatflow.shtml

    Instead of the "Invoke an HTTP request" action use the non-premium "Send an HTTP request" one.

  • VictorIvanidze Profile Picture
    13,073 on at

    Hi @cmsciggs.

    how's going on? 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard