π± Send a weekly legal tech AI digest with GPT-4o-mini, Gemini, WordPress and Outlook
β‘ 17 views Β· π± Social Media & Email Marketing
Description
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.googleGeminicommunity 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
Emailcolumn). - 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.
π Nodes Used
HTTP Request, RSS Read, Microsoft Excel 365, Microsoft Outlook, Schedule Trigger, AI Agent
π₯ Import
Download workflow.json and import into n8n:
Workflow menu β Import from File