# Extract Inbound Orders to Google Sheets

Source: https://openflow.run/ja/templates/extract-inbound-orders-to-google-sheets/
Content language: en
Template revision: 9018120e802d4de0a097610157c565df858c0871

運用

Extract purchase order lines from matching Gmail messages and append them to Google Sheets.

[Open Flow で使用](https://console.openflow.run/flows?importUrl=https%3A%2F%2Fraw.githubusercontent.com%2Foomol-lab%2Fawesome-workflow-templates%2F9018120e802d4de0a097610157c565df858c0871%2Fworkflows%2Fextract-inbound-orders-to-google-sheets%2Ftemplates%2Fextract-inbound-orders-to-google-sheets.openflow.json)

*   [Open Flow JSON](https://raw.githubusercontent.com/oomol-lab/awesome-workflow-templates/9018120e802d4de0a097610157c565df858c0871/workflows/extract-inbound-orders-to-google-sheets/templates/extract-inbound-orders-to-google-sheets.openflow.json)
*   [n8n JSON](https://raw.githubusercontent.com/oomol-lab/awesome-workflow-templates/9018120e802d4de0a097610157c565df858c0871/workflows/extract-inbound-orders-to-google-sheets/templates/extract-inbound-orders-to-google-sheets.n8n.json)

![Open Flow の Extract Inbound Orders to Google Sheets ワークフロー](https://openflow.run/_astro/preview-light.D3K9AMbq_Z1a8xgt.webp)

Extract purchase order lines from matching Gmail messages and append them to Google Sheets.

## Setup

Connect the same Gmail account to **Check for new emails** and **Read the email**. Configure the model in **Extract the purchase order**. Connect Google Sheets in **Append order lines**, set the spreadsheet ID and A1 range, and create columns in this order: PO\_NUMBER, EXPECTED\_DELIVERY DATE, SKU\_ID, QUANTITY. In n8n connect Gmail, Google Sheets and OpenAI, and select the destination spreadsheet and sheet. Activate one format.

## Behavior

Every minute new emails whose subject contains the case-sensitive phrase Inbound Order are sent to the model. Each extracted line is appended with its purchase order and delivery date. Other emails do not write. The model can misread or invent details, so review the rows before relying on them. Limit access to email contents and execution history. Long messages may exceed model limits.

Open Flow checks up to 25 messages per poll and processes each email in the poll page in sequence and validates extracted values before one append per email. If an append fails, earlier emails may already have been written. An uncertain append may have succeeded; inspect the sheet before retrying. Polling does not guarantee exactly-once delivery.

Inspiration & credits

## Changes to the source

*   Replace the private spreadsheet with configuration, use RAW cell values and validate order lines before writing. n8n processes every input order rather than only the first item of a batch.
*   Open Flow uses a single-round Agent and excludes drafts, spam and trash; n8n retains its source trigger filters.

Adapted from [AI agent for logistics order processing with GPT-4o, Gmail and Google Sheet](https://github.com/Zie619/n8n-workflows/blob/ae8cf6dc5b873cbb4f74587aa9180ed3a9f70682/workflows/Googlesheets/0814_GoogleSheets_Gmail_Send_Triggered.json) in [Zie619/n8n-workflows](https://github.com/Zie619/n8n-workflows). The matching [n8n community listing](https://n8n.io/workflows/3344-ai-agent-for-logistics-order-processing-with-gpt-4o-gmail-and-google-sheet/) credits Samir Saci. The original template does not state a separate license.

The collection’s [MIT notice](https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/LICENSE) is pinned at a later revision. This is the collection notice at that revision; it does not establish a separate original template author’s license. Our changes are listed above; see [repository licensing](https://github.com/oomol-lab/awesome-workflow-templates/blob/9018120e802d4de0a097610157c565df858c0871/README.md#licensing).

> MIT License
> 
> Copyright (c) 2025 Zie619
> 
> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
> 
> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
> 
> THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

## 使用するアプリ

*   [**Gmail**`gmail`](https://console.openflow.run/connections/gmail)
*   [**Google Sheets**`googlesheets`](https://console.openflow.run/connections/googlesheets)

## 必要な設定

*   Gmail connection
*   Google Sheets connection and destination sheet
*   Configured AI model

*   gmail
*   google sheets
*   orders
*   ai

[GitHub で見る](https://github.com/oomol-lab/awesome-workflow-templates/blob/9018120e802d4de0a097610157c565df858c0871/workflows/extract-inbound-orders-to-google-sheets/README.md)
