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 / Trying to reply to ema...
Power Automate
Unanswered

Trying to reply to email with attachment based on email subject and jpg name.

(0) ShareShare
ReportReport
Posted on by 31

I'm trying to create a flow that will reply to an email with an attachment based on the account number that's in the subject line and jpg attachment name.

I set up an online form submission that emails me sign requests and the account number is in the subject line of submitted emails. For example "Rene Garcia - 12345 • Beer Market". When I finish the signage design I export a jpg and name it "12345_PTR_24x36_012623". I would like to make a flow for when I export and save the jpg to my "Proof" folder on onedrive, to reply to the most recent email with that account number with the body text "Ok to print?". Is that possible? Thanks!

Categories:
I have the same question (0)
  • Rhiassuring Profile Picture
    8,690 Moderator on at

    Possible? Absolutely. 

     

    Are you able to show us what you've done so far in your flow?

  • jchestnut28 Profile Picture
    31 on at

    Well, I haven't really done much besides, starting with an existing flow I found.
    "Send specific files created in OneDrive for Business as email attachments"

    screencapture-make-powerautomate-environments-Default-4b70dcc6-016a-483b-9ad0-0bf86b5aff12-flows-new-2023-01-26-14_23_39.png

     

  • Rhiassuring Profile Picture
    8,690 Moderator on at

    I'd say that you'd want a trigger that watches your OneDrive, first of all.  Probably the "when a file is modified" and point it at the specific folder. I don't think it counts as 'created' since it'll already be created, and you're just moving it in.

     

    When it triggers, get the first 5 characters - as that should be your project #, right? 

     

    Get file content for that particular file. 

     

    Get Emails - Top: 1, Subject Filter: your project #. 


    Reply to Email - Message ID will come from your "Get Emails". It'll turn into an Apply to Each, but it'll only be 1 since you selected Top 1.  Add your File Name and File Content into those spots, from your "Get File Content" from earlier.

  • jchestnut28 Profile Picture
    31 on at

    Thank you for the response! I followed your message and I think I got it, but it failed on the get file content. Not sure how to only get the first 5 numbers.

    screencapture-make-powerautomate-environments-Default-4b70dcc6-016a-483b-9ad0-0bf86b5aff12-flows-new-2023-01-26-14_41_43.png

     

    Screenshot 2023-01-26 144451failed.jpg

     

  • Rhiassuring Profile Picture
    8,690 Moderator on at

    To get the first 5 characters, you can use a Compose action, and then use the expression 

    substring(YourFileNameOutput,0,5)
  • jchestnut28 Profile Picture
    31 on at

    Still getting stuck on the Get File Content step. Not sure why.

     

    screencapture-make-powerautomate-environments-Default-4b70dcc6-016a-483b-9ad0-0bf86b5aff12-flows-new-2023-01-26-15_14_07.png

     

    Screenshot 2023-01-26 151621.jpg

     

  • Rhiassuring Profile Picture
    8,690 Moderator on at

    "Get File Content" should point to the File Identifier, not to the File Name. 

     

    Rhiassuring_0-1674786394763.png

     

  • jchestnut28 Profile Picture
    31 on at

    Thanks for your help on this.

    I updated to the File Identifier and it ran through the flow. But It's returning a string that I can't use to search in outlook for. I left the substring text as file name but that is pulling that string instead of the file name.

    Screenshot 2023-01-27 083642.jpg

     

    screencapture-make-powerautomate-environments-Default-4b70dcc6-016a-483b-9ad0-0bf86b5aff12-flows-new-2023-01-27-08_35_05.png

     

  • jchestnut28 Profile Picture
    31 on at
    Ok, so I was able to get the account number from the jpg with this method.

    Onto the next step. I'm trying to get it to search my inbox for that email but I don't think it's finding it and replying to it.PAsteps2.jpg

     

  • Rhiassuring Profile Picture
    8,690 Moderator on at

     I know it's a dumb question but are you sure you have an email in your inbox (not in a folder) that has that project number (123456) in the subject line?

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 519 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard