April 21, 2026 7 min read

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

    Automatically fetch trending news from Google News RSS, rewrite headlines into viral captions with OpenAI, generate branded breaking-news images using PDF API Hub's HTML-to-Image API, and publish directly to Instagram — all tracked in a Google Sheet.

    How it works

    1. Every hour, the workflow pulls the latest articles from Google News RSS for your chosen topic
    2. New articles are deduplicated against a Google Sheet to avoid reposting
    3. OpenAI (GPT-4o-mini) rewrites the headline into a short, high-impact viral caption
    4. PDF API Hub converts a branded HTML template into a mobile-format breaking-news image via the HTML-to-Image API
    5. The image is published to Instagram, and the Google Sheet row is updated with the image URL and marked as posted

    Set up steps

    1. Create a Google Sheet with a tab named rss and add the required column headers (~2 min). See the sticky note inside the workflow for the exact structure.
    2. Connect your four credentials:
      • Google Sheets OAuth2
      • OpenAI API
      • PDF API Hub API — get your key
      • Instagram API
    3. Set your news topic in the Set Topic node (e.g. ai, crypto, sports)
    4. Optionally customize the HTML/CSS in the Generate News Image node to match your brand
    5. Activate the workflow

    API call used

    The workflow uses the HTML-to-Image endpoint to generate the branded news card:

    POST /api/v1/generate/image
    {
      "html": "<div style='...'><h1>{{headline}}</h1>...</div>",
      "width": 1080,
      "height": 1080,
      "output": "url"
    }

    Pipeline overview

    Schedule Trigger (hourly)
      → Fetch Google News RSS
      → Check Google Sheet for duplicates
      → Filter new articles only
      → OpenAI: rewrite headline → viral caption
      → PDF API Hub: HTML → branded news image (1080×1080)
      → Post image to Instagram
      → Update Google Sheet (mark as posted)

    Google Sheet structure

    ColumnPurpose
    titleOriginal article headline
    linkSource URL (used for deduplication)
    captionAI-rewritten viral caption
    image_urlGenerated image URL from PDF API Hub
    postedTRUE / FALSE — marks whether it was posted to Instagram

    Customization tips

    • Edit the HTML template in the Generate News Image node to match your brand colors and fonts
    • Adjust the schedule trigger frequency — hourly works well for breaking-news accounts
    • Swap Instagram for Twitter/X or LinkedIn by replacing the publish node
    • Add multiple topics by duplicating the workflow per topic keyword

    Next steps