DEV Community

Michalis Solomou
Michalis Solomou

Posted on

A Daily Email Digest of Newly Funded Companies with Python and Cron

I don't want to check a dashboard every morning for new funding rounds. I want it in my inbox before coffee. Here's a small Python script + cron job that does exactly that, using the same SEC EDGAR pipeline from an earlier post.

The script

import smtplib
import requests
from email.mime.text import MIMEText
from datetime import date

def get_yesterdays_filings():
    resp = requests.get(
        "https://efts.sec.gov/LATEST/search-index",
        params={"forms": "D", "dateRange": "custom"},
        headers={"User-Agent": "research example@example.com"},    )
    resp.raise_for_status()
    hits = resp.json().get("hits", {}).get("hits", [])
    return [h["_source"] for h in hits]


def build_digest(filings):
    if not filings:
        return "No new Form D filings yesterday."
    lines = [f"{len(filings)} new Form D filings — {date.today()}\n"]
    for f in filings[:20]:
        name = f.get("display_names", ["Unknown"])[0]
        lines.append(f"- {name}")
    return "\n".join(lines)


def send_email(body, to_addr):
    msg = MIMEText(body)
    msg["Subject"] = f"Funding digest — {date.today()}"
    msg["From"] = "digest@yourdomain.com"    msg["To"] = to_addr

    with smtplib.SMTP("smtp.yourprovider.com", 587) as server:
        server.starttls()
        server.login("digest@yourdomain.com", "your-app-password")
        server.send_message(msg)


if __name__ == "__main__":
    filings = get_yesterdays_filings()
    digest = build_digest(filings)
    send_email(digest, "you@yourdomain.com")```
{% endraw %}
## Scheduling it

Add this to your crontab ({% raw %}`crontab -e`{% endraw %}) to run it every weekday morning at 7am:
{% raw %}


Enter fullscreen mode Exit fullscreen mode

0 7 * * 1-5 /usr/bin/python3 /path/to/digest.py >> /var/log/funding-digest.log 2>&1


yaml

If you don't have a server sitting around, a free-tier GitHub Actions scheduled workflow works just as well and skips the "what if my laptop is asleep" problem:



```yaml
name: Daily Funding Digest
on:
  schedule:
    - cron: '0 12 * * 1-5'  # UTC time
jobs:
  send-digest:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4      - run: pip install requests
      - run: python digest.py
        env:
          SMTP_PASSWORD: ${{ secrets.SMTP_PASSWORD }}
Enter fullscreen mode Exit fullscreen mode

What's missing from this bare-bones version

This gets you a working digest, but it's not a lead list yet:

  • No filtering. You'll get every filing, every industry, every state — see my post on filtering by industry and state to narrow it down before it hits the email.
  • No dedup across amendment filings. Companies sometimes file a Form D and then a Form D/A (amendment) days later, which will show up as a second, near-identical entry.
  • No ranking. A $200K friends-and-family round and a $50M Series B look identical in this script — you'll want to sort by offering amount at minimum.

I ended up building Funding Signals mostly to solve the filtering and dedup problem — it exposes a REST API you can hit from the same digest script instead of hitting raw EDGAR, already deduped and scored. The free /v1/sample endpoint returns the same shape of data if you want to swap it in.

Either way, the point stands: a 40-line script and a cron job beats checking a dashboard every day.

Top comments (0)