Hi,
Here is my first success, but it took some customizing.
Overview of the process:
- Upload a picture of an invoice to a specific folder in Google Drive.
- Trigger the workflow.
- Read the specific folder in Google Drive to check for new files.
- If there are files, analyze them using the model google/gemini-flash-1.5-8b on Openrouter.ai.
- Parse the data into JSON format.
- Take the JSON data and dynamically place it in the appropriate sheet based on the month of the invoice.
- Move the file from the initial folder and classify it into the correct folder (month of the invoice).
- Create a second backup of the invoice in case we accidentally delete it.
Here is the workflow :
I will revise the post based on the feedback received. If appropriate, I will include the code for my node, although I am uncertain if this is the correct venue as I am not a developer here.
I encountered some challenges with the existing node, which led me to implement several features:
- Retrieving a file from a specified folder in Google Drive
- Integrating OpenRouter.ai API ( enabling me to use gemini-flash-1.5-8b but i can change on demand between all provider quickly )
- Inserting a header in a Google Sheet dynamically based on the month
- Transferring the file to a dynamic folder within Google Drive.
An amusing discovery I made while constructing the workflow was that the openrouter node kept reporting a nonexistent file. This issue arose because the node I had customized to retrieve files from a specific folder was also detecting files that had been deleted (and were in the trash), so I had to permanently delete the trash files in my Google Drive to resolve the problem.