🎬 Ai-powered chart generation from web data with GPT-4o and WordPress upload

⚑ 1,186 views · 🎬 Content Creation & Video

πŸ’‘ Pro Tip β€” HTTP Request scraping tends to break when sites update their markup. If you’re scraping a major platform, check if ScraperNode covers it β€” it has maintained scrapers for LinkedIn, Instagram, TikTok, YouTube, and 20+ other platforms that return structured data.

View All Scrapers

Description

AI-Powered Chart Generation from Web Data

This n8n workflow automates the process of:

  1. Scraping real-time data from the web using GPT-4o with browsing capability
  2. Converting markdown tables into Chart.js-compatible JSON
  3. Rendering the chart using QuickChart.io
  4. Uploading the resulting image directly to your WordPress media library

πŸš€ Use Case

Ideal for content creators, analysts, or automation engineers who need to:


🧠 How It Works

1. Prompt Input

Trigger the workflow manually or via another workflow with a prompt string, e.g.:

Generate a graph of apple’s market share in the mobile phone market in Q1 2025


2. Web Search + Table Extraction

The Message a model node uses GPT-4o with search to:


3. Chart Generation via AI Agent

The Generate Chart AI Agent:


4. QuickChart API Integration

The Create QuickChart node:


5. WordPress Image Upload

The Upload image node:


🧩 Nodes Used


πŸ—‚ Output Format

The final Code node returns:

{
  "research": { ...raw markdown table + citations... },
  "graph_data": { ...Chart.js JSON... },
  "graph_image": { ...WordPress upload metadata... },
  "result_image_url": "https://your-wordpress.com/wp-content/uploads/...png"
}

βš™οΈ Requirements

OpenAI credentials (GPT-4o or GPT-4o-mini)

WordPress REST API credentials with media write access

QuickChart.io (free tier works)

n8n v1.25+ recommended

πŸ“Œ Notes

Chart style and format are determined dynamically based on your table structure and AI interpretation.

Make sure your OpenAI and WordPress credentials are connected properly.

Outputs are schema-validated to ensure reliable rendering.

πŸ–Ό Sample Output

openchart graph

πŸ”— Nodes Used

HTTP Request, Execute Workflow Trigger, AI Agent, OpenAI Chat Model, Structured Output Parser, OpenAI

πŸ“₯ Import

Download workflow.json and import into n8n: Workflow menu β†’ Import from File

πŸ“– Importing guide Β· πŸ”‘ Credential setup