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.
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.
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:
Solved! Go to Solution.
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.
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)
))
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.
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)
))