Hello everyone,
I’m building a legal automation workflow and I need help structuring two specific logic gates:
1. “Search-First” Google Drive Logic: Before creating a new folder for a client, the workflow must search for an existing folder by the client’s name in two specific parent directories (IDs: 1q_UXjaA-_N60YtoXgZdLEUWxjYo21Edi and 1dIsiCuhMpPxaNhetz-10GwLmfsaCttxo).
-
If found: Extract the
folderId. -
If NOT found: Create a new folder and get the
folderId. -
Next Step: Update/Insert a Google Sheet row with the client name and the correct
folderId.
2. Human Intervention Shield (Evolution API): To prevent the bot from “stepping on the toes” of the lawyer responding manually:
-
Identify if a message is sent by the user (
data.key.fromMe == true). -
If True: Update a Google Sheet cell with the current timestamp.
-
If False (Incoming): Check if the last human interaction was less than 30 minutes ago. If so, I want the workflow to Stop/Cancel execution immediately so the bot remains silent during a manual conversation.
My Setup:
-
n8n version: 2.13.3 (Self-hosted / Docker)
-
Database: PostgreSQL 16.4
-
Authentication: Google OAuth2
-
Trigger: Evolution API (WhatsApp Webhook)
Could anyone point me to the best nodes or expressions to handle the folder search across multiple parents and the time-based filter?
