How rockroman/slack_automation works
Project type and purpose
• This is a lightweight Python-script automation project that integrates with Slack and Google Sheets, persists state in JSON, and will eventually incorporate an LLM.
• From the README “plan” we know it will run on a schedule (via GitHub Actions), fetch Slack data, update sheets, handle timestamps, revisit or flag unresolved issues, and later add LLM features.
File structure
Top-level artifacts:
• Python entry points & logic:
• extract_from_link.py – pulls URLs or resources from Slack messages
• refactored_slack.py – core Slack-API integration
• revisit_issue.py & unresolved_issues.py – logic around unresolved items
• sheet_auto.py – Google Sheets integration
• timestap_utils.py – timestamp read/write helpers
• State storage:
• last_timestamp.json – last run marker
• unresolved.json – persisted list of open or pending items
• CI/CD / scheduling:
• .github/workflows/slack_actions.yml – triggers these scripts on a schedule
• Requirements.txt – Python dependencies
README for additional insights
• The README confirms development milestones: basic automation, timestamp fixes, scaling date ranges, scheduling via GitHub, and LLM integration as future work.
Components
a. Main components:
1. Scheduler (GitHub Actions cron job)
2. Orchestrator script (could be a single script or entry point that calls sub-modules)
3. Slack API client
4. Local JSON storage (last_timestamp.json, unresolved.json)
5. Business-logic modules (extract_from_link, revisit_issue, unresolved_issues)
6. Google Sheets API client
7. (Future) LLM service
b. Relationships & data flows:
• Scheduler triggers the orchestrator on a fixed interval
• Orchestrator reads last_timestamp.json via timestap_utils → calls Slack API → retrieves new messages
• extract_from_link filters and extracts relevant links/issues → business logic modules process them → updates unresolved.json
• sheet_auto.py writes results/updates to Google Sheets
• timestap_utils writes the new last_timestamp back to JSON
• (Future) orchestrator sends unresolved items or context to the LLM service and receives enriched output
c. Architectural patterns/design principles:
• Modular scripting: each functional area is a separate Python module
• Persistence-as-JSON: lightweight state management
• CI-driven scheduling: no on-prem server required
• Clear separation between I/O (APIs), business logic, and storage
d. Key technologies/frameworks:
• Python 3.x
• Slack SDK / REST API
• Google Sheets API (via gspread or similar)
• GitHub Actions for scheduling
• JSON file storage
• Planned LLM API (e.g., OpenAI)
Detail
• How the timestamp fix loop runs after each invocation.