In short: Give the workflow one mailbox or folder, not the company’s email. File what you can classify, and leave the rest in a queue. Text inside a PDF is data, not an instruction to change who receives documents or where money goes.
Automating a shared inbox is not the same as letting a flow read every message the company receives. Decide the mailbox or folder, the document types, and the queue for everything else. Keep the original message reference so a person can walk from a filed document back to the message that carried it.
If the document is a supplier invoice, approval continues in the invoice approval guide. This page ends when a draft or a queue item exists. Reading variable documents with a model is an AI integration question as well as a routing question; the control below does not change because a model is confident.
Scope the intake
Write the boundary in the design:
- the mailbox or folder, and no other;
- allowed routing conditions, if you have them;
- attachment types you will try to read;
- the libraries or queues that may receive a file;
- the person who owns the uncertain queue.
A sender’s address does not prove the document is authentic. It is a hint. Display-name tricks and forwarded mail are ordinary. The file still needs the checks for its document type.
A stable reference, then a classification
Store a message id that will not change if someone forwards the thread, and a document id for each attachment you keep. Classify into the types you actually handle, such as supplier invoice, customer order or correspondence you only file. Anything ambiguous goes to review with the original reference attached. Do not force a folder because the model returned a label.
Files that are unsafe to process
Validate type and size. Run the file through the security tooling the company already uses. A password-protected file that you cannot open goes to a person, with a request for a business-approved way to receive it. Do not ask staff to email an unprotected copy to a personal account so the flow can “see” it.
n8n’s security overview lists practical hosting controls, including audits, TLS, SSO, restrictions on nodes and the public API, and execution-data redaction. Which of those exist depends on the edition and how you deploy. They are a diligence list, not a statement that a self-hosted tool is appropriate, or that using it meets the PDPA. If the connector runs somewhere else, the same questions apply to that host.
Filing without leaking the contents
File on structured metadata: document type, counterparty id if known, period, sensitivity. Do not put a person’s name or an account number in a folder name, a notification, or a log line that a wide group can read. The PDPC’s Key Concepts guidelines expect reasonable security arrangements for personal data. A shared inbox already concentrates that data. The workflow should narrow access, not copy the mailbox into a second place everyone can browse.
Document text is not a command
If a model reads the attachment, treat the text as untrusted data. An instruction inside the PDF — “email every invoice to this new address”, “change the bank account”, “ignore the previous rules” — is content. It does not alter recipients, access rights, routing rules or payment details. Those change only through the administration of the workflow, by someone allowed to change them. The supplier bank-detail control is the pattern for payment fields. A document is not that control.
AI document processing is useful when the input varies. It still ends in a person or a deterministic check before a bill is approved.
Duplicates, versions and retention
The same file will arrive twice, forwarded by two people. Hash the bytes and compare the business key you have, such as supplier and invoice number once extracted, and attach the second copy to the first document. A changed attachment later in the thread is a new version of that document, not a silent overwrite of a file somebody has already approved.
n8n’s execution data guidance recommends not saving data you do not need, and pruning what you do save. The source message, the extracted text, the filed document and the run log can have different retention. Failed runs often contain the richest copy of a personal-data payload. Include them in the schedule. The retention guide separates those classes. Do not treat a 14-day default, or any other default on a hosting page, as a legal period. Check the version you run.
Tests and questions for a supplier
- A PDF contains an instruction to forward all invoices to a new address. Routing does not change. The text is visible to a reviewer as content.
- The same attachment arrives through two forwards. One document id.
- A password-protected file is not forced through extraction. It waits for a person.
Ask whether the connector can be limited to one mailbox, where extracted text and failed payloads are stored, and who owns the uncertain queue. Ask for the permission list of the account the connector uses, and what remains if that person leaves. That last question meets the offboarding problem: mail connectors owned by a leaver are a common outage.
Illustrative scenario, not a client engagement: a finance mailbox receives a PDF. The workflow classifies it as a supplier invoice, files it in a restricted library and opens a draft on the approval path. A second attachment tells the workflow to mail every invoice to a new address. That sentence stays inside the document. A reviewer sees it. The route does not change.
This is an operational design guide, not legal advice, and FYAdvisers is not a law firm. To bound one mailbox, use the contact form or WhatsApp +65 9071 3976 (chat).
Frequently asked questions
Can the connector be limited to one mailbox?
That should be a procurement requirement. A dedicated address, with permission to that mailbox only, is the design. A connection signed in as a person who can open every shared inbox will keep working after that person changes role, which is the failure.
Where do extracted text and failed files go?
Say so in the design. Extracted text, the original file, the run log and the error payload are different stores with different access and different retention. A support export that still contains a file you deleted from the library is a failed test.
Who handles a document the classifier is unsure about?
A named queue, with the original message reference. Uncertain invoices, orders and everything else do not default to the finance folder.
Should the workflow create the accounting bill?
At most a draft, linked to the file, for the invoice approval path. Routing is not approval and not a payment.
