The aim of the Invoice Data Automation workflow is to streamline invoice processing by extracting, validating, and storing invoice details automatically.
It uses AI to read invoices (from images/PDFs), structures the data in JSON, checks for missing or duplicate entries, and records the information in Airtable while also storing the original invoice file.
Additionally, it sends Telegram notifications for successful entries, duplicates, or missing fields.
The goal is to:
Allow users to upload invoice images/files via chat.
Extract invoice data using AI and format it into a structured JSON.
Validate mandatory fields like invoice_id, shop_name, date, Total, and items.
Check if the invoice already exists in the Airtable.
Append new invoices to Airtable and store the original file.
Notify the user via Telegram about success, duplicates, or errors.
This ensures that invoices are processed accurately, efficiently, and securely with minimal manual effort.
The workflow relies on specific components and configurations:
The automation is built and hosted on n8n, which orchestrates the entire workflow.
When chat message received – Triggers the workflow when a user submits an invoice.
Analyze image1 – Uses OpenAI Vision AI to extract invoice data from the uploaded file.
AI Agent1 + OpenAI Chat Model1 – Restructures the extracted data into strict JSON format.
Make data in JSON structure format – Prepares and organizes the structured output.
Get data – Looks up the Airtable to check if the invoice already exists.
check if Data exist or not in table – Decides whether to process as new data or duplicate.
New data add using payload / Check Mandatory fields – Ensures invoice JSON is valid and complete.
If – check missing field – Branches based on whether mandatory fields are present.
no missing field – new data add using payload 2 – Passes only verified invoices forward.
Append data to Airtable – Saves invoice data in Airtable.
Upload invoice file – Stores the original invoice file in Airtable attachments.
Send successful Telegram message – Notifies the user of successful entry.
Duplicate entry send Telegram message – Alerts the user if the invoice already exists.
Send missing field error on Telegram – Sends an error message if mandatory fields are missing.
OpenAI API – For AI-based invoice data extraction and formatting.
Airtable API – For storing structured invoice records and file attachments.
Telegram Bot API – For sending success, duplicate, and error notifications.
Structured invoice data in Airtable.
Original invoice stored as attachment in Airtable.
Notifications sent via Telegram (success, duplicate, or error).
Used in Analyze image1 and AI Agent1 to extract and structure invoice data.
It ensures fields like invoice_id, shop_name, date, and items are clearly formatted.
Used in Get data and Append data to Airtable nodes to validate duplicates and store new invoices with file attachments.
Used in Send successful Telegram message, Duplicate entry send Telegram message, Send missing field error on Telegram to notify users about the status of invoice processing.
The Invoice Data Automation workflow automates the entire process of invoice handling by:
Receiving invoice uploads via chat.
Extracting invoice details with AI (OpenAI).
Structuring and validating the data in JSON format.
Checking Airtable for duplicates.
Appending new invoices to Airtable with file attachments.
Sending Telegram notifications to keep the user updated on the process outcome.
This end-to-end automation ensures invoices are handled with speed, accuracy, and transparency, reducing manual work and eliminating common errors in invoice management.


