Skip to main content

Pinterest keyword-based content scraper with AI agent & BrightData automation

Workflow preview

Workflow preview
100%
Pinterest keyword-based content scraper with AI agent & BrightData automation preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Pinterest Keyword Based Content Scraper with AI Agent & BrightData Automation Overview This n8n workflow automates Pinterest content scraping based on user provided keywords using BrightData's API ...

Best for

  • Market Research automation workflows
  • AI Chatbot automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

@n8n/n8n-nodes-langchain.lmchatanthropic, n8n-nodes-base.stickynote, n8n-nodes-base.httprequesttool, n8n-nodes-base.formtrigger, @n8n/n8n-nodes-langchain.toolcode, @n8n/n8n-nodes-langchain.agent, n8n-nodes-base.code, n8n-nodes-base.googlesheets

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Pinterest keyword-based content scraper with AI agent & BrightData automation
Workflow name
Pinterest keyword-based content scraper with AI agent & BrightData automation

Pinterest Keyword-Based Content Scraper with AI Agent & BrightData Automation

Overview

This n8n workflow automates Pinterest content scraping based on user-provided keywords using BrightData's API and Claude Sonnet 4 AI agent. The system intelligently processes keywords, initiates scraping jobs, monitors progress, and formats the extracted data into structured outputs.

Architecture Components

🧠 AI-Powered Controller

  • Claude Sonnet 4 Model: Processes and understands keywords before initiating scrape
  • AI Agent: Acts as the intelligent controller coordinating all scraping steps

📥 Data Input

  • Form Trigger: User-friendly keyword input interface
  • Keywords Field: Required input field for Pinterest search terms

🚀 Scraping Pipeline

  1. Launch Scraping Job: Sends keywords to BrightData API
  2. Status Monitoring: Continuously checks scraping progress
  3. Data Retrieval: Downloads completed scraped content
  4. Data Processing: Formats and structures the raw data
  5. Storage: Saves results to Google Sheets

Workflow Nodes

1. Pinterest Keyword Input

  • Type: Form Trigger
  • Purpose: Entry point for user keyword submission
  • Configuration:
    • Form title: "Pinterest"
    • Required field: "Keywords"

2. Anthropic Chat Model

  • Type: Language Model (Claude Sonnet 4)
  • Model: claude-sonnet-4-20250514
  • Purpose: AI-powered keyword processing and workflow orchestration

3. Keyword-based Scraping Agent

  • Type: AI Agent
  • Purpose: Orchestrates the entire scraping process
  • Instructions:
    • Initiates Pinterest scraping with provided keywords
    • Monitors scraping status until completion
    • Downloads final scraped data
    • Presents raw scraped data as output

4. BrightData Pinterest Scraping

  • Type: HTTP Request Tool
  • Method: POST
  • Endpoint: https://api.brightdata.com/datasets/v3/trigger
  • Parameters:
    • dataset_id: gd_lk0sjs4d21kdr7cnlv
    • include_errors: true
    • type: discover_new
    • discover_by: keyword
    • limit_per_input: 2
  • Purpose: Creates new scraping snapshot based on keywords

5. Check Scraping Status

  • Type: HTTP Request Tool
  • Method: GET
  • Endpoint: https://api.brightdata.com/datasets/v3/progress/{snapshot_id}
  • Purpose: Monitors scraping job progress
  • Returns: Status values like "running" or "ready"

6. Fetch Pinterest Snapshot Data

  • Type: HTTP Request Tool
  • Method: GET
  • Endpoint: https://api.brightdata.com/datasets/v3/snapshot/{snapshot_id}
  • Purpose: Downloads completed scraped data
  • Trigger: Executes when status is "ready"

7. Format & Extract Pinterest Content

  • Type: Code Node (JavaScript)
  • Purpose: Parses and structures raw scraped data
  • Extracted Fields:
    • URL
    • Post ID
    • Title
    • Content
    • Date Posted
    • User
    • Likes & Comments
    • Media
    • Image URL
    • Categories
    • Hashtags

8. Save Pinterest Data to Google Sheets

  • Type: Google Sheets Node
  • Operation: Append
  • Mapped Columns:
    • Post URL
    • Title
    • Content
    • Image URL

9. Wait for 1 Minute (Disabled)

  • Type: Code Tool
  • Purpose: Adds delay between status checks (currently disabled)
  • Duration: 60 seconds

Setup Requirements

Required Credentials

  1. Anthropic API

    • Credential ID: ANTHROPIC_CREDENTIAL_ID
    • Required for Claude Sonnet 4 access
  2. BrightData API

    • API Key: BRIGHT_DATA_API_KEY
    • Required for Pinterest scraping service
  3. Google Sheets OAuth2

    • Credential ID: GOOGLE_SHEETS_CREDENTIAL_ID
    • Required for data storage

