05 EDIファイル処理 - 完了済み

上級

これはAI分野の自動化ワークフローで、20個のノードを含みます。主にGoogleDrive, ManualTrigger, Agent, ExtractFromFile, LmChatOpenAiなどのノードを使用、AI技術を活用したスマート自動化を実現。 Sabre EDI、GPT-4、Pinecone RAGを基盤としたAI駆動の会計レポート

前提条件
  • Google Drive API認証情報
  • OpenAI API Key
  • Pinecone API Key

カテゴリー

ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
  "id": "HWsEhnkLn4XfhWIc",
  "meta": {
    "instanceId": "92e36925b2d06addd7a010605535ce53ac105737436355f7e52e2980c726ed3d"
  },
  "name": "05 EDI File Processing - Completed",
  "tags": [
    {
      "id": "oKGIn6U0wpeHShTN",
      "name": "working flow",
      "createdAt": "2025-06-02T06:27:44.762Z",
      "updatedAt": "2025-06-02T06:27:44.762Z"
    }
  ],
  "nodes": [
    {
      "id": "ac1d38b5-6177-4b36-9a23-c26889e94a78",
      "name": "ワークフロー「テスト」クリック時",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -280,
        1060
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "2daa8cbd-acc8-4365-938b-b3caf49ad9ea",
      "name": "Pinecone ベクトルストア1",
      "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
      "position": [
        540,
        100
      ],
      "parameters": {
        "mode": "insert",
        "options": {},
        "pineconeIndex": {
          "__rl": true,
          "mode": "list",
          "value": "package1536",
          "cachedResultName": "package1536"
        }
      },
      "credentials": {
        "pineconeApi": {
          "id": "HqCFDvnsq0D6wXpJ",
          "name": "PineconeApi account 2"
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "52f425bf-9269-43fc-a685-482ea5cf3e0c",
      "name": "Embeddings OpenAI1",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        440,
        360
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "SCKN5KUziIpM8NB7",
          "name": "OpenAi account 5"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "7ed2dc8d-60ef-4c65-935c-fca4e7502c06",
      "name": "デフォルトデータローダー1",
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "position": [
        600,
        360
      ],
      "parameters": {
        "options": {},
        "dataType": "binary"
      },
      "typeVersion": 1
    },
    {
      "id": "44ad4300-31f9-4e14-904a-de23f9a5b81c",
      "name": "再帰的文字テキスト分割器1",
      "type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
      "position": [
        680,
        540
      ],
      "parameters": {
        "options": {},
        "chunkOverlap": 50
      },
      "typeVersion": 1
    },
    {
      "id": "f9512cb3-5b71-4a65-91eb-19f01130c459",
      "name": "Google ドライブ",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        120,
        100
      ],
      "parameters": {
        "filter": {
          "folderId": {
            "__rl": true,
            "mode": "list",
            "value": "1fuSiN8yukGRr27nigbt4oUsffIpzg_L7",
            "cachedResultUrl": "https://drive.google.com/drive/folders/1fuSiN8yukGRr27nigbt4oUsffIpzg_L7",
            "cachedResultName": "SabreEDIFileGuide"
          }
        },
        "options": {},
        "resource": "fileFolder",
        "returnAll": true
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "RFbg76pQ49AUClT1",
          "name": "mohan.gopal001@gmail.com"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "cc3a857b-9053-4fbf-aec0-91604a3cc608",
      "name": "Google ドライブ1",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        300,
        100
      ],
      "parameters": {
        "fileId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $json.id }}"
        },
        "options": {},
        "operation": "download"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "RFbg76pQ49AUClT1",
          "name": "mohan.gopal001@gmail.com"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "cbdd35c6-8c8b-4eb4-910b-ef77cd440916",
      "name": "付箋ノート",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -320,
        -60
      ],
      "parameters": {
        "width": 1740,
        "height": 740,
        "content": "## Vectorizing Sabre Interface User Record (IUR) \n**The Sabre Interface User Record (IUR) supports travel agency back-office functions for Ticketing, Invoicing and Itinerary type entries. The IUR is used to store and transmit information gathered from the Passenger Name Record (PNR) in Sabre to the back-office system via an asynchronous communications device utilizing a standard EIA-RS2312C signal transmission.**"
      },
      "typeVersion": 1
    },
    {
      "id": "c25c8091-66ab-4ba9-88be-cc5870a88b98",
      "name": "OpenAI チャットモデル",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        500,
        1280
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "SCKN5KUziIpM8NB7",
          "name": "OpenAi account 5"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "de06cb47-a14a-4c4a-8398-679bd4ed6e4f",
      "name": "Pinecone ベクトルストア",
      "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
      "position": [
        660,
        1280
      ],
      "parameters": {
        "mode": "retrieve-as-tool",
        "options": {
          "pineconeNamespace": ""
        },
        "toolName": "PackageDetails",
        "pineconeIndex": {
          "__rl": true,
          "mode": "list",
          "value": "package1536",
          "cachedResultName": "package1536"
        },
        "toolDescription": "Return the Accounts Payable details reading the information from the input file. "
      },
      "credentials": {
        "pineconeApi": {
          "id": "HqCFDvnsq0D6wXpJ",
          "name": "PineconeApi account 2"
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "c06ce64d-e52d-4901-8d9b-78276315a43c",
      "name": "Embeddings OpenAI",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        680,
        1440
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "SCKN5KUziIpM8NB7",
          "name": "OpenAi account 5"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "17f220b8-51c3-4819-b14d-44acb827e9d1",
      "name": "ファイルから抽出",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        320,
        1060
      ],
      "parameters": {
        "options": {},
        "operation": "text"
      },
      "typeVersion": 1
    },
    {
      "id": "1a62d317-36fa-4cbf-991e-ae9fefc43da4",
      "name": "売掛金エージェント",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        540,
        1060
      ],
      "parameters": {
        "text": "=\nUse the incoming EDI files and generate Account Receivable Report by going throug each file, listing the account receivables for each PNR and the passenger data. \n {{ $json.data }}",
        "options": {
          "systemMessage": "##Role##\nYou are an Accounting and Finance Reporting Expert and you understand the incoming EDI file from which you extract data and compile Accounts Receivable (AR) Summary Report\n\nInstruction:\nRead the incoming EDI file and identify the accounting info and generate accounting receivable report. \nIf there are data that you don't understand, query the pinecone vector database where the complete guidelines is stored for the undersatnding. \nOutput just the table with the data. No need to give a dscription in the begining. \n\nGenerate report in the below tabular format that is extractable in JSON format: \n\n{\n  [\n    {\"passenger\": \"Sergei\", \"fare\": 414, \"tax\": 34.88, \"total\": 448.88}\n  ]\n}\nNote:\nNever ever create your own AR report if in doubt or missing data.\n"
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 1.9
    },
    {
      "id": "f3d494ce-439e-4b74-96c7-b4aeea412b6b",
      "name": "付箋ノート1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -320,
        720
      ],
      "parameters": {
        "width": 1740,
        "height": 860,
        "content": "## Reports from EDI file\n1. Accounts Receivable (AR) Summary Report\n2. Accounts Payable (AP) Report\n3. Tax and Surcharges Report\n4. Passenger Revenue Report\n5. Daily Sales Report\n6. Uncollected Revenue / Payment Status Report\n7. Commission Report (if applicable)\n8. Audit & Compliance Report\n9. Ticketing Report\n10. Profit Margin Report (if commission & supplier cost known)\n"
      },
      "typeVersion": 1
    },
    {
      "id": "12e76ce9-9bf6-42ea-9059-252a1e39d50d",
      "name": "Google ドライブ: ファイル抽出",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -80,
        1060
      ],
      "parameters": {
        "filter": {
          "folderId": {
            "__rl": true,
            "mode": "list",
            "value": "172VdwV-JNLv0H7i7OXRMjYqIshg6ow1O",
            "cachedResultUrl": "https://drive.google.com/drive/folders/172VdwV-JNLv0H7i7OXRMjYqIshg6ow1O",
            "cachedResultName": "EDIFileForProcessing"
          }
        },
        "options": {},
        "resource": "fileFolder",
        "returnAll": true
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "RFbg76pQ49AUClT1",
          "name": "mohan.gopal001@gmail.com"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "a7f51cdc-614e-460a-8327-9cc20c61741a",
      "name": "Google ドライブ: ファイル内容ダウンロード",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        120,
        1060
      ],
      "parameters": {
        "fileId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $json.id }}"
        },
        "options": {},
        "operation": "download"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "RFbg76pQ49AUClT1",
          "name": "mohan.gopal001@gmail.com"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "296bbaf6-a5fb-4be4-8e83-cb8d6a696b12",
      "name": "OpenAI チャットモデル1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        960,
        1280
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "SCKN5KUziIpM8NB7",
          "name": "OpenAi account 5"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "74f71aa2-dde2-4bb8-8142-dfe5bb0ca896",
      "name": "Pinecone ベクトルストア2",
      "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
      "position": [
        1120,
        1280
      ],
      "parameters": {
        "mode": "retrieve-as-tool",
        "options": {
          "pineconeNamespace": ""
        },
        "toolName": "PackageDetails",
        "pineconeIndex": {
          "__rl": true,
          "mode": "list",
          "value": "package1536",
          "cachedResultName": "package1536"
        },
        "toolDescription": "Return the Tax Summary aligning to the input file"
      },
      "credentials": {
        "pineconeApi": {
          "id": "HqCFDvnsq0D6wXpJ",
          "name": "PineconeApi account 2"
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "5206c19e-bd8b-4e24-bf6d-225af26fdd48",
      "name": "Embeddings OpenAI2",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        1140,
        1440
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "SCKN5KUziIpM8NB7",
          "name": "OpenAi account 5"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "a1b109f9-3259-48d7-a426-c876d3aaf97e",
      "name": "税金・付加金レポート",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1000,
        1060
      ],
      "parameters": {
        "text": "=\nUse the incoming EDI files and generate Tax and Surcharges Report by going through each file, listing the tax surcharge report for each PNR and the passenger data. \n {{ $json.data }}",
        "options": {
          "systemMessage": "##Role##\nYou are an Accounting and Finance Reporting Expert and you understand the incoming EDI file from which you extract data and compile Tax and Surcharges Report\n\nInstruction:\nRead the incoming EDI file and identify the accounting info and generate accounting receivable report. \nIf there are data that you don't understand, query the pinecone vector database where the complete guidelines is stored for the undersatnding. \nOutput just the table with the data. No need to give a dscription in the begining. \n\nGenerate report in the below tabular format that is extractable in JSON format: \n\n [\n    {\"taxType\": \"JD\", \"amount\": 23.84}\n  ]\n\nNote:\nNever ever create your own Tax report if in doubt or missing data.\n"
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 1.9
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "c9cacda3-eb77-4755-a95b-fd7f97615d4d",
  "connections": {
    "f9512cb3-5b71-4a65-91eb-19f01130c459": {
      "main": [
        [
          {
            "node": "cc3a857b-9053-4fbf-aec0-91604a3cc608",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "cc3a857b-9053-4fbf-aec0-91604a3cc608": {
      "main": [
        [
          {
            "node": "2daa8cbd-acc8-4365-938b-b3caf49ad9ea",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c06ce64d-e52d-4901-8d9b-78276315a43c": {
      "ai_embedding": [
        [
          {
            "node": "de06cb47-a14a-4c4a-8398-679bd4ed6e4f",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "17f220b8-51c3-4819-b14d-44acb827e9d1": {
      "main": [
        [
          {
            "node": "1a62d317-36fa-4cbf-991e-ae9fefc43da4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c25c8091-66ab-4ba9-88be-cc5870a88b98": {
      "ai_languageModel": [
        [
          {
            "node": "1a62d317-36fa-4cbf-991e-ae9fefc43da4",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "52f425bf-9269-43fc-a685-482ea5cf3e0c": {
      "ai_embedding": [
        [
          {
            "node": "2daa8cbd-acc8-4365-938b-b3caf49ad9ea",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "5206c19e-bd8b-4e24-bf6d-225af26fdd48": {
      "ai_embedding": [
        [
          {
            "node": "74f71aa2-dde2-4bb8-8142-dfe5bb0ca896",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "296bbaf6-a5fb-4be4-8e83-cb8d6a696b12": {
      "ai_languageModel": [
        [
          {
            "node": "a1b109f9-3259-48d7-a426-c876d3aaf97e",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "7ed2dc8d-60ef-4c65-935c-fca4e7502c06": {
      "ai_document": [
        [
          {
            "node": "2daa8cbd-acc8-4365-938b-b3caf49ad9ea",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "de06cb47-a14a-4c4a-8398-679bd4ed6e4f": {
      "ai_tool": [
        [
          {
            "node": "1a62d317-36fa-4cbf-991e-ae9fefc43da4",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "2daa8cbd-acc8-4365-938b-b3caf49ad9ea": {
      "main": [
        []
      ]
    },
    "74f71aa2-dde2-4bb8-8142-dfe5bb0ca896": {
      "ai_tool": [
        [
          {
            "node": "a1b109f9-3259-48d7-a426-c876d3aaf97e",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "1a62d317-36fa-4cbf-991e-ae9fefc43da4": {
      "main": [
        []
      ]
    },
    "12e76ce9-9bf6-42ea-9059-252a1e39d50d": {
      "main": [
        [
          {
            "node": "a7f51cdc-614e-460a-8327-9cc20c61741a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ac1d38b5-6177-4b36-9a23-c26889e94a78": {
      "main": [
        [
          {
            "node": "12e76ce9-9bf6-42ea-9059-252a1e39d50d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "44ad4300-31f9-4e14-904a-de23f9a5b81c": {
      "ai_textSplitter": [
        [
          {
            "node": "7ed2dc8d-60ef-4c65-935c-fca4e7502c06",
            "type": "ai_textSplitter",
            "index": 0
          }
        ]
      ]
    },
    "a7f51cdc-614e-460a-8327-9cc20c61741a": {
      "main": [
        [
          {
            "node": "17f220b8-51c3-4819-b14d-44acb827e9d1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
よくある質問

このワークフローの使い方は?

上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。

このワークフローはどんな場面に適していますか?

上級 - 人工知能

有料ですか?

このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。

関連ワークフロー

Webhook、Pinecone + OpenAI + n8n に基づくスマートドキュメントQ&Aシステム
OpenAI GPT、Pineconeベクターデータベース、およびGoogle Drive統合を基盤としたドキュメントQ&Aシステム
Webhook
Google Drive
Manual Trigger
+
Webhook
Google Drive
Manual Trigger
30 ノードMohan Gopal
内部Wiki
ドキュメントベースのメモリを持つチャットボット:OpenAI、Pinecone、Google Driveを使用
メモリ機能付きドキュメントベースのチャットボット:OpenAI、Pinecone、Google Drive
Merge
Airtable
Aggregate
+
Merge
Airtable
Aggregate
22 ノードSally
人工知能
AI スマートアシスタント: Supabase ストレージと Google Drive ファイルとの対話
AIワンチャットボット:SupabaseストレージとGoogle Driveのファイルと対話
If
Set
Wait
+
If
Set
Wait
62 ノードMark Shcherbakov
エンジニアリング
Supabase ストレージ内のファイルと対話する AI エージェント
Supabaseストレージ内のファイルと対話するAIエージェント
If
Merge
Switch
+
If
Merge
Switch
33 ノードMark Shcherbakov
エンジニアリング
AIメール自動返信システム - メールボックスRAGインテリジェントエージェント
AIメール自動返信システム - メールボックスRAGインテリジェントエージェント
If
Set
Gmail
+
If
Set
Gmail
34 ノードLukaszB
サポート
基于AIのMISエージェント
基于AIの管理信息系统エージェント
If
Set
Code
+
If
Set
Code
129 ノードKumar Shivam
サポート
ワークフロー情報
難易度
上級
ノード数20
カテゴリー1
ノードタイプ10
難易度説明

上級者向け、16ノード以上の複雑なワークフロー

作成者
Mohan Gopal

Mohan Gopal

@mohan

B2B and B2C Travel App Consultant. Building AI Agent for Travel Solution.

外部リンク
n8n.ioで表示

このワークフローを共有

カテゴリー

カテゴリー: 34