# Extract Documented API Operations

Source: https://openflow.run/zh-cn/templates/extract-documented-api-operations/
Content language: en
Template revision: d291811835b4d4defcd934c79186ed436e74219f

开发者工具

Find documented REST operations in Qdrant and append their methods, paths, and source links to Google Sheets.

[在 Open Flow 中使用](https://console.openflow.run/flows?importUrl=https%3A%2F%2Fraw.githubusercontent.com%2Foomol-lab%2Fawesome-workflow-templates%2Fd291811835b4d4defcd934c79186ed436e74219f%2Fworkflows%2Fextract-documented-api-operations%2Ftemplates%2Fextract-documented-api-operations.openflow.json)

*   [Open Flow JSON](https://github.com/oomol-lab/awesome-workflow-templates/blob/d291811835b4d4defcd934c79186ed436e74219f/workflows/extract-documented-api-operations/templates/extract-documented-api-operations.openflow.json)
*   [n8n JSON](https://github.com/oomol-lab/awesome-workflow-templates/blob/d291811835b4d4defcd934c79186ed436e74219f/workflows/extract-documented-api-operations/templates/extract-documented-api-operations.n8n.json)

![Extract Documented API Operations 在 Open Flow 中的工作流截图](https://openflow.run/template-previews/extract-documented-api-operations/light.webp)

Find documented REST operations in Qdrant and append their methods, paths, and source links to Google Sheets.

## Setup

1.  Connect Gemini in **Embed discovery queries**, **Identify service products**, **Embed product queries**, and **Extract documented operations** with Provider API access.
2.  Connect Qdrant Cloud for **Find service documentation** and **Find product API documentation**. Use the collection you indexed with [Index Public API Documentation](https://github.com/oomol-lab/awesome-workflow-templates/blob/d291811835b4d4defcd934c79186ed436e74219f/workflows/index-public-api-documentation/). It must contain the same Gemini Embedding 2 unnamed 768-dimensional vectors, document text in `content`, and the service and URL under `metadata`.
3.  Connect Google Sheets in **Read the operations headers** and **Append operations to Google Sheets**. Set the spreadsheet ID and destination tab in **Choose service and operations tab**. Put these headers in A1:G1: `service`, `resource`, `operation`, `description`, `url`, `method`, and `documentation_url`. Column order within A:G may vary.
4.  Run manually or call the published workflow with a single extraction request:

```json
{
  "eventType": "extract",
  "data": {
    "service": "Example API",
    "url": "https://example.com",
    "collection": "api_documentation"
  }
}
```

## Behavior

The workflow searches the configured collection for the exact service and verifies the documentation URL belongs to the supplied website. Five discovery queries retrieve up to five passages each. Gemini uses this evidence to identify up to five products, and one search per product retrieves up to 20 passages. Each product can yield up to 15 operations.

An operation needs a verbatim excerpt showing its method followed by its URL or path. Its documentation link comes from the retrieved point. Different HTTP methods on the same path stay separate. If a method and path repeat within the run, only the first verified row is appended. Sheets stores the seven values as raw text. The workflow reads the documentation index and writes the spreadsheet only.

The result is `{"response":"ok"}` after Sheets confirms all rows. If there are no verified operations, it returns `{"response":"no api operations found"}` without an append. Repeating a successful request can append the same rows again. Inspect the tab if the append receipt could not be confirmed. A caller can pass `data.row_number` and record the returned status in its own coordinator sheet.

In n8n

Edit **Set manual extraction request** for a manual run or call **Operations extraction request** with one extraction request. Set the spreadsheet ID and tab in **Choose service and operations tab**. Attach the Google Sheets OAuth2 credential to **Read the operations headers** and **Append operations to Google Sheets**.

Set the Qdrant Cloud HTTPS origin on **Find service documentation** and **Find product API documentation** and attach a Header Auth credential named `api-key`. Attach a Header Auth credential named `x-goog-api-key` to each Gemini request. Keep redirects disabled.

Inspiration & credits

## Changes to the source

*   Query the compatible documentation index with the current Gemini embedding model. Scope both retrieval phases to the same service and collection.
*   Verify method and path evidence against each retrieved document before appending the original seven operations fields. Use one Sheets append and check its receipt.

Adapted from the Stage 2 extraction sub-workflow in [API Schema Extractor](https://github.com/enescingoz/awesome-n8n-templates/blob/827110332c21cbe000ab13f6d292d5adb1f1f8db/Other_Integrations_and_Use_Cases/API%20Schema%20Extractor.json) from [enescingoz/awesome-n8n-templates](https://github.com/enescingoz/awesome-n8n-templates).

Source collection notice: © 2024–2026 Enes Cingoz, [CC BY 4.0](https://github.com/enescingoz/awesome-n8n-templates/blob/827110332c21cbe000ab13f6d292d5adb1f1f8db/LICENSE). This adaptation includes the changes above. See [repository licensing](https://github.com/oomol-lab/awesome-workflow-templates/blob/d291811835b4d4defcd934c79186ed436e74219f/README.md#licensing).

## 使用的应用

*   [**Gemini**`gemini`](https://openflow.run/zh-cn/integrations/gemini.md)
*   [**Google Sheets**`googlesheets`](https://openflow.run/zh-cn/integrations/googlesheets.md)
*   [**Qdrant Cloud**`qdrant`](https://openflow.run/zh-cn/integrations/qdrant.md)

## 配置要求

*   Gemini and Qdrant Cloud connections with access to the API documentation index
*   Google Sheets connection with edit access to the designated operations tab

*   api
*   documentation
*   gemini
*   qdrant
*   google sheets

[在 GitHub 查看](https://github.com/oomol-lab/awesome-workflow-templates/blob/d291811835b4d4defcd934c79186ed436e74219f/workflows/extract-documented-api-operations/README.md)
