DEV Community

Cover image for 📰The Future of Journalism Is Here: AI-Powered News Sentiment Agent
diosamuel
diosamuel Subscriber

Posted on

📰The Future of Journalism Is Here: AI-Powered News Sentiment Agent

This is a submission for the Runner H "AI Agent Prompting" Challenge

What I Built

We agree that media influences nearly all industries and aspects of the world, which is why staying updated with the news every day is essential. But does that mean we have to track the media 24 hours a day? 🤔

Meet Lana👋🏻 a journalist who works for a small media agency. Her daily task is to write news updates and summarize articles from major media outlets, often adding sentiment analysis and predicting what the media might do next about the topic and what industries will affect of this sentiment.

Lana, 24/7 Journalist

Working in a small team of just 5–8 people, Lana finds this workload exhausting. "Tracking news across multiple sources is overwhelming" she says. What she needs is an AI agent that can assist her helping to monitor, analyze, and summarize the news so she can focus on creating valuable stories.

So, I created a News Intelligence AI Agent prompt that can scrape all news articles on a specific topic from the past 72 hours, summarize each one, perform sentiment analysis, and save the results to Google Sheets and Google Docs. It then sends a daily report via Gmail. I integrated it with RunnerH, and voila! - it saves a significant amount of time because RunnerH automatically handles it.

Let's break down how I built this, step by step👇🏻.

Demo

My AI-Agent RunnerH

How I Used Runner H

The first thing is pass this prompt to RunnerH

You are a News Intelligence AI Agent
Your task is to analyze recent news about a specific topic (Donald Trump) from the past 3 months, classify sentiment, and deliver structured insights through Google Sheets, Google Docs, and Gmail.
Instructions (Step-by-Step Workflow):
1. News Collection:
    Search trusted sources (e.g., Google News, CNN, CNBC, Bloomberg, NYTimes) for relevant news about Donald Trump.
    Collect 10 news articles in past 72 hours (3 days)

2. Extract & Structure the Data:
For each article, extract the following fields:
| Title | Source | Date | Sentiment | Summary | Justification | URL |
    Title: Article headline
    Source: Publisher (e.g., CNN)
    Date: Date of publication
    Summary: 2–3 sentence summary
    Sentiment: Positive ✅ / Neutral ⚪️ / Negative 🚩
    Justification: Brief quote or reason
    URL: Full article link

3. Sentiment Classification Criteria:
    Use sentiment-indicative keywords (e.g., "charged", "praised", "under investigation", "wins", "violated")
    Analyze tone: praising, factual, skeptical, or critical
    Consider impacts, outcomes, or public reaction

4. OUTPUT TO GOOGLE SHEETS (MANDATORY):
    You must write the structured table to Google Sheets. This step is non-negotiable.
Format Requirements:
    Avoid duplicates (check by Title or URL)
    Maintain column consistency: Title | Source | Date | Sentiment | Summary | Justification | URL
You must generate or update a Google Sheet with this data and return the link.

5. 📝 GOOGLE DOCS – 1-Page Narrative Report:
Write a one-page, clean, professional summary report with:
    Headline Summary: One-paragraph summary
    Sentiment Breakdown: Count of positive/neutral/negative
    Top 3 Most Impactful Articles (with brief descriptions)
    Industries Affected (with reasons)
    Relevant Tags/Topics
Return the link to the final Google Doc report.

6. GMAIL NOTIFICATION (to email@gmail.com)
Subject:
Today's News: What's happening with Donald Trump?
Body:
Headline Summary  
What's the buzz around Donald Trump today? Let's take a look 👇🏻  
[One-paragraph summary of 2–4 top news stories]

Sentiment Analysis  
Overall Tone: [Positive ✅ / Neutral ⚪️ / Negative 🚩]  
Justification: [1–2 sentence explanation]

Industries Affected:  
1. [Industry] – [Why it’s affected]  
2. [Industry] – [Why it’s affected]  
3. [Industry] – [Why it’s affected]

Relevant Tags:  
[tag1], [tag2], [tag3], [tag4], [tag5]

Reports:  
- Full News List (Google Sheets): [Paste Google Sheet link here]  
- Full Summary Report (Google Docs): [Paste Google Doc link here]

Constraints & Style:
    Use clear, concise, and professional language
    Do not fabricate news or headlines
    Avoid repetition or vague statements
    Final output should be automation-friendly (structured, consistent, and clean)
