Automate a repetitive workflow
Always add a dry-run flag — automations silently corrupting data is the #1 failure mode.
by @whitney · recommended tool Claude Code · 0 unlocks
0
You'll need
CONNECTORS
Google Drive
EXAMPLES · WHAT THIS PROMPT PRODUCES
Sample output
**Automated: weekly competitor-pricing scrape → Google Sheet → Slack alert** Replaced the manual Monday routine (open 8 competitor product pages, copy prices into a sheet, eyeball changes, message the team). **How it works:** - **Trigger:** runs every Monday 7:00am ET via a cron schedule (also runnable on-demand). - **Inputs:** a `competitors.json` config listing 8 product URLs + CSS selectors for the price element. - **Process:** fetches each page, extracts the price, compares against last week's stored snapshot. - **Outputs:** appends a timestamped row to the Google Sheet (one column per competitor) and posts a Slack message — but only when a price actually changed, e.g. "⚠️ Acme dropped Pro from $49 → $39 (-20%)." **Stack:** TypeScript (Node), `cheerio` for parsing, `googleapis` for Sheets, Slack webhook. **Reliability features built in:** - **`--dry-run` flag** — runs the full scrape and prints what it *would* write/post, touching nothing. Use this after any selector change. - **Error handling** — per-URL try/catch; one dead page logs a warning and continues instead of killing the run. - **Logging** — every run writes to `logs/scrape-YYYY-MM-DD.log` with rows fetched, changes detected, and any failures. Included a README with the cron setup and where to drop the Google service-account key.
PRICE HISTORY0 cr · current
PROMPT TEMPLATE · v1.0.0
Automate this workflow: <DESCRIBE_CURRENT_MANUAL_STEPS>. Trigger: <WHEN>. Inputs: <WHERE_FROM>. Outputs: <WHERE_TO>. Stack: Python / TypeScript script, run on <SCHEDULE or EVENT>. Include: error handling, logging, dry-run mode.
RESULTS · WHAT PEOPLE GOT
0Sign in to show colleagues what this case produced.
No results posted yet. Used this case? Show colleagues what it produced.
DISCUSSION
0 commentsSign in to join the conversation.
No comments yet — be the first.
MORE LIKE THIS