Configuration Placeholders

Replace the following placeholders with actual values:

  • WEBHOOK_ID_PLACEHOLDER: Form trigger webhook ID
  • GOOGLE_SHEET_ID_PLACEHOLDER: Target Google Sheets document ID
  • WORKFLOW_VERSION_ID: n8n workflow version
  • INSTANCE_ID_PLACEHOLDER: n8n instance identifier
  • WORKFLOW_ID_PLACEHOLDER: Unique workflow identifier

Data Flow

User Input (Keywords) 
    ↓
AI Agent Processing (Claude)
    ↓
BrightData Scraping Job Creation
    ↓
Status Monitoring Loop
    ↓
Data Retrieval (when ready)
    ↓
Content Formatting & Extraction
    ↓
Google Sheets Storage

Output Data Structure

Each scraped Pinterest pin contains:

  • URL: Direct link to Pinterest pin
  • Post ID: Unique Pinterest identifier
  • Title: Pin title/heading
  • Content: Pin description text
  • Date Posted: Publication timestamp
  • User: Pinterest username
  • Engagement: Likes and comments count
  • Media: Media type information
  • Image URL: Direct image link
  • Categories: Pin categorization tags
  • Hashtags: Associated hashtags
  • Comments: User comments text

Usage Instructions

  1. Initial Setup:

    • Configure all required API credentials
    • Replace placeholder values with actual IDs
    • Create target Google Sheets document
  2. Running the Workflow:

    • Access the form trigger URL
    • Enter desired Pinterest keywords
    • Submit the form to initiate scraping
  3. Monitoring Progress:

    • The AI agent will automatically handle status monitoring
    • No manual intervention required during scraping
  4. Accessing Results:

    • Structured data will be automatically saved to Google Sheets
    • Each run appends new data to existing sheet

Technical Notes

  • Rate Limiting: BrightData API has built-in rate limiting
  • Data Limits: Current configuration limits 2 pins per keyword
  • Status Polling: Automatic status checking until completion
  • Error Handling: Includes error capture in scraping requests
  • Async Processing: Supports long-running scraping jobs

Customization Options

  • Adjust Data Limits: Modify limit_per_input parameter
  • Enable Wait Timer: Activate the disabled wait node for longer jobs
  • Custom Data Fields: Modify the formatting code for additional fields
  • Alternative Storage: Replace Google Sheets with other storage options

Sample Google Sheets Template

Create a copy of the sample sheet structure:

https://docs.google.com/spreadsheets/d/SAMPLE_SHEET_ID/edit

Required columns:

  • Post URL
  • Title
  • Content
  • Image URL

Troubleshooting

  • Authentication Errors: Verify all API credentials are correctly configured
  • Scraping Failures: Check BrightData API status and rate limits
  • Data Formatting Issues: Review the JavaScript formatting code for parsing errors
  • Google Sheets Errors: Ensure proper OAuth2 permissions and sheet access

For any questions or support, please contact: Email or fill out this form

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 - Anthropic Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatAnthropic - lmChatAnthropic
Config choices
Version 1.3

Block 2 - Sticky Note

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

Block 3 - Sticky Note1

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

Block 4 - Sticky Note2

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

Block 5 - Sticky Note3

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

Block 6 - Sticky Note4

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

Block 7 - Sticky Note5

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

Block 8 - Sticky Note6

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

Block 9 - BrightData Pinterest Scraping

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

Block 10 - Check Scraping Status

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

Block 11 - Fetch Pinterest Snapshot Data

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

Block 12 - Pinterest Keyword Input

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

Block 13 - Wait for 1 Minute

Type / Role
@n8n/n8n-nodes-langchain.toolCode - toolCode
Config choices
Version 1.2

Block 14 - Keyword-based Scraping Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2

Block 15 - Sticky Note7

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

Block 16 - Sticky Note8

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

Block 17 - Sticky Note9

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

Block 18 - Format & Extract Pinterest Content

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

Block 19 - Save Pinterest Data to Google Sheets

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.6

Block 20 - Sticky Note11

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

3. Summary Table

Workflow Pinterest keyword-based content scraper with AI agent & BrightData automation
Complexity advanced
Nodes 20
Categories Market Research, AI Chatbot
Author Shiv Gupta
Published 24 Jun 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/5193/5193.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 Pinterest keyword-based content scraper with AI agent & BrightData automation do?

Pinterest Keyword Based Content Scraper with AI Agent & BrightData Automation Overview This n8n workflow automates Pinterest content scraping based on user provided keywords using BrightData's API ...

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 Market Research, AI Chatbot use case.