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 / Get Original Email fro...
Power Automate
Unanswered

Get Original Email from Fowarded using Sharepoint List lookup Create Folder/File

(0) ShareShare
ReportReport
Posted on by 20

Hi,

 

I've created a workflow that gets the original email sender from a forwarded shared mailbox and then saves the attachment by looking up a list in Sharepoint for the user/folder references. The issue is that the workflow looks successful, but the CreateFolder/CreateFile are greyed out and I can't seem to see where it's failing. Any thoughts are appreciated.

 

stvn43_0-1668704546781.png

This is the first segment that extracts the original sender email. The condition is just a 'Sent' > 'From', which passes 'true' for a forwarded email.

stvn43_0-1668705553472.jpeg

 

This is the second branch that uses the Sharepoint list to lookup the original email, compare it and get the Folder to know where to save the attachment. This is accounting so it uses the CurrentYear/CurrentMonth functions for the initial creation of the folders.

I have a slight variation on this that is just for inbound emails on the shared mailbox that works well.

 

The only change from the original is that I'm now having to get the original email from the forwarded one. Yet, it runs and doesn't save the attachment and moreover, I can't see anything in these last to steps as they're greyed out.

Any suggestions welcome -- thx!

 

Sorry -- a more detailed view:

 

stvn43_1-1668706747247.jpegstvn43_2-1668706788542.png

 

stvn43_4-1668706847202.jpeg

 

 

Categories:
I have the same question (0)
  • Verified answer
    annetoal Profile Picture
    1,934 Moderator on at

    Nothing satisfied your filter query in Get items. Re-check your filter query to make sure it's doing what you want. You have a comparison between the query and a variable. Maybe the variable is at fault.

  • Verified answer
    stvn43 Profile Picture
    20 on at

    Correct -- annetoal -- thx!

     

    I modified this section so it pulls the email accurately and updates the variable appropriately for the Sharepoint list match. 

     

    trim(substring(body('EmailBodyToText')
    ,add(indexOf(body('EmailBodyToText'),'From: '),6)
    ,sub(indexOf(body('EmailBodyToText'),'Sent:')
    ,add(indexOf(body('EmailBodyToText'),'From:'),6)
    )))


    trim(substring(last(split(outputs('ExtractEmail'),'<'))
    ,0
    ,sub(length(last(split(outputs('ExtractEmail'),'<'))),1)
    ))

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

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard