Skip to main content

Api schema extractor

Workflow preview

Workflow preview
100%
Api schema extractor 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 discovering and extracting APIs from various services, followed by generating custom schemas. It works in three distinct stages: research, extraction, and sch...

Best for

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

Tools used

n8n-nodes-base.manualtrigger, n8n-nodes-base.httprequest, n8n-nodes-base.splitout, @n8n/n8n-nodes-langchain.textsplitterrecursivecharactertextsplitter, n8n-nodes-base.set, @n8n/n8n-nodes-langchain.documentdefaultdataloader, n8n-nodes-base.executeworkflowtrigger, n8n-nodes-base.executiondata

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Api schema extractor
Workflow name
Api schema extractor

This workflow automates the process of discovering and extracting APIs from various services, followed by generating custom schemas. It works in three distinct stages: research, extraction, and schema generation, with each stage tracking progress in a Google Sheet.

🙏 Jim Le deserves major kudos for helping to build this sophisticated three-stage workflow that cleverly automates API documentation processing using a smart combination of web scraping, vector search, and LLM technologies.

How it works

Stage 1 - Research:

  • Fetches pending services from a Google Sheet
  • Uses Google search to find API documentation
  • Employs Apify for web scraping to filter relevant pages
  • Stores webpage contents and metadata in Qdrant (vector database)
  • Updates progress status in Google Sheet (pending, ok, or error)

Stage 2 - Extraction:

  • Processes services that completed research successfully
  • Queries vector store to identify products and offerings
  • Further queries for relevant API documentation
  • Uses Gemini (LLM) to extract API operations
  • Records extracted operations in Google Sheet
  • Updates progress status (pending, ok, or error)

Stage 3 - Generation:

  • Takes services with successful extraction
  • Retrieves all API operations from the database
  • Combines and groups operations into a custom schema
  • Uploads final schema to Google Drive
  • Updates final status in sheet with file location

Ideal for:

  • Development teams needing to catalog multiple APIs
  • API documentation initiatives
  • Creating standardized API schema collections
  • Automating API discovery and documentation

Accounts required:

  • Google account (for Sheets and Drive access)
  • Apify account (for web scraping)
  • Qdrant database
  • Gemini API access

Set up instructions:

  • Prepare your Google Sheets document with the services information. Here's an example of a Google Sheet – you can copy it and change or remove the values under the columns. Also, make sure to update Google Sheets nodes with the correct Google Sheet ID.
  • Configure Google Sheets OAuth2 credentials, required third-party services (Apify, Qdrant) and Gemini.
  • Ensure proper permissions for Google Drive access.

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 - Web Search For API Schema

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 3 - Scrape Webpage Contents

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 4 - Results to List

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

Block 5 - Recursive Character Text Splitter1

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

Block 6 - Content Chunking @ 50k Chars

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.3

Block 7 - Split Out Chunks

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

Block 8 - Default Data Loader

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

Block 9 - Set Embedding Variables

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 10 - Execute Workflow Trigger

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

Block 11 - Execution Data

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

Block 12 - EventRouter

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.2

Block 13 - Google Gemini Chat Model

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

Block 14 - Successful Runs

Type / Role
n8n-nodes-base.filter - filter
Config choices
Version 2.2

Block 15 - For Each Document...

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

Block 16 - Embeddings Google Gemini

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

Block 17 - Has API Documentation?

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

Block 18 - Store Document Embeddings

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

Block 19 - Embeddings Google Gemini1

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

Block 20 - Google Gemini Chat Model1

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

Block 21 - Extract API Operations

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

Block 22 - Search in Relevant Docs

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

Block 23 - Wait

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 24 - Remove Dupes

Type / Role
n8n-nodes-base.removeDuplicates - removeDuplicates
Config choices
Version 2

Showing the first 24 of 88 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Api schema extractor
Complexity advanced
Nodes 88
Categories Engineering, AI RAG
Author Polina Medvedieva
Published 19 Dec 2024

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/2658/2658.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 Api schema extractor do?

This workflow automates the process of discovering and extracting APIs from various services, followed by generating custom schemas. It works in three distinct stages: research, extraction, and sch...

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 Engineering, AI RAG use case.