Hi Make.com Community!
Goal:
Watch a Google Folder, when a new PDF (invoice) arrives. Scan the invoice for the invoice date, determine the right month of the invoice date (ChatGPT), and move the PDF to the right subfolder (Month).
Question:
Is there a better for doing this besides setting up all the Google Drive / Move a File Modules to the Subholder with the specific months? I think this should be possible with if than that but I don’t now how I can get the Folder ID of the specific month subfolders in Google Drive.
Thanks for your help!
Stefan
Hey @Stefan_Erschwendner - Your hunch is correct, there is definitely a better way to do this! If you have consistently named folders (ex. you use the month number for each month {04, 05, 06, etc.} what you could do is have OpenAI just return the month in that standard naming convention (“MM”), and then use the get folder path id with passing in that variable to resolve the folder ID.
With that folder ID, you could then use your move a file / folder module that you’re using now and pass in the ID from that module referenced above to your move module!
I used the set variable just as a placeholder for what OpenAI would return, but the same concept applies.
Let me know if you have any more questions or if I can help further!
2 Likes
Hi workflowsy,
thank you for your help. I tried that before but I’m struggeling with the Set Folder ID Module in combination with move a file.
My Google Drive Path for the PDF and folder:
My Drive / Business Invoices 2024 / Test (here are the PDFs) / [Month Folder (eg. April)]
I don’t know how I can get [Month] Folder Id as new Folder location in the Move a file Module?
@Stefan_Erschwendner What specifically are you asking ChatGPT to answer?
If ChatGPT can provide you the month and you can pass that into the get folder ID by path, you should be able to take that output and pass it into your new location by using the Map function and passing in the output of that get folder ID. Then, as long as you have a folder for each month of the year it should always be able to find the appropriate folder and file that document in that folder.
I’d be happy to get on a quick call and walk you through this / get it setup as well if that would be helpful! If so, feel free to send me a direct message!
If you are only watching new items, wouldn’t it be correct to say that the month folder you should be using is the current month?
2 Likes
Hi @samliew!
it would work for 95% of my cases, but sometimes I receive business invoices at the beginning of the month that is dated the end of the previous month.
ChatGPT is identifying the correct month of the invoice. In this case “April”. Afterward, Google Drive should move the file to the subfolder “April”.
Yes exactly! I guess what is unclear to me is what you’re currently stuck on at this point.
You should be able to take the response from ChatGPT, pass that into the find the path module, get the path ID from that, and then use that to specify where the document should move to.
If you’re stuck on any specific part of that, let me know and I’d be happy to provide additional guidance.
2 Likes