# n8n Workflow JSON Extractor for AI Agents, RAG & Automation (`gridline-labs/n8n-workflows-scraper`) Actor

Extract 14,000+ n8n workflow templates with importable workflow JSON, AI Agent node stacks, apps, views, paid prices & verified creators. Pure-HTTP 256 MB Actor with MCP Server & onlyNew monitor mode.

- **URL**: https://apify.com/gridline-labs/n8n-workflows-scraper.md
- **Developed by:** [Gridline Labs](https://apify.com/gridline-labs) (community)
- **Categories:** Developer tools, Automation, AI
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## n8n Workflow JSON Extractor for AI Agents, RAG & Automation

Extract structured data from **14,000+ public n8n workflow templates** in seconds — including **full importable workflow JSON**, AI Agent & LangChain node stacks, apps/integrations, total & recent views, paid template pricing (`$99–$1,999+`), and verified creator profiles.

Built **100% HTTP-only** on **256 MB RAM** by **[Gridline Labs](https://gridlinelabs.vercel.app)** — zero browser bloat, native **Model Context Protocol (MCP)** support for Claude Desktop, Cursor, and Windsurf, plus `onlyNew` scheduled monitoring.

> **Free Live Sample Dataset & Ecosystem Benchmarks:** Inspect real schema quality, top AI node pairings & download sample JSON/CSV before running → **[gridlinelabs.vercel.app/datasets](https://gridlinelabs.vercel.app/datasets#n8n)**

***

### High-Value Use Cases

- **Text-to-Workflow AI Builders & RAG Pipelines:** Harvest thousands of real production n8n workflow JSON graphs (`includeWorkflowJson: true`) to power Retrieval-Augmented Generation (Supabase, Pinecone, Qdrant) or fine-tuning datasets for AI workflow generators.
- **AI Coding Agents via MCP (Claude, Cursor, Windsurf):** Let your coding agent search proven n8n automations and pull working node configurations directly into your IDE or chat window.
- **n8n Agencies & Template Creators:** Benchmark top-viewed workflows, discover high-converting paid templates (`pricingFilter: "paid"`), and uncover high-demand integration gaps.
- **SaaS Growth & Ecosystem Teams:** Track every workflow integrating your product (`apps: ["Supabase", "Slack", "HubSpot"]`) and monitor newly published templates daily with `onlyNew: true`.

***

### Connect to Claude Desktop / Cursor via Apify MCP

Add this Actor directly as a live tool in **Claude Desktop**, **Cursor**, or any MCP-compatible AI agent:

```json
{
  "mcpServers": {
    "apify-n8n-workflows": {
      "url": "https://mcp.apify.com/?tools=gridline-labs/n8n-workflows-scraper",
      "headers": {
        "Authorization": "Bearer YOUR_APIFY_TOKEN"
      }
    }
  }
}
```

Example agent prompt: *"Find the top 10 most-viewed n8n AI Agent workflows using Supabase and Slack, and fetch their importable workflow JSON."*

***

### Quick Python RAG Ingestion Example

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("gridline-labs/n8n-workflows-scraper").call(run_input={
    "searchQueries": ["AI Agent", "RAG"],
    "sortBy": "views",
    "includeWorkflowJson": True,
    "maxResults": 100,
})

workflows = list(client.dataset(run["defaultDatasetId"]).iterate_items())
print(f"Fetched {len(workflows)} workflows with full importable JSON")
```

***

### Sample Output

```json
{
  "id": 11807,
  "name": "Answer multi-channel support queries with OpenAI RAG and Supabase",
  "url": "https://n8n.io/workflows/11807",
  "createdAt": "2025-12-15T00:09:52.569Z",
  "totalViews": 10081,
  "recentViews": 7,
  "priceUsd": 0,
  "isPaid": false,
  "categories": ["Support Chatbot", "AI RAG"],
  "apps": ["OpenAI Chat Model", "Supabase", "Slack", "Zendesk", "Postgres"],
  "nodeNames": [
    "@n8n/n8n-nodes-langchain.agent",
    "@n8n/n8n-nodes-langchain.vectorStoreSupabase",
    "n8n-nodes-base.slack"
  ],
  "nodeCount": 91,
  "hasAiNodes": true,
  "hasTriggerNode": true,
  "creatorUsername": "tuguidragos",
  "creatorVerified": true,
  "scrapedAt": "2026-12-04T04:30:00.000Z"
}
```

When `includeWorkflowJson: true` is enabled, each record also includes `workflowJson` (the complete importable n8n canvas JSON) and `nodeTypeCounts`.

***

### Transparent Pay-Per-Event (PPE) Pricing

You only pay for matching workflows delivered — **filtered-out templates, duplicates, and already-seen `onlyNew` items cost `$0`**:

| Event | Price | When charged |
| :--- | :---: | :--- |
| **Workflow record** (`workflow-item`) | **$0.002** (`$2 / 1,000`) | Per matching workflow delivered |
| **Full workflow JSON** (`workflow-json-detail`) | **$0.003** (`$3 / 1,000`) | Only when `includeWorkflowJson: true` succeeds |

*Tip:* Start with `maxResults: 25` (`~$0.05` metadata or `~$0.125` with full JSON) to verify schema fit before running a full 14,000+ sweep. Use Apify's `maxTotalChargeUsd` for strict budget caps.

***

### Key Input Parameters

| Field | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `searchQueries` | `string[]` | `["AI Agent"]` | Keywords to search. Leave empty to sweep by category, app, or sort order. |
| `categories` | `string[]` | `[]` | Filter by any of n8n's 31 official categories (`AI`, `AI RAG`, `Marketing`, `Sales`, etc.). |
| `apps` | `string[]` | `[]` | Filter by exact app display names (e.g., `["Slack", "Supabase", "Google Sheets"]`). |
| `workflowIdsOrUrls` | `string[]` | `[]` | Fetch specific workflow IDs or `n8n.io/workflows/...` URLs directly. |
| `sortBy` | `string` | `"views"` | `default`, `views`, `newest`, `trending`, or `price_desc`. |
| `pricingFilter` | `string` | `"all"` | `all`, `free`, or `paid`. Filtered-out items are never charged. |
| `minViews` | `integer` | `0` | Minimum `totalViews` threshold. |
| `verifiedCreatorsOnly` | `boolean` | `false` | Return only verified n8n creators. |
| `includeWorkflowJson` | `boolean` | `false` | Fetch full importable n8n canvas JSON + `nodeTypeCounts`. |
| `onlyNew` | `boolean` | `false` | Monitor mode: persist seen IDs across scheduled runs and emit only newly published workflows. |
| `maxResults` | `integer` | `25` | Maximum matching workflows to return (`1–15,000`). |

***

### More Tools by Gridline Labs

- **[LangSmith Public Prompt Dataset & Template Extractor](https://apify.com/gridline-labs/langsmith-prompts-scraper)** — 10,800+ public LLM prompts with parsed messages & input variables.
- **[GridSnap for Chrome](https://gridlinelabs.vercel.app/gridsnap)** — 1-click HTML Table & React ARIA Grid exporter to native Excel (`.xlsx`), CSV, JSON & SQL.
- **[AgentReady Website Auditor](https://gridlinelabs.vercel.app/audit)** — Free AI Search & `llms.txt` readiness checker.

*Independent tool by [Gridline Labs](https://gridlinelabs.vercel.app) (not affiliated with or endorsed by n8n GmbH).*

# Actor input Schema

## `searchQueries` (type: `array`):

Keywords to search across n8n workflow titles and descriptions (e.g. \["RAG", "Lead Generation", "Slack AI"]). Leave empty to browse without keyword filtering.

## `categories` (type: `array`):

Filter by one or more official n8n workflow categories (e.g. "AI", "Marketing", "Sales", "AI RAG", "Lead Generation"). Leave empty for all categories.

## `apps` (type: `array`):

Filter workflows that use specific n8n apps/integrations (exact display names such as "Slack", "Google Sheets", "HubSpot", "Supabase", "Gmail", "OpenAI Chat Model").

## `workflowIdsOrUrls` (type: `array`):

Optional direct n8n workflow IDs (e.g. "1954") or URLs (e.g. "https://n8n.io/workflows/1954-ai-agent-chat/"). When provided, fetches these specific workflows directly.

## `sortBy` (type: `string`):

How search results are ordered before applying maxResults.

## `pricingFilter` (type: `string`):

Keep all templates, free templates only, or paid marketplace templates only. Filtered-out templates are never charged.

## `minViews` (type: `integer`):

Only return workflows with at least this many total views. Set 0 to disable. Skipped workflows are never charged.

## `verifiedCreatorsOnly` (type: `boolean`):

Only return workflows published by verified n8n creators.

## `creatorUsernames` (type: `array`):

Optional list of n8n creator usernames (case-insensitive) to keep.

## `includeWorkflowJson` (type: `boolean`):

Fetches each workflow's full detail endpoint to include the complete importable n8n workflow JSON, exact nodeCount, nodeTypes breakdown, recentViews, and full categories. Adds one workflow-json-detail event per enriched item.

## `includeNodeDetails` (type: `boolean`):

Include per-node type, displayName, version, and categories in output. Leave false for compact AI-agent-friendly records.

## `onlyNew` (type: `boolean`):

Remembers previously delivered workflow IDs in a named Key-Value Store and only outputs newly discovered workflows on subsequent scheduled runs.

## `monitorKey` (type: `string`):

Custom state key for monitor mode so multiple scheduled tasks can track separate watchlists independently.

## `maxResults` (type: `integer`):

Maximum number of unique matching workflows to output and bill for in this run.

## Actor input object example

```json
{
  "searchQueries": [
    "AI Agent"
  ],
  "sortBy": "views",
  "pricingFilter": "all",
  "minViews": 0,
  "verifiedCreatorsOnly": false,
  "includeWorkflowJson": false,
  "includeNodeDetails": false,
  "onlyNew": false,
  "monitorKey": "default",
  "maxResults": 25
}
```

# Actor output Schema

## `workflows` (type: `string`):

No description

## `runSummary` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "searchQueries": [
        "AI Agent"
    ],
    "maxResults": 25
};

// Run the Actor and wait for it to finish
const run = await client.actor("gridline-labs/n8n-workflows-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "searchQueries": ["AI Agent"],
    "maxResults": 25,
}

# Run the Actor and wait for it to finish
run = client.actor("gridline-labs/n8n-workflows-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "searchQueries": [
    "AI Agent"
  ],
  "maxResults": 25
}' |
apify call gridline-labs/n8n-workflows-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,gridline-labs/n8n-workflows-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/2jhcrHhyzwqeEdlOu/builds/jDtihRfWPaKwAx5Oi/openapi.json
