{
  "name": "Screenshot any URL from a chat message using AI and Rendex",
  "nodes": [
    {
      "parameters": {
        "content": "## 🤖 Chat → AI reads the URL → Rendex screenshots it\n\n**Who it's for:** anyone who wants a chat/agent front-end where a user types a request in plain English (\"grab a shot of hacker news\") and gets back a real screenshot — no manual URL wrangling.\n\n**What it does:** an **AI model** reads the incoming message and extracts the target URL, then the **Rendex** node captures that page as a PNG. Fully wired — runs the moment you add credentials.\n\n**How it works:**\n1. **Chat** message comes in\n2. **Extract URL (AI)** pulls a clean, normalized URL out of the message\n3. **Rendex — Capture URL** screenshots it and returns the image + metadata\n\n**How to use:**\n1. Install `n8n-nodes-rendex` (Settings → Community Nodes)\n2. Add your **Rendex API** credential (free key at rendex.dev) and an **OpenAI** (or any chat model) credential\n3. Open **Chat** and try: `Take a screenshot of https://news.ycombinator.com`\n\n📚 Docs: https://rendex.dev/docs/n8n",
        "height": 460,
        "width": 440
      },
      "id": "sticky-overview",
      "name": "Overview",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [-400, 100]
    },
    {
      "parameters": {
        "public": false,
        "options": {}
      },
      "id": "chat-trigger",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "typeVersion": 1.1,
      "position": [180, 320]
    },
    {
      "parameters": {
        "content": "### 1 · Let AI find the URL\nThe **Information Extractor** reads the free-text message and returns a single normalized `url` (adds `https://` if the user omits it, ignores surrounding words). Swap the model for any chat model you like.",
        "height": 300,
        "width": 320,
        "color": 4
      },
      "id": "sticky-extract",
      "name": "Extract note",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [400, 100]
    },
    {
      "parameters": {
        "text": "={{ $json.chatInput }}",
        "attributes": {
          "attributes": [
            {
              "name": "url",
              "type": "string",
              "description": "The full URL the user wants a screenshot of, including the https:// scheme. If the user omits the scheme (e.g. 'google.com'), add 'https://'. Return only the single most relevant URL.",
              "required": true
            }
          ]
        },
        "options": {}
      },
      "id": "extract-url",
      "name": "Extract URL (AI)",
      "type": "@n8n/n8n-nodes-langchain.informationExtractor",
      "typeVersion": 1,
      "position": [480, 320]
    },
    {
      "parameters": {
        "model": "gpt-4o-mini",
        "options": {}
      },
      "id": "lm-openai",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1,
      "position": [460, 520]
    },
    {
      "parameters": {
        "content": "### 2 · Capture it with Rendex\nTakes the AI-extracted `url` and captures a full-page PNG (binary `data`). Change **Format** to `pdf`, toggle **Full Page**, or add **Block Cookie Banners** / **Wait For Selector** under Additional Options.",
        "height": 300,
        "width": 340,
        "color": 5
      },
      "id": "sticky-capture",
      "name": "Capture note",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [800, 100]
    },
    {
      "parameters": {
        "resource": "screenshot",
        "operation": "capture",
        "source": "url",
        "url": "={{ $json.output.url }}",
        "format": "png",
        "binaryPropertyName": "data",
        "additionalOptions": {
          "fullPage": true,
          "blockCookieBanners": true
        }
      },
      "id": "rendex-capture",
      "name": "Rendex — Capture URL",
      "type": "n8n-nodes-rendex.rendex",
      "typeVersion": 1,
      "position": [860, 320]
    }
  ],
  "connections": {
    "When chat message received": {
      "main": [[{ "node": "Extract URL (AI)", "type": "main", "index": 0 }]]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [[{ "node": "Extract URL (AI)", "type": "ai_languageModel", "index": 0 }]]
    },
    "Extract URL (AI)": {
      "main": [[{ "node": "Rendex — Capture URL", "type": "main", "index": 0 }]]
    }
  },
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "meta": {
    "instanceId": ""
  }
}