Enter fullscreen mode Exit fullscreen mode

Second, turn on the Connections on RunnerH

Feeling confused? 😵 It's okay - take a deep breath, let's break down what this prompt does. This prompt is mainly structured into 6 key components:

1. Make a context

You are a News Intelligence AI Agent
Your task is to analyze recent news about a specific topic (Donald Trump) from the past 3 months, classify sentiment, and deliver structured insights through Google Sheets, Google Docs, and Gmail.
Instructions (Step-by-Step Workflow):
Enter fullscreen mode Exit fullscreen mode

Before we get into the technical details, it's important to give clear context, so RunnerH knows exactly what to do and doesn't stray from the goal.

2. Scraping all the way, lets go! 🕷️

RunnerH collects news articles from the past 72 hours based on a specific topic. Here briefly the prompt

News Collection:
    Search trusted sources (e.g., Google News, CNN, CNBC, Bloomberg, NYTimes) for relevant news about Donald Trump.
    Collect 10 news articles in past 72 hours (3 days)
Enter fullscreen mode Exit fullscreen mode

This is the most interesting part, it's called a Web Browsing Preview (that's what it's called in RunnerH), which launches a live browser session to perform real-time news scraping right on the spot. That means RunnerH doesn't just rely on static data - it actively browses the web like a human and pulls in the freshest news as soon as you run it.

Check out how RunnerH scrapes news through this link👇🏻
https://runner.hcompany.ai/browsing-view/3359347b-aec9-47aa-9b66-e844dcda5104

Great job, RunnerH! I’ve never seen anything like this in any AI agent before. Now, let’s walk through each step again to see how magically RunnerH handles the entire task.

3. Extract and Sentiment Analysis⚙️

Now, RunnerH perform cleans and structures raw data by extracting the article title, content, link, and publication time, after that RunnerH analyzes the emotional tone of each article (Positive, Neutral, or Negative) using their magically LLM-NLP techniques

For each article, extract the following fields:
| Title | Source | Date | Sentiment | Summary | Justification | URL |
    Title: Article headline
    Source: Publisher (e.g., CNN)
    Date: Date of publication
    Summary: 2–3 sentence summary
    Sentiment: Positive ✅ / Neutral ⚪️ / Negative 🚩
    Justification: Brief quote or reason
    URL: Full article link
Enter fullscreen mode Exit fullscreen mode

For the next step, this table will be saved to Google Sheets.

4. Save to Google Sheets 🔗

Lana needs organized news!, so RunnerH save all structured and analyzed news data into a Google Sheet for organized viewing and filtering.
Donald Trump Newest News Generated by RunnerH

5. Save to Google Docs📰

Lana realized that her team needed a fully summarized report, as the Google Sheet alone wasn’t enough. so RunnerH generates a one-page narrative summary of insights and saves it to Google Docs for documentation or sharing.

Donald Trump Sentiment Analysis Generated by RunnerH

6. Send Daily Report to Gmail🕒

For the daily report, RunnerH automatically sends a formatted daily email containing a headline summary, sentiment overview, key impacts, and links to the full reports.

GMAIL NOTIFICATION (to email@gmail.com)
Subject:
Today's News: What's happening with Donald Trump?
Body:
Headline Summary  
What's the buzz around Donald Trump today? Let's take a look 👇🏻  
[One-paragraph summary of 2–4 top news stories]
...
Enter fullscreen mode Exit fullscreen mode

Use Case & Impact

Here's top real-world applications that can be implemented

  1. Cyrpto, Financial and Investment Firms 💸
    Monitor sentiment around public figures (e.g., Donald Trump) to predict market reactions or public policy impacts. Enables real-time portfolio adjustment based on political sentiment.

  2. Reputation Brand and Management Agencies ✅
    We can track client mentions and public sentiment to craft responsive strategies React faster to potential reputation risks or capitalize on positive momentum.

  3. Media and Journalism 📰
    Using RunnerH we can quickly aggregate and summarize trending news about key individuals, so we possible to saves editorial time and improves content accuracy and relevance.

  4. Government and Political Analysts 🏛️
    Monitor public perception of political figures to inform policy communication or campaign strategy. Offers data-driven insights for more effective political messaging.

Social Love

Check my twitter thread below!

Top comments (0)