Build a Daily Intelligence Digest Agent with GitHub Actions
Set up an automated daily intelligence briefing agent using GitHub Actions and the Polaris API. Runs free, delivers to Slack every morning.
Every morning at 8am, this agent checks Polaris for the top stories across your chosen verticals, formats a digest, and sends it to Slack. Total setup time: 10 minutes. Cost: free.
What You'll Build
A GitHub Action that runs on a cron schedule, calls the Polaris API, and posts a formatted digest to your Slack channel.
Step 1
Create a GitHub Repository
Create a new repo (or use an existing one). Add two files:
.github/workflows/news-digest.yml
name: Daily News Digest
on:
schedule:
- cron: '0 13 * * *' # 8am EST / 1pm UTC
workflow_dispatch: # manual trigger for testing
jobs:
digest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- run: pip install polaris-news requests
- run: python digest.py
env:
POLARIS_API_KEY: ${{ secrets.POLARIS_API_KEY }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}digest.py
import os
import json
import requests
from polaris_news import PolarisClient
client = PolarisClient(api_key=os.environ["POLARIS_API_KEY"])
slack_url = os.environ["SLACK_WEBHOOK_URL"]
# Get top briefs from your chosen categories
categories = ["markets", "crypto", "defense", "tech"]
all_briefs = []
for cat in categories:
feed = client.feed(category=cat, per_page=3)
for brief in feed.briefs:
if brief.confidence >= 0.75:
all_briefs.append(brief)
# Sort by confidence
all_briefs.sort(key=lambda b: b.confidence, reverse=True)
# Format for Slack
blocks = [
{
"type": "header",
"text": {"type": "plain_text", "text": "Morning Intelligence Briefing"}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": f"*{len(all_briefs)} high-confidence briefs "
f"across {len(categories)} verticals*"
}
},
{"type": "divider"}
]
for brief in all_briefs[:10]:
blocks.append({
"type": "section",
"text": {
"type": "mrkdwn",
"text": (
f"*<https://thepolarisreport.com/brief/{brief.id}"
f"|{brief.headline}>*\n"
f"Confidence: {brief.confidence:.0%} · "
f"Bias: {brief.bias_score} · "
f"Sources: {brief.source_count} · "
f"_{brief.category}_"
)
}
})
# Send to Slack
requests.post(slack_url, json={"blocks": blocks})
print(f"Sent {len(all_briefs)} briefs to Slack")Step 2
Add Secrets
In your GitHub repo: Settings → Secrets → Actions → New repository secret
- POLARIS_API_KEY — Get one free at thepolarisreport.com/developers
- SLACK_WEBHOOK_URL — Create at api.slack.com/messaging/webhooks
Step 3
Test It
Go to Actions → Daily News Digest → Run workflow. You should see a formatted briefing in your Slack channel within 30 seconds.
Customize It
Change categories
Edit the categories list. Choose from: markets, crypto, politics, defense, space, climate, cyber, biotech, energy, startups, real-estate, sports, science, health, policy, world, entertainment, tech.
Change confidence threshold
Raise 0.75 to 0.9 for only the highest-confidence briefs.
Change schedule
Edit the cron expression. 0 13 * * 1-5 runs weekdays only.
Add trending entities
trending = client.trending_entities(limit=5)
blocks.append({"type": "divider"})
blocks.append({
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Trending Entities*\n" + "\n".join(
f"• {e.name} ({e.type}) — {e.mentions_24h} mentions"
for e in trending
)
}
})Cost
The free tier gives you 1,000 API calls/month. This workflow uses ~120 calls/month (4 categories × 1 call × 30 days). You'll never hit the limit.