๐Ÿ“Š Send daily AI news digest to Slack with OpenAI and PostgreSQL

โšก 15 views ยท ๐Ÿ“Š Market Research & Insights

๐Ÿ’ก Pro Tip โ€” For competitive intelligence, ScraperNode can automate the data collection โ€” Yelp reviews, Glassdoor company data, and Crunchbase profiles all return structured JSON you can feed straight into this workflow.

View All Scrapers

Description

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 ai_news 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.ai_news table exists with columns used in the insert (article_url, headline, summary, category, importance_score, sentiment, trend_keywords, why_it_matters, source, image_url, published_at, 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:

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

IssuePossible CauseSolution
No articles fetchedInvalid NewsAPI keyVerify API credentials
Empty AI analysis outputOpenAI quota or prompt issueCheck API usage and prompts
Duplicate articles insertedDuplicate validation misconfiguredVerify IF node conditions
Slack messages not deliveredInvalid Slack credentialsReconnect Slack integration
PostgreSQL insert failsTable schema mismatchVerify database columns
Trend analysis returns emptyMissing trend keywordsValidate OpenAI response format
JSON parse errorsInvalid AI response formattingEnforce strict JSON prompt output
Workflow stops midwayNode execution failureReview execution logs in n8n

Need Help?

If you need assistance customizing or scaling this workflow, our expert n8n developers at WeblineIndia can help you with:

Whether you need workflow enhancements, custom dashboards, advanced AI integrations or entirely new automation systems, WeblineIndia can help build scalable automation solutions tailored to your business needs.

๐Ÿ”— Nodes Used

HTTP Request, Postgres, Slack, Schedule Trigger, OpenAI

๐Ÿ“ฅ Import

Download workflow.json and import into n8n: Workflow menu โ†’ Import from File

๐Ÿ“– Importing guide ยท ๐Ÿ”‘ Credential setup