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
- Every hour, the workflow pulls the latest articles from Google News RSS for your chosen topic
- New articles are deduplicated against a Google Sheet to avoid reposting
- OpenAI (GPT-4o-mini) rewrites the headline into a short, high-impact viral caption
- PDF API Hub converts a branded HTML template into a mobile-format breaking-news image via the HTML-to-Image API
- The image is published to Instagram, and the Google Sheet row is updated with the image URL and marked as posted
Set up steps
- Create a Google Sheet with a tab named
rssand add the required column headers (~2 min). See the sticky note inside the workflow for the exact structure. - Connect your four credentials:
- Google Sheets OAuth2
- OpenAI API
- PDF API Hub API — get your key
- Instagram API
- Set your news topic in the Set Topic node (e.g.
ai,crypto,sports) - Optionally customize the HTML/CSS in the Generate News Image node to match your brand
- 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
| Column | Purpose |
|---|---|
| title | Original article headline |
| link | Source URL (used for deduplication) |
| caption | AI-rewritten viral caption |
| image_url | Generated image URL from PDF API Hub |
| posted | TRUE / 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
- Import the workflow template into your n8n instance
- Get your API key from the API Keys page
- Explore the Generate Image API docs for advanced options
- Check out the n8n integration page for more workflow templates