Skip to main content

AI-powered accounting reports from Sabre EDI with GPT-4 and Pinecone RAG

Workflow preview

Workflow preview
100%
AI-powered accounting reports from Sabre EDI with GPT-4 and Pinecone RAG preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

This workflow automates the process of reading EDI files generated by Sabre, parsing them using an AI Agent, and producing structured accounting reports like: Accounts Receivable (AR) Summary ...

Best for

  • Document Extraction automation workflows
  • AI RAG automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.manualtrigger, @n8n/n8n-nodes-langchain.vectorstorepinecone, @n8n/n8n-nodes-langchain.embeddingsopenai, @n8n/n8n-nodes-langchain.documentdefaultdataloader, @n8n/n8n-nodes-langchain.textsplitterrecursivecharactertextsplitter, n8n-nodes-base.googledrive, n8n-nodes-base.stickynote, @n8n/n8n-nodes-langchain.lmchatopenai

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Mohan Gopal.

Original n8n.io source

1.1 Workflow description

Title
AI-powered accounting reports from Sabre EDI with GPT-4 and Pinecone RAG
Workflow name
AI-powered accounting reports from Sabre EDI with GPT-4 and Pinecone RAG

This workflow automates the process of reading EDI files generated by Sabre, parsing them using an AI Agent, and producing structured accounting reports like:

πŸ“Œ Accounts Receivable (AR) Summary πŸ“Œ Tax and Surcharges Report

It also uses Retrieval-Augmented Generation (RAG) to vectorize the Sabre Interface User Record (IUR)β€”a 154-page technical documentβ€”so that the AI agent can reference it when clarification is required while generating reports.

βš™οΈ Tools & Integrations Used Component:Tool/Service:Purpose:Workflow Engine:n8n:Automation & orchestration LLM Model:OpenAI GPT-4 / Chat Model:Natural language understanding and parsing Embeddings Model:OpenAI Embeddings:Convert text into semantic vector format Vector Database:Pinecone:Store and retrieve document chunks semantically Storage:Google Drive:Source of raw EDI text files and PDF documentation DataLoader + Splitter:n8n Node + Recursive Splitter:Loads and prepares documents for embedding AI Agents:n8n AI Agent Node:Runs context-aware prompts and parses reports

🧱 Workflow Breakdown 🧠 1. Vectorizing the Sabre IUR Document (RAG Setup) πŸ“˜ Objective: Enable the AI Agent to refer to the IUR document (154 pages) for detailed explanations of EDI terms, formats, and rules.

Flow Steps:

Google Drive Search + Download – Find and pull the IUR PDF file.

Default Data Loader – Load the file and preprocess it for semantic splitting.

Recursive Character Splitter – Break down large pages into meaningful chunks.

OpenAI Embeddings – Vectorize each chunk.

Pinecone Vector Store – Save into a Pinecone namespace for future retrieval.

βœ… Result: The IUR is now searchable via semantic queries from the AI Agent.

πŸ“ 2. Reading and Extracting Data from EDI Files πŸ“˜ Objective: Parse raw EDI files for financial records and summaries.

Flow Steps:

Trigger – Manual or scheduled execution of the workflow.

Google Drive Search – Finds all new .edi or .txt files.

Download File Contents – Loads content of each file into memory.

Extract from File – Raw text extraction.

πŸ“Š 3. Report Generation Using AI Agents πŸ“˜ Objective: AI Agents parse the extracted data to generate structured accounting reports.

a. Accounts Receivable Report Agent The extracted text is passed to an AI Agent.

Model is connected to:

OpenAI Chat Model (LLM)

Pinecone Vector DB (IUR reference)

Outputs a structured AR Summary Report.

b. Tax and Surcharges Report Agent Same steps as above.

Prompts adjusted to extract tax, fees, surcharges, and amounts.

βœ… Output Format: Can be mapped to columns and inserted into a Google Sheet or exported as a CSV/JSON.

πŸ“‘ Sample Reports You Can Build Already implemented:

βœ… Accounts Receivable (AR) Summary Report

βœ… Tax and Surcharges Report

Can be extended to: 3. Accounts Payable (AP) 4. Passenger Revenue 5. Daily Sales 6. Commission Report 7. Net Profit Margin (if supplier cost + commission is available)

πŸ’‘ Key Advantages βœ… No-code automation with n8n

βœ… Semantic reasoning using AI + Vector DB (RAG)

βœ… Can work with various Sabre outputs without manual parsing

βœ… Modular: Easy to add new report types

βœ… Cloud-integrated (Drive, Pinecone, OpenAI)

πŸ§ͺ Potential Improvements Area Suggestions Testing Add a β€œPreview” step to validate extracted data before writing Scalability Batch mode + Google Sheet batching for multiple reports Audit Trail Log every file name, timestamp, report type in a Google Sheet Notification Send Slack/Email when a new report is generated Multi-model support Add Claude/Gemini fallback if OpenAI usage limit is hit

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - When clicking β€˜Test workflow’

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 2 - Pinecone Vector Store1

Type / Role
@n8n/n8n-nodes-langchain.vectorStorePinecone - vectorStorePinecone
Config choices
Version 1.1

Block 3 - Embeddings OpenAI1

Type / Role
@n8n/n8n-nodes-langchain.embeddingsOpenAi - embeddingsOpenAi
Config choices
Version 1.2

Block 4 - Default Data Loader1

Type / Role
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - documentDefaultDataLoader
Config choices
Version 1

Block 5 - Recursive Character Text Splitter1

Type / Role
@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter - textSplitterRecursiveCharacterTextSplitter
Config choices
Version 1

Block 6 - Google Drive

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 7 - Google Drive1

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 8 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 9 - OpenAI Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 10 - Pinecone Vector Store

Type / Role
@n8n/n8n-nodes-langchain.vectorStorePinecone - vectorStorePinecone
Config choices
Version 1.1

Block 11 - Embeddings OpenAI

Type / Role
@n8n/n8n-nodes-langchain.embeddingsOpenAi - embeddingsOpenAi
Config choices
Version 1.2

Block 12 - Extract from File

Type / Role
n8n-nodes-base.extractFromFile - extractFromFile
Config choices
Version 1

Block 13 - Account Receivable Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.9

Block 14 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 15 - Google Drive: extract files

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 16 - Google Drive: download file contents

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 17 - OpenAI Chat Model1

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 18 - Pinecone Vector Store2

Type / Role
@n8n/n8n-nodes-langchain.vectorStorePinecone - vectorStorePinecone
Config choices
Version 1.1

Block 19 - Embeddings OpenAI2

Type / Role
@n8n/n8n-nodes-langchain.embeddingsOpenAi - embeddingsOpenAi
Config choices
Version 1.2

Block 20 - Tax and Surcharges Report

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.9

3. Summary Table

Workflow AI-powered accounting reports from Sabre EDI with GPT-4 and Pinecone RAG
Complexity advanced
Nodes 20
Categories Document Extraction, AI RAG
Author Mohan Gopal
Published 22 Jun 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/5130/5130.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does AI-powered accounting reports from Sabre EDI with GPT-4 and Pinecone RAG do?

This workflow automates the process of reading EDI files generated by Sabre, parsing them using an AI Agent, and producing structured accounting reports like: Accounts Receivable (AR) Summary ...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Document Extraction, AI RAG use case.