IntegrationsNotion
N
Productivity

Log Invoices & Receipts to Notion Automatically — No Manual Entry

Every receipt you upload gets read and logged to your Notion database in ~3s — merchant, amount, date, and line items, all filled in for you.

Trusted by developers worldwide to automate document workflows.

Get Your Free API KeyView API Docs
Free DocuParseAPI accountNotion DBn8n/Make/Zapier or code

The guide

1
Set up your Notion database
Create a Notion database with these property types:
Vendor         — Title
Amount         — Number
Currency       — Text
Date           — Date
Invoice #      — Text
Tax            — Number
Payment Method — Text
2
Get your Notion API key
Go to developers.notion.com → New integration → copy the Internal Integration Secret. In Notion, open your database → Share → Invite → select your integration by name.
3
Get your Database ID
Copy the Database ID from your Notion database URL:
notion.so/workspace/[DATABASE-ID]?v=...
                    ^^^^^^^^^^^^^^^^
                    This is your NOTION_DATABASE_ID
Need your API key first?
20 free documents/month — no credit card
Get Free API Key →
4
Extract the document
POST your receipt or invoice to DocuParseAPI. The response gives you merchant, total, tax, date, currency, and invoice_id.
5
Write to Notion
POST to the Notion API pages endpoint with your database ID and extracted fields:
import os, requests

NOTION_HEADERS = {
    "Authorization": f"Bearer {os.environ['NOTION_API_KEY']}",
    "Notion-Version": "2022-06-28",
    "Content-Type": "application/json",
}

def log_to_notion(inv):
    properties = {
        "Vendor": {"title": [{"text": {"content": inv.get("merchant","")}}]},
        "Amount": {"number": float(inv.get("total") or 0)},
        "Tax": {"number": float(inv.get("tax") or 0)},
        "Currency": {"rich_text": [{"text": {"content": inv.get("currency","USD")}}]},
        "Invoice #": {"rich_text": [{"text": {"content": inv.get("invoice_id","")}}]},
    }
    if inv.get("date"):
        properties["Date"] = {"date": {"start": inv["date"]}}
    r = requests.post("https://api.notion.com/v1/pages",
        headers=NOTION_HEADERS,
        json={"parent": {"database_id": os.environ['NOTION_DATABASE_ID']},
              "properties": properties})
    r.raise_for_status()
    return r.json()

Full working example

python
import os, requests

DOCUPARSE_KEY = os.environ["DOCUPARSE_API_KEY"]
NOTION_TOKEN = os.environ["NOTION_API_KEY"]
NOTION_DB_ID = os.environ["NOTION_DATABASE_ID"]

NOTION_HEADERS = {
    "Authorization": f"Bearer {NOTION_TOKEN}",
    "Notion-Version": "2022-06-28",
    "Content-Type": "application/json",
}

def extract_document(path):
    with open(path, "rb") as f:
        r = requests.post("https://docuparseapi.com/api/v1/extract",
            headers={"Authorization": f"Bearer {DOCUPARSE_KEY}"},
            files={"file": f}, timeout=30)
    data = r.json()
    if not data["success"]: raise RuntimeError(data["error"]["code"])
    return data

def log_to_notion(inv):
    props = {
        "Vendor": {"title": [{"text": {"content": inv.get("merchant") or "Unknown"}}]},
        "Amount": {"number": float(inv.get("total") or 0)},
        "Tax": {"number": float(inv.get("tax") or 0)},
        "Currency": {"rich_text": [{"text": {"content": inv.get("currency","USD")}}]},
        "Invoice #": {"rich_text": [{"text": {"content": inv.get("invoice_id","")}}]},
        "Payment Method": {"rich_text": [{"text": {"content": inv.get("payment_method","")}}]},
    }
    if inv.get("date"):
        props["Date"] = {"date": {"start": inv["date"]}}
    r = requests.post("https://api.notion.com/v1/pages",
        headers=NOTION_HEADERS,
        json={"parent": {"database_id": NOTION_DB_ID}, "properties": props})
    r.raise_for_status()
    return r.json()

def process(file_path):
    inv = extract_document(file_path)
    page = log_to_notion(inv)
    print(f"Logged: {inv.get('merchant')} — {inv.get('total')} | {page['url']}")

process("receipt.pdf")

What gets extracted

merchantThe vendor or store name
totalThe final charged amount including tax
subtotalThe pre-tax amount
taxThe tax amount charged
dateInvoice or transaction date (ISO 8601)
due_datePayment due date, or null if not present
invoice_idInvoice number or receipt ID from the document
currencyISO 4217 currency code (USD, EUR, GBP, etc.)
payment_methodCard type, cash, or other payment method
line_itemsArray of items with description, quantity, unit_price, total

Common errors and fixes

MISSING_API_KEYAuthorization header missingAdd header: Authorization: Bearer YOUR_KEY
INVALID_API_KEYKey not recognisedCheck key in dashboard — regenerate if needed
LIMIT_EXCEEDEDMonthly document limit reachedUpgrade at docuparseapi.com/pricing
UNSUPPORTED_FILE_TYPEFile format not supportedUse PDF, JPG, or PNG only
FILE_TOO_LARGE_AUTHENTICATEDFile exceeds 10 MBCompress the file before sending
EXTRACTION_FAILEDDocument could not be parsedTry a cleaner scan or different file

Ready to start?

20 documents free every month. No credit card. Set up in 5 minutes.

Get Your Free API Key