AutomationFlowsAI & RAG › Post Google News Headlines to Instagram Images with Gpt-4o-mini, PDF API Hub…

Post Google News Headlines to Instagram Images with Gpt-4o-mini, PDF API Hub…

Original n8n title: Post Google News Headlines to Instagram Images with Gpt-4o-mini, PDF API Hub and Google Sheets

ByRishabh Dugar @rishabhdugar on n8n.io

Auto-post Google News to Instagram with OpenAI, PDF API Hub & Google Sheets

Cron / scheduled trigger★★★★☆ complexityAI-powered14 nodesGoogle SheetsRSS Feed ReadChain LlmOpenAI ChatN8N Nodes Pdf Api Hub@Mookielianhd/N8N Nodes Instagram
AI & RAG Trigger: Cron / scheduled Nodes: 14 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #15025 — we link there as the canonical source.

This workflow follows the Chainllm → Google Sheets recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "fWrnscwHJE3q7A4d",
  "name": "Google News RSS \u2192 Clickbait \u2192 Image \u2192 Instagram (with Google Sheets Tracking)",
  "tags": [],
  "nodes": [
    {
      "id": "b7ae623d-7aee-4f22-99b3-9d37c13394dd",
      "name": "Sticky Note - Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1136,
        496
      ],
      "parameters": {
        "color": 4,
        "width": 820,
        "height": 460,
        "content": "## \ud83d\udcf0 Google News RSS \u2192 Clickbait \u2192 Image \u2192 Instagram\n\n**What this workflow does:**\n1. Fetches trending news from Google News RSS (configurable topic)\n2. Deduplicates against a Google Sheet so the same story isn't posted twice\n3. Rewrites the headline into a short, viral-style caption using OpenAI\n4. Generates a branded breaking-news image via PDF API Hub (HTML \u2192 Image)\n5. Publishes to Instagram and marks the row as posted\n\n**Before you start \u2014 set up your Google Sheet:**\nCreate a Google Sheet with a tab named `rss` and these column headers in row 1:\n\n| guid | title | pubDate | source | link | topic | media_url | is_posted | created_at | updated_at |\n\nLeave the rows empty \u2014 the workflow will populate them automatically.\n\n**Credentials needed:**\n- Google Sheets OAuth2\n- OpenAI API key\n- PDF API Hub API key (get one at pdfapihub.com)\n- Instagram API credentials"
      },
      "typeVersion": 1
    },
    {
      "id": "092cdbe8-f631-4334-960f-016d6d8163f3",
      "name": "Sticky Note - Image Generation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1440,
        336
      ],
      "parameters": {
        "color": 2,
        "width": 350,
        "height": 300,
        "content": "## \ud83d\uddbc\ufe0f Generate Image\n\nConverts the rewritten headline into a **branded breaking-news image** (375\u00d7812 mobile format) using PDF API Hub's HTML-to-Image API.\n\nThe HTML template includes:\n- BREAKING badge + LIVE indicator\n- Gradient dark background\n- The rewritten headline as the main text\n\n\u270f\ufe0f Customize the HTML/CSS in the node to match your brand colors, logo, and style."
      },
      "typeVersion": 1
    },
    {
      "id": "9ad47d00-c115-4f07-8389-a841567fefbd",
      "name": "Every Hour",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -144,
        688
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "7baee74c-0097-442b-baeb-e89f48f25ad3",
      "name": "Set Topic",
      "type": "n8n-nodes-base.set",
      "position": [
        80,
        688
      ],
      "parameters": {
        "values": {
          "string": [
            {
              "name": "topic",
              "value": "ipl"
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 2
    },
    {
      "id": "aa6b9026-5224-450d-b93e-b74322bedfc1",
      "name": "Fetch Sheet Rows",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        384,
        688
      ],
      "parameters": {
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultUrl": "",
          "cachedResultName": "rss"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultUrl": "",
          "cachedResultName": "YOUR_GOOGLE_SHEET_NAME"
        }
      },
      "typeVersion": 4,
      "alwaysOutputData": true
    },
    {
      "id": "d7e3be21-b477-4427-85b1-acc78dea1e97",
      "name": "Google News RSS",
      "type": "n8n-nodes-base.rssFeedRead",
      "position": [
        624,
        688
      ],
      "parameters": {
        "url": "=https://news.google.com/rss/search?hl=en-US&gl=US&ceid=US:en&oc=11&q={{ $('Set Topic').item.json.topic }}",
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "6a193b3c-ede8-4314-b432-eb9762c6f942",
      "name": "Deduplicate Articles",
      "type": "n8n-nodes-base.code",
      "position": [
        864,
        688
      ],
      "parameters": {
        "jsCode": "// Get all existing pubDates from the sheet\nconst sheetItems = $('Fetch Sheet Rows').all();\nconst existingDates = new Set(\n  sheetItems\n    .map(item => item.json.pubDate)\n    .filter(Boolean)\n);\n\n// Get all RSS items from previous node\nconst rssItems = items;\n\n// Sort by pubDate (latest first)\nconst sortedItems = rssItems.sort((a, b) => {\n  return new Date(b.json.pubDate) - new Date(a.json.pubDate);\n});\n\n// Find first non-duplicate\nfor (const item of sortedItems) {\n  if (!existingDates.has(item.json.pubDate)) {\n    return [item];\n  }\n}\n\nreturn [];"
      },
      "typeVersion": 2
    },
    {
      "id": "3c06f6fd-2527-49d5-b17e-7db38ab53432",
      "name": "Save to Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1056,
        688
      ],
      "parameters": {
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultUrl": "",
          "cachedResultName": "rss"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultUrl": "",
          "cachedResultName": "YOUR_GOOGLE_SHEET_NAME"
        }
      },
      "typeVersion": 4
    },
    {
      "id": "55330945-94a3-4e93-b52a-97c07d21c57e",
      "name": "Rewrite Headline (AI)",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        1296,
        688
      ],
      "parameters": {
        "text": "=You are a viral news writer.\nINPUT: {{$json[\"title\"]}}\n\nINSTRUCTIONS:\n- Rewrite into a short, exciting, high-impact message\n- Max 50 tokens total\n- 1\u20132 lines only\n- Add urgency or emotion\n- No emoji\n- Keep it believable (no fake hype)\n\nOUTPUT (STRICT): Just the message text, nothing else.",
        "batching": {},
        "messages": {
          "messageValues": []
        },
        "promptType": "define"
      },
      "typeVersion": 1.9
    },
    {
      "id": "d6049393-afcf-43ee-805e-b7a3061611e2",
      "name": "OpenAI GPT-4o-mini",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1296,
        928
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {
          "maxTokens": 500
        },
        "responsesApiEnabled": false
      },
      "typeVersion": 1.3
    },
    {
      "id": "ce611092-75f6-4d3b-a689-f0a944e07516",
      "name": "Generate News Image",
      "type": "n8n-nodes-pdf-api-hub.pdfSplitMerge",
      "position": [
        1648,
        688
      ],
      "parameters": {
        "resource": "imageGeneration",
        "operation": "htmlToImage",
        "image_width": 375,
        "image_height": 812,
        "image_html_content": "=<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\" />\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"/>\n\n  <link href=\"https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;800&display=swap\" rel=\"stylesheet\">\n\n  <style>\n    * {\n      margin: 0;\n      padding: 0;\n      box-sizing: border-box;\n      font-family: 'Poppins', sans-serif;\n    }\n\n    body {\n      width: 100%;\n      height: 100vh;\n      display: flex;\n      align-items: center;\n      justify-content: center;\n      background: #000;\n    }\n\n    .screen {\n      width: 360px;\n      height: 640px;\n      border-radius: 32px;\n      overflow: hidden;\n      position: relative;\n      background: linear-gradient(160deg, #0f2027, #203a43, #2c5364);\n      box-shadow: 0 20px 60px rgba(0,0,0,0.6);\n      padding: 24px;\n      display: flex;\n      flex-direction: column;\n      justify-content: space-between;\n    }\n\n    .top {\n      display: flex;\n      justify-content: space-between;\n      align-items: center;\n      font-size: 14px;\n      opacity: 0.9;\n    }\n\n    .badge {\n      padding: 6px 12px;\n      font-size: 11px;\n      font-weight: 600;\n      border-radius: 999px;\n      background: linear-gradient(90deg, #ff416c, #ff4b2b);\n      color: #fff;\n    }\n\n    .live {\n      display: flex;\n      align-items: center;\n      gap: 6px;\n      font-weight: 600;\n      font-size: 12px;\n      color: #fff;\n    }\n\n    .dot {\n      width: 8px;\n      height: 8px;\n      background: #ff3b30;\n      border-radius: 50%;\n      box-shadow: 0 0 8px rgba(255, 59, 48, 0.8);\n    }\n\n    .content {\n      margin-top: 40px;\n      flex-grow: 1;\n      display: flex;\n      align-items: center;\n    }\n\n    .title {\n      font-size: 28px;\n      font-weight: 800;\n      line-height: 1.4;\n      color: #fff;\n    }\n\n    .bottom {\n      font-size: 13px;\n      opacity: 0.7;\n    }\n\n    .brand {\n      margin-top: 6px;\n      font-size: 15px;\n      font-weight: 600;\n      color: #ffffff;\n    }\n\n    .glow {\n      position: absolute;\n      width: 200px;\n      height: 200px;\n      background: radial-gradient(circle, rgba(255,255,255,0.15), transparent);\n      top: -50px;\n      right: -50px;\n    }\n  </style>\n</head>\n\n<body>\n  <div class=\"screen\">\n\n    <div class=\"glow\"></div>\n\n    <div class=\"top\">\n      <div class=\"badge\">BREAKING</div>\n\n      <div class=\"live\">\n        <div class=\"dot\"></div>\n        LIVE\n      </div>\n    </div>\n\n    <div class=\"content\">\n      <div class=\"title\">\n        {title}\n      </div>\n    </div>\n\n    <div class=\"bottom\">\n      Powered by your news engine \u26a1\n      <div class=\"brand\">YourBrand</div>\n    </div>\n\n  </div>\n</body>\n</html>",
        "imageAdvancedOptions": {},
        "image_dynamic_params": {
          "value": {},
          "schema": [],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "image_viewport_preset": "375x812",
        "image_dynamic_params_manual": {
          "params": [
            {
              "key": "=title",
              "value": "={{ $json.text }}"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "9b35cea2-7fbb-41ab-aee0-76eb3b6e3586",
      "name": "Post to Instagram",
      "type": "@mookielianhd/n8n-nodes-instagram.instagram",
      "position": [
        1904,
        592
      ],
      "parameters": {
        "node": "me",
        "caption": "Latest Breaking News",
        "imageUrl": "={{ $json.image_url }}",
        "additionalFields": {}
      },
      "typeVersion": 1
    },
    {
      "id": "aa1d04d8-142a-46d5-bfeb-e0c5819c00b8",
      "name": "Save Image URL to Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1728,
        912
      ],
      "parameters": {
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultUrl": "",
          "cachedResultName": "rss"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultUrl": "",
          "cachedResultName": "YOUR_GOOGLE_SHEET_NAME"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "647d5b2c-802d-4529-bdcb-62db48953d6c",
      "name": "Mark as Posted",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2048,
        464
      ],
      "parameters": {
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultUrl": "",
          "cachedResultName": "rss"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultUrl": "",
          "cachedResultName": "YOUR_GOOGLE_SHEET_NAME"
        }
      },
      "typeVersion": 4.7
    }
  ],
  "active": false,
  "settings": {
    "binaryMode": "separate",
    "executionOrder": "v1"
  },
  "versionId": "5f1b59c8-0821-4fa0-a38b-bbb114a3885e",
  "connections": {
    "Set Topic": {
      "main": [
        [
          {
            "node": "Fetch Sheet Rows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Every Hour": {
      "main": [
        [
          {
            "node": "Set Topic",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save to Sheet": {
      "main": [
        [
          {
            "node": "Rewrite Headline (AI)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google News RSS": {
      "main": [
        [
          {
            "node": "Deduplicate Articles",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Sheet Rows": {
      "main": [
        [
          {
            "node": "Google News RSS",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Post to Instagram": {
      "main": [
        [
          {
            "node": "Mark as Posted",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI GPT-4o-mini": {
      "ai_languageModel": [
        [
          {
            "node": "Rewrite Headline (AI)",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Generate News Image": {
      "main": [
        [
          {
            "node": "Post to Instagram",
            "type": "main",
            "index": 0
          },
          {
            "node": "Save Image URL to Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Deduplicate Articles": {
      "main": [
        [
          {
            "node": "Save to Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Rewrite Headline (AI)": {
      "main": [
        [
          {
            "node": "Generate News Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Auto-post Google News to Instagram with OpenAI, PDF API Hub & Google Sheets

Source: https://n8n.io/workflows/15025/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

Check Legal Regulations: This workflow involves scraping, so ensure you comply with the legal regulations in your country before getting started. Better safe than sorry!

OpenAI Chat, Chain Llm, RSS Feed Read +4
AI & RAG

A fully automated n8n workflow that runs every day at 1:10 PM IST and publishes a fresh AI-generated image to Instagram — zero manual effort required after setup.

Google Gemini, N8N Nodes Uploadtourl, @Mookielianhd/N8N Nodes Instagram +3
AI & RAG

⚠️ DISCLAIMER: This workflow uses the AnySite LinkedIn community node, which is only available on self-hosted n8n instances. It will not work on n8n.cloud.

OpenAI Chat, Output Parser Structured, Google Sheets +6
AI & RAG

This workflow automates the creation, rendering, approval, and posting of TikTok-style POV (Point of View) videos to Instagram, with cross-posting to Facebook and YouTube. It eliminates manual video p

OpenAI Chat, Output Parser Item List, HTTP Request +10
AI & RAG

YOUTUBE GUIDE 📣 This template generates up to 2,000 AI-based stock images per day for under $4. It includes prompt generation, image creation, metadata enrichment, upload to Google Drive, and error lo

Google Sheets, HTTP Request, Google Drive +6