Invoice Processor Skill
Extracts structured data from invoice emails and PDF attachments using AI. Returns vendor, amount, line items, due date, payment terms, and flags unusual invoices for human review.
How It Works
- An invoice arrives as an email (PDF attachment, inline image, or text body)
- InTouch's Email On-Demand picks it up via POP3 polling
- The sender prefixes the subject with
@invoice-processor(or the email body) - The AI assistant analyzes the invoice and extracts structured data
- A reply is sent back via email with the extracted summary and any flags
The skill also works from any of the 9 messaging channels — paste an invoice image into Slack, Teams, or WhatsApp with @invoice-processor and get the same extraction.
Setup
1. Configure Email On-Demand
In the UI: System > Server Settings > Email
- Enable Email On-Demand
- Set POP3 server, port, username, password
- Set polling interval (e.g., every 5 minutes)
2. Create a Contact Profile
In the UI: Users & Privileges > Subscribers
Create or edit a contact profile for the email address that receives invoices:
- Transport: Email (code 27)
- Inbound Enabled: Yes
- Address: The email address invoices are sent to
3. Configure AI Assistant
In the UI: System > Server Settings > AI Assistant
The AI assistant must be configured with a provider that supports document/image analysis:
- Anthropic (Claude) — recommended, native PDF/image analysis via Claude Document
- OpenAI (GPT-4o) — supports image analysis
- Ollama — if using a vision-capable local model
4. Install the Skill
The skill is pre-installed at INTOUCH_HOME/skills/invoice-processor/SKILL.md. If you need to reinstall or it's missing:
- UI: System > Skills > Install, paste the SKILL.md content
- API:
POST /api/skill/installwith the SKILL.md content as the body - File: Copy the
invoice-processor/folder toINTOUCH_HOME/skills/
Usage
Via Email
Forward an invoice email to the InTouch mailbox with @invoice-processor in the subject line:
Subject: @invoice-processor March supplies invoice
Body: [original email with PDF attachment]
InTouch replies to the same email with the extracted data.
Via Messaging Channels
From Slack, Teams, WhatsApp, Telegram, Discord, LINE, or WebChat:
@invoice-processor [paste invoice image or text]
Via REST API
curl -X POST "http://localhost:2200/intouch/api/skill/run" \
-H "Content-Type: application/json" \
-d '{"name": "invoice-processor", "input": "Process the attached invoice from Acme Corp"}'
As a Job Task
Add to any job as a skill task:
{
"typeName": "skill",
"json": "{\"skillName\": \"invoice-processor\", \"input\": \"Process this invoice\"}"
}
What Gets Extracted
| Field | Description |
|---|---|
| Vendor name | Company or person who issued the invoice |
| Invoice number | Invoice/reference number |
| Invoice date | When issued (YYYY-MM-DD) |
| Due date | When payment is due (YYYY-MM-DD) |
| Payment terms | Net 30, Due on Receipt, etc. |
| Currency | USD, EUR, GBP, etc. |
| Line items | Each item with description, quantity, unit price, total |
| Subtotal | Before tax |
| Tax | Tax amount if listed |
| Total | Final amount due |
| Vendor contact | Email or phone if present |
| Payment details | Bank account, routing number, PayPal, etc. |
Flags
The skill automatically flags invoices that need attention:
| Flag | When It Triggers |
|---|---|
| HIGH AMOUNT | Total exceeds $10,000 |
| PAST DUE | Due date has already passed |
| RUSH | Due on Receipt or due within 7 days |
| NEW VENDOR | Always flagged for human verification |
| MISSING INFO | Critical fields (vendor, amount, due date) could not be extracted |
Customization
Edit SKILL.md to change:
- Amount threshold: Change
$10,000in the HIGH AMOUNT flag to your preferred threshold - Rush window: Change
7 daysin the RUSH flag - Additional fields: Add fields to the extraction list (e.g., PO number, project code)
- Response format: Modify the response template to match your AP workflow
- Language: The instructions are in English but Claude handles invoices in any language
Cost
- Anthropic: ~$0.01-0.05 per invoice (depending on PDF size and model)
- OpenAI: Similar pricing per invoice
- Ollama: Free (requires a vision-capable local model)
At 200 invoices/month, that's $2-10/month — compared to $500+/month for dedicated AP automation software.