Send a weekly legal tech AI digest with GPT-4o-mini, Gemini, WordPress and Outlook
Go to WorkflowDescription
Quick overview
This workflow runs on a weekly schedule, collects legal-tech articles from Reddit, Hacker News, and Google News RSS, summarizes them with OpenAI, generates images with Google Gemini, uploads images to WordPress, and emails a branded HTML digest to a subscriber list stored in Microsoft Excel via Outlook.
How it works
Runs on a weekly schedule trigger.
Fetches recent items from Reddit (r/legaltech RSS), Hacker News (hnrss.org query RSS), and Google News (RSS search) and normalizes them into a consistent article schema.
Merges all sources, deduplicates by link, filters out articles older than 60 days, and randomly selects seven items with at least two from each source.
Uses OpenAI (gpt-4o-mini) to generate a newsletter intro and structured JSON summaries with a “why it matters” note for each selected article.
Builds image prompts for the first two articles, generates images with the Google Gemini community node, and uploads the images to the WordPress media library to obtain public image URLs.
Renders a responsive HTML newsletter by attaching the uploaded image URLs to the summarized articles.
Reads subscriber rows from a Microsoft Excel table and sends the HTML newsletter to each email address using Microsoft Outlook.
Setup
Add an OpenAI API credential with access to the gpt-4o-mini model.
Install and configure the @n8n/n8n-nodes-langchain.googleGemini community node (self-hosted n8n) and add a Google PaLM/Gemini API credential for image generation.
Add a WordPress HTTP Basic Auth credential and confirm the WordPress site URL for uploading media to /wp-json/wp/v2/media.
Add Microsoft Excel OAuth2 credentials and update the workbook, worksheet, and table references to your subscriber list (including an Email column).
Add Microsoft Outlook OAuth2 credentials and set the sender mailbox allowed to send to your subscriber list.
Requirements
OpenAI** — GPT-4o-mini for summarization.
Google Gemini API** — image generation.
WordPress** — image hosting.
Microsoft Excel / SharePoint** — subscriber list source.
Microsoft Outlook** (OAuth2) — sending.
Customization
Add/remove news sources in the parallel-fetch branch (update Normalize accordingly).
Adjust the per-source minimum (currently 2 articles per source) in the selection logic.
Restyle the newsletter's HTML/branding as needed.
Swap Gemini for another image provider if desired.