cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
brainpow3r
Level: Powered On

non-ASCII characters in file content

Hello all,

 

I've recently stumbled across, in my opinion, a difficult problem. I'm currently working on an automated flow, which gets an attachment(s) from received email. It then checks whether it's an archive, containing .xls(x) file or simply an .xls(x) file. If it's an archive, then it extracts it in a temporary folder and copies extracted file to a shared network drive. Otherwise it instantly saves the .xls(x) file to a shared network drive.

The problem is, that in some cases the content of these .xls(x) files might contain non-ASCII characters, so I need to check if they exist and if they do, replace them with ASCII characters. I don't have much experience with Flows and so far I haven't found any solution to this problem. The only thing I came up with is to write a custom controller that connects to my own API, which handles all the editing, but I don't know if such scenario is possible using Flows.

All kind of help is appreciated regarding the question!

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: non-ASCII characters in file content

Hi,

 

What's the process for removing the ASCII characters? Flow can read excel file rows. Flow have Replace expression function. Flow can get attachments from email and save to a specified directory (Onedrive, SharePoint, etc). Are you getting collection of files in zip format? Then there is a flow step called One drive - extract folder. Please see this post.

https://flow.microsoft.com/en-us/blog/auto-unarchive-files/

 

Not sure what's your logic in API is going to be? If it's too much string manipulation then custom API is the right way to go otherwise you end up having a long flow solution if possible. 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!



View solution in original post

4 REPLIES 4
Super User
Super User

Re: non-ASCII characters in file content

Hi @brainpow3r 

 

You can call API's via HTTP flow actions. You can then pass the parameters and get the output back as a response. Flow trigger can be either scheduled or when a file is created in onedrive or SharePoint. Also Flow can connect on-premise via gateways.



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!



brainpow3r
Level: Powered On

Re: non-ASCII characters in file content

Hi @abm ,

 

Thank you very much for your reply. Yeah, I've read in the documentation, that I can call API's via HTTP, but the thing I want to know is if writing my own API and accessing it via HTTP is the best solution for this problem. Maybe there are any connectors that would be of use to me in this scenario?

Also I want to intagrate this part to my current flow and not create a different one (the process is now Extract file -> Save to Network Drive, but what I have in mind is Extract File --> Fix non-ASCII characters --> Save to Network Drive).

Super User
Super User

Re: non-ASCII characters in file content

Hi,

 

What's the process for removing the ASCII characters? Flow can read excel file rows. Flow have Replace expression function. Flow can get attachments from email and save to a specified directory (Onedrive, SharePoint, etc). Are you getting collection of files in zip format? Then there is a flow step called One drive - extract folder. Please see this post.

https://flow.microsoft.com/en-us/blog/auto-unarchive-files/

 

Not sure what's your logic in API is going to be? If it's too much string manipulation then custom API is the right way to go otherwise you end up having a long flow solution if possible. 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!



View solution in original post

brainpow3r
Level: Powered On

Re: non-ASCII characters in file content

Usually only one archived file is received as attachment, but sometimes there can be a couple of them in one archive. Nevertheless, I've already implemented file extraction and saving in Flows and it is working as expected. The main problem I'm facing now is content manipulation.

So far we did not think about our API logic in-depth, because first we want to know what solution is the optimal one. But from your answers and a couple of hours reading documentation I came to conclusion that a custom API and Connector for us is the answer, since there will be a significant amount of string manipulations involved. 

Thank you for your help @abm

Helpful resources

Announcements
firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors
Users online (5,490)