A flow has been prepared in such a way that all the attached files through the outlook mails are saved in a specific folder of SharePoint site and it is working fine. But the size of all the saved file is becoming 4 bytes. as a result none of the files are opening.
Any email arrives.
Attachment is copied to a specific SharePoint folder.
All the files are saved with a fixed size of 4 bytes.
Please guide me with a solution.
Hi @arindamsarma ,
Of course, the <dynamic value> in my provided expression just an example, it stands for file name you can get in the flow. You can replace it with dynamic content which is file name with extension.
Best regards,
Rimmon
Can I get the dynamic value from the dynamic content directly?
Hi @arindamsarma ,
You can use split to get file extension.
concat('.',last(split(<dynamic value>,'.')))
Above expression can get '.pdf', '.docx', etc.
Best regards,
Rimmon
Yes, how to manage extension, because name of the file can be anything but the extension should be the same as the original file. Please suggest if there is any function to identify the exact extension of the original attachment file.
Hi @arindamsarma ,
You can add name manually instead of using dynamic content.
Note: Don't forget file extension.😀
——————————————————————————————————————————————————
If my previous answer helps you solve the problem, please accept it as a solution.
If you have another problem, please post it in a new post.
Best regards,
Rimmon
Could you please guide with the required modification in the flow, how can I change name of the attachment before saving it in the SharePoint.
Yes, it is done. Thank you.
Hi @arindamsarma ,
It's wired.🤔 In my test, I add a Get attachment action and use name and content from it to create file, the file can be opened. I am looking for what is the difference cause this problem. I recommend you try this first.
Best regards,
Rimmon
Thank you for your quick response. I have switched to classic designer and tested but still the problem remains same. all the file size is becoming 4 bytes and not opening the file.
Here is the screen shot.
Hi @arindamsarma ,
I recommend you switch to classic designer and test again. The file created in new designer can't open sometimes.
Best regards,
Rimmon
WarrenBelz
146,660
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,004
Most Valuable Professional