InstantDrive
Browse all pages

How do the bills@ and expenses@ inboxes work?

Short answer

Each InstantDrive company gets two addresses on its own domain: bills@ for vendor invoices and expenses@ for employee receipts. Email sent there is routed through Cloudflare to InstantDrive, and each attachment is read, named and filed like an upload. The company's domain mail must be routed first, so contact InstantDrive for setup.

Last updated:

What are the Dedicated Inboxes?

Dedicated Inboxes is the sidebar screen that lists inbound email handled by InstantDrive. When a company signs up, two addresses are recorded for its email domain: bills@ followed by the domain for vendor invoices, and expenses@ followed by the domain for employee receipts and claims. For a company on the domain examplecorp.ae these are [email protected] and [email protected].

The idea is to stop invoices and receipts from sitting in personal mailboxes. A supplier is asked to send invoices to bills@, an employee forwards a taxi or hotel receipt to expenses@, and the attachment arrives in the vault without anyone downloading and re-uploading it.

A company in InstantDrive is identified by its email domain. The first person to sign up for a domain becomes the admin, and the inbox addresses are built from that domain.

How does an email travel from the sender to your vault?

The path has five hops, and the first two happen outside InstantDrive code. Mail for the address reaches Cloudflare Email Routing. A Cloudflare Worker receives the message and posts the raw email to an InstantDrive webhook. The webhook checks a shared secret, finds the company from the recipient address and hands the email to a background job. The job runs the same reading and filing pipeline used for uploads.

Parsing and reading happen in the job, not in the web request, so a burst of emails does not slow down the app. If the job queue is not available, the same work runs inside the request instead.

StepWhat happensWhere
1The email arrives at bills@ or expenses@ on your domainCloudflare Email Routing
2A Worker forwards the raw message with the envelope sender and recipient to InstantDriveCloudflare Worker
3The webhook rejects the call unless the shared secret matches, then finds the company by the recipient domainInstantDrive backend
4The email is queued and the webhook answers at once that it was acceptedInstantDrive backend
5A background job reads each attachment, names it, files it and writes an inbox log entryInstantDrive worker

What happens to the attachments?

Every attachment on the email is treated as an upload. The system calculates a SHA-256 hash to spot duplicates inside your company, reads the text, runs the pattern engine and uses the vision fallback only when recognition confidence is below 90 percent. That fallback sends the image to Google Gemini. The file is then compressed, renamed to the pattern Prefix_Entity_Identifier_Exp or date, and stored in Cloudflare R2.

Where the file lands depends on the inbox. Attachments sent to bills@ go to the Vendors Vault. For expenses@ the normal classification decides the vault, so a receipt usually lands in Company Expenses. If the sender's address matches an employee record, the file goes to that employee's folder and is linked to an expense claim. An identity document such as an Emirates ID sent to expenses@ is placed in the Employees area under a pending folder until you resolve the employee.

For vendor documents the system also tries to match a vendor, first by the sender address, then by the sender domain, the TRN and the name. It then creates a vendor invoice record that waits for matching in Vendor Hub & Accounts Payable. A vendor record can be created if none matches, so review new vendors after the first email from a supplier.

What does the inbox log show?

Each processed email produces one log entry with the sender, the recipient, the subject, the text of the email, the number of attachments and the matched entity name. The entry links to the filed document and offers a download link that expires after 15 minutes. If an email had several attachments, every attachment is filed, but the log entry links to the last one.

In the list you can search, filter by inbox type, and link a sender to a vendor or an employee record. Linking a sender means later emails from that address are matched to that vendor or employee directly.

What gets ignored?

Some emails produce no filed document, and some produce nothing at all. The table lists the cases.

Any sender who knows the address can send to it. Treat the inbox as an intake point and check new vendors and amounts before approving payments.

CaseResult
Recipient domain does not belong to a registered companyIn production the email is acknowledged and ignored, with a note in the server log only
Email with no attachmentA log entry with the subject and text is created and no document is filed
Text or HTML body of the emailThe plain text is stored in the log entry and is not filed as a document
Webhook call without the correct secretRefused with an authorization error and nothing is stored
Attachment identical to a file already in your companyDetected by hash and not stored twice

What happens when processing fails?

There are two layers. At the edge, if InstantDrive does not accept the webhook call, the Worker rejects the email with a temporary failure message, so the sending mail server sees an error and can try again later according to its own rules. Inside InstantDrive, a failed job is retried with growing delays, starting at 15 seconds and doubling each time, for up to four retries.

After the retries are used up, the job moves to a dead-letter queue and an alert email goes to the InstantDrive operator, not to you. A staff member can replay the job once the cause is fixed. The inbox log entry for an email is written only after filing succeeds, so a failed email does not appear in your list. If an expected invoice is missing, ask the sender to confirm it was sent and contact InstantDrive.

What setup does the company domain need?

This is the caveat to read before relying on the inboxes. The addresses exist in InstantDrive as soon as you sign up, but mail only reaches them when the mail for those addresses on your own domain is routed to the Cloudflare Worker that posts to InstantDrive. That is a DNS and mail routing change on your domain, and it is not something the app can do by clicking a button.

Contact InstantDrive for setup at [email protected] before you ask suppliers to use the address. Until routing is in place, an email to bills@ on your domain goes to wherever your domain mail currently goes. The Dedicated Inboxes screen has a simulator tab that sends a test email into the pipeline directly, which lets you see the filing result without any DNS change.

What does a worked example look like?

A fictional company, Desert Harvest Foods LLC, uses the domain desertharvest.ae. After routing is set up, a supplier, Gulf Cold Chain, emails a PDF invoice to [email protected]. An employee, Hana, forwards a photo of a fuel receipt to [email protected] from her work address.

The finance manager opens Dedicated Inboxes, sees three entries, opens the invoice, checks the extracted amount against the PDF and links the sender to the vendor record so the next invoice matches without review.

EmailRecipientWhat InstantDrive does
Invoice PDF from Gulf Cold Chain[email protected]Reads the vendor, TRN, amount and VAT, files the PDF in the Vendors Vault, and creates a vendor invoice awaiting matching
Fuel receipt photo from Hana[email protected]Converts the image to WebP, files it under Hana in the Employees area and links it to an expense claim
Email with only text from a new sender[email protected]Writes a log entry and files nothing

What are the limits of the inboxes?

Reading accuracy depends on the document. A poor phone photo may be read wrongly, so check amounts and dates on anything that drives a payment. The inbox does not read the body of the email as an invoice. Only attachments are filed.

Only the two addresses per domain are described here. A company with several domains should ask InstantDrive how routing would work. Success of delivery also depends on your mail setup, since InstantDrive can see only what Cloudflare passes on.

What do the inboxes not do?

They do not pay invoices, since no bank connection exists and a recorded payment in the finance desk moves no money. They do not check that a sender is who they claim to be. They are not a general mailbox, so replies, threads and sent mail are not stored.

They do not set themselves up on your domain. The next step is to contact InstantDrive, agree the routing, send yourself a test invoice and confirm it appears in the vault.

Keep these documents in one drive

InstantDrive stores your licences, Emirates IDs, tenancy contracts and invoices, reads the numbers and dates, and names every file in one pattern.

Open the appPricing