Hi!
I'm working on an automation to process multiple files from a Google Drive folder and need guidance on the best approach. Here's my complete workflow goal and current progress:
📋 Complete Workflow Goal:
- Find all files in a specific Google Drive folder (mix of .txt files and other file types)
- Extract text content from .txt files only
- Combine all text content into one block for AI analysis
- Move ALL files (including non-text files) to a different folder after processing
✅ Planned Working Steps:
- Schedule by Zapier - to trigger automation for accumulated files once a week
- Google Drive - Find Files - search for those with mime type text/plain
- Looping by Zapier - iterate through each file ID
From this part on, I’m not really sure which is the best next course of action to take:
My plan is to find a way to download each file id via Webhooks → Use Transform to combine all those texts → Run them through AI for analysis → then move all those txt files, including those non txt files into a different folder (to ensure they won’t be reprocess once again).
❓ Key Questions & Challenges:
1. File Content Aggregation:
- How do I combine all individual file contents into one text block after the loop?
- All actions seem to stay within the loop - is there a way to aggregate outside the loop?
- Should I use a different approach than looping for this use case?
2. File Type Handling:
- My folder contains both .txt files and other file types (.pdf, .docx, etc.)
- I only want to extract text from .txt files, but move ALL files afterward
- Should I filter file types within the loop or handle this differently?
3. File Movement:
- After processing, I need to move ALL original files to a "processed" folder
- Should this happen within the loop (move each file individually) or in a batch after processing?
I'm a bit confused after Working Step 3, since I think all actions seem to stay within the loop, and our goal is to combine all those files altogether... Seem to be lost for a moment here…
Any recommendation on the best workflow to follow for this? Is looping the right approach? Thanks in advance for your comments and suggestions. :)
NOTE: It’s my first time, so I’m not sure if the first one I posted was really posted at all… this might come off as a duplicate, so I apologize if it turns out that way).