Watch for new PDF file in Google Drive folder, read contents of PDF to rename file of particular nomenclature, and to know which existing folder to move file to

Hi community, I searched and have not found info for my following goal:

  1. I put a new file into a specific folder on Google Drive (I would do this manually, as there are other posts on how to pull files from Gmail). – “Watch” module
  2. Read the contents of the PDF to know how to rename the file:
    e.g. online_transfer-name of beneficiary-20231219 – where the numbers are four digit year, two digit month and date.
  3. Read the contents of the PDF to know where to move the renamed PDF file to which existing folder.
    e.g. reads that the bank account number of the sender account is 123775, move the file to an existing folder where the bank transfer files for accoutn 123775 are stored.

I am a new user, so specific advice on which modules and how to program each module step would be greatly appreciated!
If the exact result cannot be achieved, suggested alternatives or workarounds would be great as well.
Thank you!

May peace be upon you @aglee02

Some quick questions.

  1. Is date the only dynamic part of the file name or does the whole file name get’s changed depending upon the PDF.
  2. Does the content of the PDF always come in a specific structure?
2 Likes

@Automate_with_Rezwan thanks for your reply!

  1. The parts that would change are:
    -the name of the beneficiary (can read from inside the PDF)
    -as well as the date of the transation (can read from inside the PDF, or the date that the file was created).
  2. The content of the PDF would vary by the bank that outputs the file,
    -but using the account number, we could use that to identify which existing folder to move the file to.

@aglee02 You can use the PDF.co " Parse a doc " Module to parse the document and from that either use the built-in extractor to extract the information or use the Text Parser " Match pattern " module to create a Regex pattern for extracting the specific data.

You can then use the extracted data to rename and move it to different folders.

If you need further help, feel free to contact

1 Like