Describe the problem/error/question
Hello everyone,
I am building a small business focused on AI automation services for small businesses in France.
I currently have a working n8n workflow connected to Gmail and Claude. The workflow is intended to:
- retrieve unread Gmail messages;
- filter out automated reports and unwanted messages;
- normalize each email into a canonical JSON structure;
- send the email content to Claude for triage and response preparation;
- create a Gmail draft;
- add a fixed client signature outside the LLM;
- mark the message as read only after successful processing;
- send a summary report after each scheduled run.
The workflow is self-hosted locally with Docker and is currently being redesigned from a personal prototype into a repeatable product for an initial maximum of 3–5 client companies.
Current architecture
Each client would have a configuration file containing settings such as: - client name and timezone;
- language and tone;
- text and HTML signatures;
- business rules;
- Anthropic model and token budget;
- reporting recipients;
- attachment limits;
- optional Drive storage;
- optional monitoring features.
I also use a capabilities file to enable or disable modules such as: - attachment content reading;
- OCR;
- Google Drive storage;
- monitoring and alerts.
The workflow currently includes: - reading config.json;
- reading capabilities.json;
- merging and validating both files;
- Gmail message retrieval;
- email normalization;
- LLM payload construction;
- Anthropic API call;
- response parsing;
- Gmail draft creation;
- message status update;
- execution reporting.
My main concern
I am not trying to scale to hundreds of customers yet. My goal is to create a safe, maintainable and reproducible setup for only 3–5 first clients.
I would appreciate feedback on the following architecture choices.
- Client isolation
For 3–5 customers, which approach would you recommend?
A. One separate n8n instance per client
B. One shared n8n instance with one workflow per client
C. One shared workflow using client-specific configuration
D. Another architecture
My priority is to prevent any possibility of mixing:
- Gmail credentials;
- email content;
- signatures;
- business rules;
- reporting recipients;
- Google Drive folders;
- logs.
- Credentials and secrets
What is the recommended way to manage:
- Gmail OAuth credentials;
- Anthropic API keys;
- webhook URLs;
- client-specific secrets;
- exported workflow files?
Should each client own their Anthropic account and API key, or is it reasonable for the service provider to use one account and track usage per client?
- Development, testing and production
Would you recommend separate n8n environments for:
- development;
- testing;
- production?
What is the simplest reliable version-control process for n8n workflows?
At the moment, I manually export workflow JSON files. I would like to avoid accidentally modifying the only stable version.
- Error handling and idempotency
What would be the safest design to avoid:
- processing the same email twice;
- creating duplicate drafts;
- marking an email as read before the draft is created;
- losing an email if the LLM API fails;
- running two scheduled executions at the same time?
I am considering a client-specific lock with an expiration time, plus storing processed Gmail message IDs.
- Monitoring
What minimum monitoring would you consider necessary before onboarding the first client?
I plan to monitor:
- workflow execution failures;
- consecutive errors;
- missing scheduled executions;
- Gmail authentication failures;
- Anthropic errors and rate limits;
- token usage;
- recovery after an incident.
Would n8n Error Workflows be sufficient initially, or should I add an external monitoring tool from the beginning?
- Attachments
Attachments are not yet fully enabled.
I am considering:
- MIME type allowlists;
- maximum file size;
- maximum files per email;
- OCR as an optional capability;
- not marking the email as read if an attachment could not be processed.
Are there common n8n design patterns for safely handling attachments without keeping sensitive files in execution data or logs?
- Execution data and privacy
Because this workflow processes business emails, I want to minimize sensitive data stored in n8n.
What settings or practices do you recommend regarding:
- successful execution retention;
- failed execution retention;
- binary data storage;
- pruning;
- logging;
- workflow data saved in the database?
- Maintainability
I am still learning n8n, JavaScript, Docker and API architecture.
Which parts of this system would you strongly recommend having reviewed by an experienced n8n or DevOps engineer before using it with paying clients?
My current thinking
My current preference is:
- one isolated environment or instance per client at first;
- draft creation only, without automatic sending;
- client-specific Gmail and Anthropic credentials;
- strict configuration validation;
- minimal execution retention;
- daily backups;
- an Error Workflow and external uptime monitoring;
- a maximum of 3–5 clients until the installation process is stable.
Does this sound reasonable, or is it unnecessarily complex for the first few customers?
I am especially interested in feedback from people who have operated self-hosted n8n workflows for multiple businesses.
Thank you for any advice, architecture criticism or lessons learned.
What is the error message (if any)?
Please share your workflow
(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)
Share the output returned by the last node
Information on your n8n setup
- n8n version:
- Database (default: SQLite):
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
- Operating system: