This project provides a Power Automate Desktop flow that helps you standardize the PDF filename your banking and credit card eStatements. You can specify a folder location and a glob pattern to find the files you want to rename. The desktop flow will extract the statement type and date from the PDF text. Finally, it will use them to create a new file name in the format of yyyy-MM_label.pdf
, where yyyy
is the year, MM
is the month, and label
represents the account or statement type.
Screenshots:
Before | After |
To set up the desktop flow, follow these steps:
-
Create a new flow in Power Automate Desktop.
-
Copy the code in
Main.robin
to your clipboard, and paste it to the Main subflow in your flow designer workspace. -
For each of the remaining scripts, add a new subflow by selecting the subflows tab, clicking +, and entering the script name as the subflow name. Then, copy and paste the script to the subflow.
-
Edit the Create new data table action at the beginning of the Main subflow, and add a new row for each bank/credit card account that you want to process. Fill in the values of
Label
,AccountNumber
andDateRegEx
columns for each row.Column name Description Label
Enter a string that will use in the new file name to represent the account or statement type AccountNumber
Enter an account number that matches the one printed in the PDF file DateRegEx
Enter a regular expression pattern to parse the statement date from the PDF text -
Modify the values of
DefaultFolder
andGlobPattern
variables to suit your needs. -
Save the flow by selecting File in the flow designer’s menu bar and then choosing Save. You can also use the keyboard shortcut Ctrl + S.
-
Run the flow to test that it works as expected by selecting Run.
To use the desktop flow, follow these steps:
-
Open your Power Automate Desktop console and select the flow.
-
Click the Run button either on the command bar or next to the selected flow.
-
Choose the folder where the files you want to rename are located.
-
Verify the glob pattern that is used to filter the target PDF files.
The scripts in this project are generated by copying and pasting the actions of desktop flows from Power Automate Desktop. They use Robin, a special programming language for Robotic Process Automation (RPA). You can find more information about Robin language at the official GitHub repository.
The project is licensed under the GPL v3 license. See the License file for details.