zero-finance
Automated inbound and outbound AI email workflow for 0 Finance, enabling agents to manage invoices, bank transfers, and financial conversations.
Introduction
The AI Email Pipeline is an automated system designed for 0 Finance to manage inbound and outbound communications directly via AI. Instead of relying on rigid state machines or regex-based intent detection, this skill leverages LLMs to interpret the nuance of financial conversations. It treats every email as a conversational turn, allowing the AI to handle corrections, clarifications, and complex user requests dynamically. The system is built for agents requiring CLI-first banking capabilities, where automated financial tasks must be tightly integrated with natural language interaction.
-
Full conversational history management: maintains session context to allow the AI to "remember" previous interactions, documents, and pending actions.
-
Native attachment handling: supports direct ingestion of PDFs and images (invoices, receipts) without pre-extraction, allowing the AI to read and interpret documents natively.
-
Integrated financial toolset: provides atomic tools for extracting invoice details, creating and updating invoices, proposing ACH/IBAN bank transfers, and checking balances.
-
Secure credential management: supports multiple email providers including Resend and Amazon SES, with robust logic for handling missing credentials and invalid webhooks.
-
Architectural pattern: utilizes a strictly conversational model where the AI decides when to call tools like createInvoice, updateInvoice, or sendReplyToUser based on the full email context.
-
Inputs: Requires inbound webhook payloads (Resend/SES), session state, current attachments, and workspace mapping configuration.
-
Outputs: Produces updated session states, creates or modifies invoices and transfer proposals, and generates outbound email replies.
-
Operational requirements: The skill follows an 'Email arrives -> Parse attachments -> Build history -> Send to LLM -> Execute tools' architecture. Avoid hardcoded shortcuts or regex-based parsing to ensure the AI remains the primary engine for intent detection.
-
Constraints: Ensure all attachments persist across the conversation by loading them from Vercel Blob storage during each message processing step. The system is designed to ask the user for confirmation on critical actions like transfers and invoice finalization rather than automating these steps blindly.
Repository Stats
- Stars
- 220
- Forks
- 43
- Open Issues
- 5
- Language
- TypeScript
- Default Branch
- main
- Sync Status
- Idle
- Last Synced
- Apr 29, 2026, 06:20 AM