Email Integration

How email processing works

Every Tavnit flow can have its own inbox address. When you enable the email trigger and send a document to that address, Tavnit takes each supported attachment, creates a separate extraction run for it, and processes it exactly as if you had uploaded it in the app.

Nothing is installed and nothing polls your mailbox — you forward mail to the address and Tavnit reacts. That makes it the shortest path from “invoices arrive by email” to “invoices arrive as structured rows”, with no code involved.

  • Forwarding invoices or receipts straight from your inbox
  • A shared accounts-payable mailbox with an auto-forward rule
  • Letting suppliers send documents in without giving them a Tavnit login
  • Getting documents processed by people who never open the app

Turn on the email trigger

The trigger is off by default. Turn it on from the flow's detail page, copy the address it gives you, and send one document as a test before you point a forwarding rule at it.

  1. 1Go to Flows and open the flow you want to receive documents.
  2. 2Find the Email Trigger section and switch it on.
  3. 3Copy the flow's email address.
  4. 4Send one PDF to it and check the Runs page — a new run appears with the source Email.
  5. 5Once that works, add the forwarding rule in your mail client or shared inbox.
One run per attachment

An email with three invoices attached produces three separate runs, each with its own result, its own credit charge and its own row in the Runs list. It does not produce one run containing three documents.

If the trigger is switched off, mail sent to the address is accepted and discarded — the sender gets no bounce and no error. If documents seem to vanish, check the toggle first.

Flows, Collections and Splitters each get an address

The email trigger is not limited to flows. Collections and Splitters have their own inbox addresses too, which lets you point one address at a whole sorting stage instead of a single document type.

Copy the exact address from the object's detail page; the shapes above are only there to help you tell them apart.
Send toAddress shapeWhat happens
A flowflow-name-<id>@mg.tavnit.ioEach attachment is extracted by that flow.
A Collectionname-<id>-collection@mg.tavnit.ioEach attachment is classified and routed to the right flow — see how Collections route documents.
A Splittername-<id>-splitter@mg.tavnit.ioEach attachment is broken into its separate documents first — see splitting multi-document PDFs.
Which address should suppliers use?

If a sender only ever sends one document type, give them the flow address. If they send a mix — invoices, purchase orders, delivery notes — give them the Collection address and let Tavnit sort it. If they send one PDF containing several documents, give them the Splitter address.

What Tavnit accepts

Tavnit reads PDF and common image attachments. Anything else in the message is ignored without failing the rest — one unsupported file does not stop the other attachments from being processed.

AcceptedExtensions
PDF documents.pdf
Images.png .jpg .jpeg .tif .tiff .webp .bmp .gif

An attachment is skipped rather than processed when any of these is true:

Reason skippedWhat it looks like
Unsupported file typeOffice documents, archives, .eml forwards and signature images all fall in here.
Empty attachmentA zero-byte file, usually a broken forward.
Unreadable fileThe file has a valid extension but cannot be opened as a document — a truncated download or a renamed file.
The subject and body are never read

Only attachments are processed. Notes in the message body, reference numbers in the subject line and inline images in the signature are all ignored. If a value matters, it has to be in the document.

Your mail provider's attachment size limit applies before Tavnit ever sees the message. If a large scan bounces at the sending end, upload it in the app or post it to the REST API instead.

Email the results back out

Email Output is the return leg: when a run finishes successfully, Tavnit emails the result to the addresses you configure. It is independent of the email trigger — you can use either on its own, or both to make a full send-in, get-back-out loop.

  1. 1Open the flow's detail page.
  2. 2Find the Email Output section.
  3. 3Add one or more recipient addresses.
  4. 4Choose what each message carries under Attachments, then save.
OptionWhat arrives
JSON extractionThe extracted result as formatted JSON in the message body.
CSV extractionThe rows as a rows.csv attachment — the fastest way to get results into a spreadsheet.
Original documentThe source PDF or image that was processed, attached alongside the results.
Form resultsThe filled PDF, when the flow fills a form template.
File fields arrive as links

Fields that hold a file or an image are not embedded in the JSON. They come through as time-limited links, because Tavnit keeps stored documents private — a raw storage path would not be fetchable from an inbox.

  • Output email only fires on runs that complete successfully. A failed run sends nothing.
  • The subject line carries the flow name plus a per-run detail, so mail clients do not collapse every run of a flow into one thread.
  • If the flow has human review enabled, the email waits until a reviewer approves the run.
  • For machine-to-machine delivery, a webhook is a better fit than email.

Worked example: an accounts-payable inbox

The common setup is a shared mailbox that already receives supplier invoices, forwarded into a Collection so each supplier's format lands in the right flow, with results emailed to the finance team and pushed into a Bucket.

  1. 1Build one flow per document type you receive — for example Supplier Invoices and Delivery Notes — and give each a clear description.
  2. 2Put both flows in a Collection and enable the Collection's email trigger.
  3. 3In the shared mailbox, forward any message with an attachment from your supplier domains to the Collection address.
  4. 4On each flow, turn on Email Output with the CSV attachment for the finance team, and add a Bucket export so the data accumulates in one table.
  5. 5Add a Cleaner with a conditional action that sends anything over your approval threshold to human review before it is delivered.

Nobody in finance has to open Tavnit. Invoices arrive where they always did, and the structured data comes back to the same inbox.

Troubleshooting

Because inbound mail is accepted silently, a document that does not turn up leaves no error in your inbox. Work down this list — the cause is almost always the trigger toggle, the attachment type, or a forwarding rule that strips attachments.

SymptomLikely causeFix
No run appears at allThe email trigger is off, or the address belongs to a different flow.Re-check the toggle and copy the address again from the flow's detail page.
Some attachments processed, others notThe missing ones are an unsupported type, empty, or unreadable.Check the extensions against the accepted list above.
Only the signature image was processedThe real document was not attached — it was linked, or the forward dropped it.Forward as an attachment rather than inline, and check the rule preserves attachments.
Runs appear but failThe document itself is the problem, not the email path.Open the run and read its log; the failure is an extraction issue.
Results never arrive by emailEmail Output is unset, the run failed, or it is waiting for review.Check the run's status first, then the Email Output configuration.