Skip to content

Email Invoice Processor

FieldValue
Nameemail-invoice-processor
Categoryautomation
Complexitymoderate
Tagsgmail-api, pdf-processing, llm-extraction, invoice-management, postgres-state, s3-storage
Authorrandybias
Min Version0.1.0

Poll Gmail for invoice emails, extract structured data from PDF attachments with AI, validate totals, and store results. Searches for emails matching a configurable query, stores original attachments in S3, uses Claude to extract invoice fields, validates the extracted totals, and persists records to Postgres.

poll-email → store-originals → extract-fields → validate-totals → store-and-notify
NodePurpose
poll-emailPoll Gmail for invoice emails matching the configured query
store-originalsStore original PDF attachments in S3
extract-fieldsAI-powered extraction of invoice fields from PDFs
validate-totalsValidate extracted line items against totals
store-and-notifyPersist records to Postgres and notify via Slack
  • manual
  • cron — every 10 minutes (*/10 * * * *)
ServiceTypeRequired
Gmail APIExternalYes
Anthropic APIExternalYes
Slack webhookExternalYes
tentacular-postgresExoskeletonYes
tentacular-rustfsExoskeletonYes
KeyDefaultDescription
timeout120sPer-node timeout
retries1Retry count per node
gmail_querylabel:invoices has:attachmentGmail search query for invoice emails
checkpoint_tableemail_invoice_checkpointsPostgres table for sync checkpoints
  • google.access_token — Google API access token for Gmail
  • anthropic.api_key — Claude API key for field extraction
  • slack.webhook_url — Slack webhook for notifications
Terminal window
tntc scaffold init email-invoice-processor
tntc scaffold init email-invoice-processor my-custom-name
tntc scaffold info email-invoice-processor

Scaffold source: quickstarts/email-invoice-processor/