How somyajangir/linkedin-substack-agent works
This is a Streamlit workflow that turns a LinkedIn post into an editable Substack article, publishes it, and emails the live link. The UI runs scraper, publisher, and email scripts as subprocesses; generation is called directly. The README documents human review and the external integrations. The graph follows those documented stages and the shown calls; it does not infer unshown browser or service wiring.
Main entry points: app.py Streamlit UI · generation_agent.py Article generation · substack_publisher.py Substack publisher · run_scraper.py Scraper runner
Components 16
Workflow and review
- Streamlit UI
app.py - Edit and preview
app.py
Content processing
- Scraped post data
data/sample_post.json - LinkedIn scraper
services/linkedin_scraper.py - Article generation
agents/generation_agent.py - Rewrite prompt
utils/prompts.py
Publishing and delivery
- Substack publisher
services/substack_publisher.py - Email service
services/email_service.py
Workflow commands
- Scraper runner
scripts/run_scraper.py - Publisher runner
scripts/run_publisher.py - Email runner
scripts/run_email.py
Other components
- User
- Groq LLM
- Substack and Chrome
- Gmail SMTP
Connections 19
- User → Streamlit UI: enters URL
README.md - Streamlit UI → Scraper runner: runs scraper
app.py - Scraper runner → LinkedIn scraper: calls
scripts/run_scraper.py - LinkedIn scraper → LinkedIn: scrapes post
README.md - Scraper runner → Scraped post data: writes JSON
scripts/run_scraper.py - Streamlit UI → Scraped post data: reads JSON
app.py - Streamlit UI → Article generation: requests rewrite
app.py - Article generation → Rewrite prompt: builds prompt
agents/generation_agent.py - Article generation → Groq LLM: requests completion
README.md - Article generation → Streamlit UI: returns draft
app.py - Streamlit UI → Edit and preview: shows draft
app.py - Edit and preview → User: accepts edits
README.md - Streamlit UI → Publisher runner: runs publisher
app.py - Publisher runner → Substack publisher: calls
scripts/run_publisher.py - Substack publisher → Substack and Chrome: publishes article
services/substack_publisher.py - Substack publisher → Publisher runner: returns live link
scripts/run_publisher.py - Streamlit UI → Email runner: runs email
app.py - Email runner → Email service: calls
scripts/run_email.py - Email service → Gmail SMTP: sends confirmation
services/email_service.py