Hello everyone,
I’m currently working on an n8n workflow that integrates Google Drive and an AI agent (ChatGPT model).
The goal is to automatically identify the type of a document (e.g., invoice, contract, CV, etc.) — this part is already working well thanks to the AI.
The next step is to automatically classify these documents into about twenty specific folders on Google Drive based on their identified type.
Problem:
I’m facing the following issue: how can I efficiently associate each document type with its corresponding Google Drive folder without using a cascade of “IF” blocks, which quickly becomes unmanageable and hard to maintain?
Question:
What structure or approach would you recommend to make this step clean, maintainable, and scalable?
Are there any best practices in n8n for this kind of “mapping” or classification task?
Thank you very much for your suggestions!