Getting Started
Welcome to Tavnit
Tavnit helps you automatically extract data from documents like invoices, receipts, and forms. Instead of manually typing information from each document, Tavnit reads them for you and organizes the data in a structured way.
This guide will walk you through creating your first flow and processing documents.
Step 1: Create a Flow
A "flow" is like a template that tells Tavnit what information to look for in your documents. For example, an invoice flow might look for invoice numbers, dates, and line items.
- Click the "New Flow" button on the Flows page
- Enter a name for your flow (e.g., "Invoice Processing")
- Select the type of document you'll be processing
- Review and customize the fields Tavnit discovered
- Click "Activate" to make your flow ready to use
Step 2: Understanding Fields
When you upload sample documents, Tavnit uses AI to discover what information can be extracted. There are two types of fields:
Single values that appear once per document, like invoice number, date, or vendor name.
Repeating data like line items on an invoice, each with columns like description, quantity, and price.
You can add, remove, or rename fields to match exactly what you need.
Step 3: Process Documents
Once your flow is active, you can process documents in several ways:
Go to the Runs page, select your flow, and upload documents directly through the web interface.
Send documents as email attachments to your flow's unique email address. See the Email Integration tab for details.
Send documents programmatically from your own applications or automation tools. See the API Integration tab for details.
After processing, you'll see the extracted data on the run details page. You can also export results or receive them via webhook.
Email Integration
Process Documents via Email
Tavnit allows you to process documents simply by sending them as email attachments. Each flow has a unique email address that you can send documents to.
This is perfect for:
- Forwarding invoices or receipts from your inbox
- Setting up email forwarding rules for automatic processing
- Processing documents without logging into Tavnit
Enable Email Trigger
To start receiving documents via email, you need to enable the Email Trigger for your flow:
- Go to the Flows page and select your flow
- Open the flow's details page
- Find the "Email Trigger" section and enable it
- Copy your flow's unique email address
When you send an email with multiple attachments, Tavnit creates a separate run for each PDF or image file. This means if you attach 3 invoices, you'll get 3 separate extraction results.
Supported File Types
The Email Trigger accepts the following file types as attachments:
- PDF documents (.pdf)
- Images (.jpg, .jpeg, .png)
Other file types will be ignored. The email subject and body are not processed – only the attachments.
Email Output
You can also configure Tavnit to send extraction results to an email address automatically. This is useful when you want to receive the extracted data without checking the Tavnit dashboard.
- Go to your flow's details page
- Find the "Email Output" section
- Enter the email address where you want to receive results
- Save your changes
The extraction results are sent as JSON data in the email body. You can use this with email automation tools to parse and process the data further.
API Integration
What is an API?
An API (Application Programming Interface) is like a messenger that lets different software talk to each other. Instead of manually uploading documents through our website, you can write a small program that sends documents automatically.
This is useful if you want to:
- Process many documents at once
- Connect Tavnit to other tools you use
- Build automated workflows
Credentials
API Key
Your API key is available in the Integrations tab after signing in.
Flow ID
The Flow ID can be found on each flow's details page.
API URL
Use this URL to run flows programmatically:
Sending Documents
Tavnit accepts documents in two ways:
Send the file as binary data (classic file upload). Best when you have direct access to the file.
Send the file content as a base64 string with a filename. Useful when working with automation tools or APIs that provide files as base64.
Both methods use the same endpoint and header:
- URL: https://tavnit.io/api/runs/process
- Header: X-API-Key: YOUR_API_KEY
Code Example
Select your preferred programming language:
import requests
API_KEY = "YOUR_API_KEY"
FLOW_ID = "YOUR_FLOW_ID"
# ─────────────────────────────────────────────────────────────
# Option 1: Multipart file upload (binary)
# ─────────────────────────────────────────────────────────────
with open("document.pdf", "rb") as file:
response = requests.post(
"https://tavnit.io/api/runs/process",
headers={"X-API-Key": API_KEY},
data={
"flow_id": FLOW_ID,
"source": "api"
},
files={"file": file}
)
print(response.json())
# ─────────────────────────────────────────────────────────────
# Option 2: Base64-encoded file (JSON body)
# ─────────────────────────────────────────────────────────────
import base64
with open("document.pdf", "rb") as file:
file_base64 = base64.b64encode(file.read()).decode("utf-8")
response = requests.post(
"https://tavnit.io/api/runs/process",
headers={
"X-API-Key": API_KEY,
"Content-Type": "application/json"
},
json={
"flow_id": FLOW_ID,
"source": "api",
"filename": "document.pdf",
"file_base64": file_base64
}
)
print(response.json())
const API_KEY = "YOUR_API_KEY";
const FLOW_ID = "YOUR_FLOW_ID";
// ─────────────────────────────────────────────────────────────
// Option 1: Multipart file upload (binary)
// ─────────────────────────────────────────────────────────────
async function processDocument(file) {
const formData = new FormData();
formData.append("file", file);
formData.append("flow_id", FLOW_ID);
formData.append("source", "api");
const response = await fetch("https://tavnit.io/api/runs/process", {
method: "POST",
headers: { "X-API-Key": API_KEY },
body: formData,
});
return await response.json();
}
// ─────────────────────────────────────────────────────────────
// Option 2: Base64-encoded file (JSON body)
// ─────────────────────────────────────────────────────────────
async function processDocumentBase64(base64Content, filename) {
const response = await fetch("https://tavnit.io/api/runs/process", {
method: "POST",
headers: {
"X-API-Key": API_KEY,
"Content-Type": "application/json"
},
body: JSON.stringify({
flow_id: FLOW_ID,
source: "api",
filename: filename,
file_base64: base64Content
})
});
return await response.json();
}
Automation Tools Overview
You don't need to write code to integrate Tavnit with your workflows. No-code automation platforms let you connect apps visually and build powerful automations.
Popular no-code platforms that work with Tavnit:
Visual automation platform with 1000+ app integrations. Great for complex multi-step workflows.
Connect Tavnit to 5000+ apps with simple "Zaps". Perfect for straightforward automations.
Open-source workflow automation. Self-host or use their cloud service for full control.
All of these platforms support HTTP requests, which means they can send documents to Tavnit's API.
Make.com Integration
Make.com (formerly Integromat) is a visual automation platform that lets you connect apps and automate workflows without writing any code.
Visit Make.comGetting Started with Make.com
- Go to make.com and create a free account
- Click "Create a new scenario" from your dashboard
- You'll see a blank canvas where you can add modules
- Search for "HTTP" and add the "Make a request" module
A scenario is an automated workflow in Make.com. It consists of modules (apps) connected together. When one module triggers or receives data, it passes that data to the next module.
Configure the HTTP Module
Once you've added the HTTP module, configure it to send documents to Tavnit. You can use either of these two approaches:
Option 1: Multipart/form-data (when you have a File object)
- Add an HTTP "Make a request" module to your scenario
- Configure the request:
- URL: https://tavnit.io/api/runs/process
- Method: POST
- In the Headers tab, add:
- Header name: X-API-Key
- Header value: YOUR_API_KEY
- Set Body type to "multipart/form-data"
- Add form fields:
- flow_id: YOUR_FLOW_ID
- source: api
- file: (map from previous module)
- Run your scenario to test
Option 2: JSON + base64 (when you have a base64 string)
If your previous module outputs a base64 string instead of a file, use this approach:
- Set Body type to "Raw" and select "JSON (application/json)"
- In the Headers tab, also add:
- Header name: Content-Type
- Header value: application/json
- Set the JSON body to:
{
"flow_id": "YOUR_FLOW_ID",
"source": "api",
"filename": "document.pdf",
"file_base64": "{{previous_module.base64_content}}"
}
Replace {{previous_module.base64_content}} with the actual mapping from your previous module. In Make.com, click in the field and select the base64 output from the module that provides your file.
Webhooks
What is a Webhook?
A webhook is like a notification system. When you set a webhook URL on a flow, we'll automatically send a message to that URL whenever a document finishes processing.
Think of it like getting a text message when your pizza is ready – except instead of pizza, it's your processed document data!
Why Use Webhooks?
Webhooks are perfect for automation. For example, you could have the results:
- Automatically added to a Google Sheet or database
- Sent as a notification to Slack or Teams
- Trigger another process in Make.com or Zapier
- Update records in your CRM or accounting software
Without webhooks, you would need to keep checking if documents are done processing. With webhooks, you just sit back and let the data come to you.
How to Set Up a Webhook
- Go to the Flows page
- Click on the flow you want to configure
- Open the flow settings or details panel
- Find the "Webhook URL" field
- Enter your webhook URL (the address where you want to receive notifications)
- Save your changes
If you use Make.com, Zapier, or similar tools, they provide webhook URLs when you create a "webhook trigger". You can also create your own endpoint if you have a web server.
What Happens When a Webhook Fires
When a document finishes processing:
- Tavnit extracts the data from your document
- We send a message (HTTP POST request) to your webhook URL
- The message contains the extracted data in JSON format
- Your receiving system can then do whatever you want with the data
This all happens automatically – no manual intervention needed!