cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
aggiemarine07
Regular Visitor

Save Outlook Attachment to SharePoint but rename file

I am trying to save an attachment from an outlook email to SharePoint and rename the attachment.

 

Example:

1) Receive email from SSRS@example.com with attachment named WEBTPA.XLSX

2) Create a SharePoint file to my teams SharePoint DocBox folder (path can be selected in the action)

3) Name the shared file as Inventory.XLSX on SharePoint

 

I created a template based on a similar forum thread from 2016 (https://powerusers.microsoft.com/t5/Building-Flows/Renaming-files-using-a-Flow/m-p/120410/highlight/...) but it does not work. I receive the below error when using their method.

 

InvalidTemplate. Unable to process template language expressions in action 'Create_file' inputs at line '1' and column '2790': 'The template language function 'base64ToBinary' expects its parameter to be a string. The provided value is of type 'Null'. Please see https://aka.ms/logicexpressions#base64ToBinary for usage details.'.

I have also verified that "Include Attachments" is set to "yes" on the "receive new outlook email" action.

 

Any help would be more than appreciated, thanks!

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Jay-Encodian
Community Champion
Community Champion

Hi @aggiemarine07 

After you changed the trigger action to include attachments did you perform the test again or use data from an existing run? If you used an existing run the attachment will still be missing... you need to re-run the test by re-running the trigger action.

HTH

Jay

 

 

View solution in original post

v-bacao-msft
Community Support
Community Support

 

Hi @aggiemarine07 ,

 

Please try to check the body of When a new email arrives and see if the attachment content is null in Flow run history.

I have dealt with the same problem and found that even after passing the Include Attachment check, the Attachment content is still empty in the Body.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Jay-Encodian
Community Champion
Community Champion

Hi @aggiemarine07 

After you changed the trigger action to include attachments did you perform the test again or use data from an existing run? If you used an existing run the attachment will still be missing... you need to re-run the test by re-running the trigger action.

HTH

Jay

 

 

View solution in original post

v-bacao-msft
Community Support
Community Support

 

Hi @aggiemarine07 ,

 

Please try to check the body of When a new email arrives and see if the attachment content is null in Flow run history.

I have dealt with the same problem and found that even after passing the Include Attachment check, the Attachment content is still empty in the Body.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

thank you! i tried it again this morning and it worked!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,117)