Send daily AI news digest to Slack with OpenAI and PostgreSQL
Ready for 3.0Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.
Nodes used (8)
- HTTP Request
n8n-nodes-base.httpRequest - Schedule Trigger
n8n-nodes-base.scheduleTrigger - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - OpenAI
@n8n/n8n-nodes-langchain.openAi - Merge
n8n-nodes-base.merge - Postgres
n8n-nodes-base.postgres - Slack
n8n-nodes-base.slack
What it does
Quick overview This workflow runs daily to fetch AI-related articles from NewsAPI, analyzes each one with OpenAI, stores unique insights in PostgreSQL, then generates an executive-style daily digest and posts it to a Slack channel. How it works 1. Runs every day at 08:00 using a schedule trigger. 2. Queries NewsAPI for the five most recent English articles matching the configured AI and tech-startup keywords. 3. Splits the API response into individual article items and keeps only articles whose description matches specified AI-related terms. 4. Sends each retained article to OpenAI (gpt-4o-mini) to produce a structured JSON analysis including summary, category, sentiment, importance score, trend keywords, and “why it matters.” 5. Combines the original article fields with the AI-generated insights, checks PostgreSQL to see if the article URL already exists, and inserts only new articles into the ainews table. 6. Aggregates the stored items into a daily payload with top trend keywords and asks OpenAI to write an executive digest based strictly on that payload. 7. Posts the generated digest to Slack along with the number of processed articles and the top trends list. Setup 1. Provide a NewsAPI API key and set it in the HTTP request query parameter for apiKey. 2. Add an OpenAI credential for the two OpenAI steps and confirm the selected model (gpt-4o-mini) is available in your account. 3. Configure a PostgreSQL connection (for example Supabase Postgres) and ensure a public.ainews table exists with columns used in the insert (articleurl, headline, summary, category, importancescore, sentiment, trendkeywords, whyitmatters, source, imageurl, publishedat, content). 4. Add a Slack credential and select the destination channel where the daily digest should be posted. 5. Adjust the schedule time, NewsAPI query (q, language, pageSize), and any keyword filters to match your monitoring needs. Additional info Add-ons The workflow can be extended further with: - Email digest delivery - Microsoft Teams notifications - AI-powered sentiment dashboards - Weekly or monthly digest generation - Real-time breaking AI news alerts - Web dashboard visualization - Advanced trend scoring - Multi-source RSS aggregation - AI stock market tracking - Topic-based digest segmentation Use Case Examples 1. Internal AI Monitoring Companies can automatically track AI industry developments and share daily insights with teams via Slack. 2. Startup Research Founders can monitor AI competitors, funding announcements, product launches, and industry movements. 3. AI Content Research Marketing and content teams can use summarized AI news for newsletters, blogs, and social media planning. 4. Executive Reporting Leadership teams can receive concise AI industry summaries without manually reviewing multiple news websites. 5. Technology Trend Analysis Researchers and analysts can identify trending AI technologies, companies, and market shifts automatically. Additional use cases can be implemented depending on business requirements and workflow customization. Troubleshooting Guide | Issue | Possible Cause | Solution | | ---------------------------- | ---------------------------------- | --------------------------------- | | No articles fetched | Invalid NewsAPI key | Verify API credentials | | Empty AI analysis output | OpenAI quota or prompt issue | Check API usage and prompts | | Duplicate articles inserted | Duplicate validation misconfigured | Verify IF node conditions | | Slack messages not delivered | Invalid Slack credentials | Reconnect Slack integration | | PostgreSQL insert fails | Table schema mismatch | Verify database columns | | Trend analysis returns empty | Missing trend keywords | Validate OpenAI response format | | JSON parse errors | Invalid AI response formatting | Enforce strict JSON prompt output | | Workflow stops midway | Node execution failure | Review execution logs in n8n | Need Help? If you need assistance customizing or scaling this workflow, our ex