File emailed documents and log what they say
Files every document that arrives by email into Box and records what it says as a row on your register.
Apps it connects
Authenticate each one once and the workflow is ready to run.
What it does
Each integration step this workflow runs, in order, what it is for, and the conditions and loops that decide when it runs.
- 1
GmailNew email triggerWakes the workflow when a new email arrives in Gmail, optionally only from a sender you name on the trigger. - 2
GmailList emailsLists up to 25 inbox messages matching your search that have attachments and do not yet carry the register label. For each
message- 3
GmailFind emailChecks that each message is still the sender's newest in the inbox, since only that one's attachments can be opened. - 4
GmailDownload attachmentsDownloads the attachments from the sender's latest message, keeping only PDFs as documents to file. For each
attachment- 5
BoxUpload fileUploads each PDF into your Box folder under its original file name and keeps the link for the register.
- 6
Google SheetsAppend rowAppends one register row per document: filed time, sender, subject, file name, Box link, read status and each extracted field.
- 5
If
messageFailuresis at most 0 andcappedOutis not true- 7
GmailAdd label to messageApplies your register label to the message once every document on it is filed and logged, so it is never handled twice.
- 7
- 3
How it works
What happens on each run, in plain English.
Whenever new mail arrives in Gmail, the workflow sweeps your inbox for messages matching a search you describe, copies the PDF attachments on each into a Box folder and adds one row per document to a register in Google Sheets. The row records when it was filed, the sender, the subject, the file name, a link to the filed copy and whether it could be read, followed by details read from the document itself, such as a supplier, document number, date and total.
A field the document does not carry is left empty rather than guessed, and a document that cannot be read is still filed and still gets a row saying so. A message is labelled as registered only once every document on it is copied and logged, so a failed upload leaves the mail for the next run rather than losing a document quietly. Only PDF attachments count, so a signature logo never becomes a row.
You need a Box folder to file into and a spreadsheet tab whose column headings match that row.
Start from a workflow that already works.
Add "File emailed documents and log what they say" to your workspace, connect its apps, and make it yours. No credit card required.
Free plan available · No credit card required
