I am new to RPA and UIPath and have completed the foundation academy training (just). As a test project, I would like to be able to email myself receipts and have UIPath, save those receipts into a folder on my computer (which I have managed to complete).
The next part would be to OCR scan the receipt and save the output as a text file with the same name as of the image file. This is what I am struggling with.
How do I OCR scan an email attachment, as part of the “If, Then” statement…
Follow these steps once you are done with saving all the attachments (receipts).
- Loop thru the folder containing receipts (DirectoryInfo.GetFiles(“directory_path”) - list of files)
- Read the file name into a variable (ignoring the extension of file)
- Open the receipt (use open process activity)
- Get OCR Text into a string variable
- Write Text file activity to save the ocr text with the name extracted
Thanks for the quick reply. Is there no way of doing this in its current mail attachment save loop?
The reason I ask, is that It would be inefficient to have it OCR scan the whole folder structure each time. If you can nest IF/Then loops, then I guess we could limit only to the folder the receipts have been added to.
I thought the folder contains the receipts from that session only.
After Save Attachments Activity, add the following steps -
Open the same attachment (using open process activity)
Get OCR Text (Get OCR Text Activity)
Save the text to file with the attachment name (Write Text File Activity)
I am unable to find “Open Process” activity
Actually I mean Start Process -