cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

blank images sharepoint

Hello All,

 

I am having an issue where my flow is saving a blank image to a SharePoint document library.

 

I have a simple flow that monitors an Outlook Inbox and saves an email attachment (excel file) to the library if the email meets certain criteria. When I initially created the flow it was only storing the excel file correctly to the library. I receive the excel file every day and it always has the same name so I needed a way to store all files instead of them being replaced every night. In order to achieve this, I added dynamic data to the front of the file name attribute. If I add anything to the end of the file name it changes the file type and I need it to be an excel file. The flow still works after I made the change however it now stores a corresponding blank jpeg file with every file.

 

Does anyone know why this is happening and how to stop the flow from saving the jpeg?

 

Any help is much appreciated.

 

AG

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: blank images sharepoint

Hi @terpsbmore,

 

Could you please share a screenshot of your flow's configuration?

Do you want to add some dynamic content to the front of the file name of the Excel file?

 

I assume that you want to add current date to the front of the file name of the Excel file, I have made a test on my side, please take a try with the following workaround:

  • Add a "When a new email arrives" trigger, Has Attachment field and Include Attachments field are both set to Yes.
  • Add a "Apply to each" action, input parameter set to Attachments dynamic content of the trigger.
  • Within "Apply to each" action, add a "Create file" action, specify Site Address and Folder Path, File Name field set to following formula:
concat(utcNow('yyyy-MM-dd'),'_',split(item()?['Name'],'.')[0],'.',split(item()?['Name'],'.')[1])

Note: The split(item()?['Name'],'.')[0] expression returns the file name without extension name, the split(item()?['Name'],'.')[1] expression returns the file extension name (e.g. .xlsx).

 

File Content field set to Content dynamic content of the trigger.

 

Image reference:11.JPG

The flow works successfully as below:12.JPG

 

13.JPG

 14.JPG

 

 

 

Best regards,

Kris

 

Community Support Team _ Kris Dai
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
Highlighted
Community Support
Community Support

Re: blank images sharepoint

Hi @terpsbmore,

 

Could you please share a screenshot of your flow's configuration?

Do you want to add some dynamic content to the front of the file name of the Excel file?

 

I assume that you want to add current date to the front of the file name of the Excel file, I have made a test on my side, please take a try with the following workaround:

  • Add a "When a new email arrives" trigger, Has Attachment field and Include Attachments field are both set to Yes.
  • Add a "Apply to each" action, input parameter set to Attachments dynamic content of the trigger.
  • Within "Apply to each" action, add a "Create file" action, specify Site Address and Folder Path, File Name field set to following formula:
concat(utcNow('yyyy-MM-dd'),'_',split(item()?['Name'],'.')[0],'.',split(item()?['Name'],'.')[1])

Note: The split(item()?['Name'],'.')[0] expression returns the file name without extension name, the split(item()?['Name'],'.')[1] expression returns the file extension name (e.g. .xlsx).

 

File Content field set to Content dynamic content of the trigger.

 

Image reference:11.JPG

The flow works successfully as below:12.JPG

 

13.JPG

 14.JPG

 

 

 

Best regards,

Kris

 

Community Support Team _ Kris Dai
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

Highlighted
Frequent Visitor

Re: blank images sharepoint

@v-xida-msft I updated my flow and am no longer experiencing the image attachment. Though I am not sure why it happened in the first place.

 

I will try the workaround you provided because the "Received Time" dynamic content might not be the best when consuming the data via Power Query/PBI. I will let you know how it works out.

 

Thanks,

 

AG

Highlighted
Frequent Visitor

Re: blank images sharepoint

@v-xida-msft The time formatting worked great and kept the file type!

 

thank you!

Helpful resources

Announcements
secondImage

August 2020 CYST Winners!

Check out the winners of the recent 'Can You Solve These?' community challenge!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Users online (4,754)