Skip to content
TriedPrompts

More in Dashboards & reporting.

Automate a daily analytics summary to Slack with Claude Code

Claude Code set up a GitHub Actions job that pulls PostHog data at 8 a.m., summarizes it and posts to Slack; it worked the next day.

Result: WorkedTool: Claude CodeLevel: AdvancedSetup: Needs GitHub

Copy the prompt

Outcome

Claude Code set up a GitHub Actions cron that pulls PostHog data at 8 a.m., summarizes it in Python and posts to Slack; the first report arrived the next morning. The poster, a non-technical startup founder, used to check analytics by hand every morning. Claude Code first offered a Claude Code cron job or a macOS Launch Agent, both running on the laptop; when the poster asked what would happen if the laptop was off, it suggested GitHub Actions, which runs scheduled Python scripts in the cloud for free, Slack webhooks to post to the right channel, and GitHub's built-in secrets for the API keys. The poster set it up in one evening by going back and forth with Claude Code, without talking to a developer or analyst.

Evidence: Described by posterThe person describes what happened in words, without screenshots or video.

WorkedEvidence: Described by posterPosted Last checked

Level: Advanced. You need: A tool that takes actions for you or writes code, connected accounts, or some setup on your computer.

How to use this

  1. Tap Copy prompt.
  2. Open the tool the case used (or a similar one) and paste the prompt; results may differ from the original.
  3. Paste it into the message box.
  4. Send it, then read the answer before acting on it.
New to this? What's a prompt?

A prompt is the message you send to the AI tool. Copy the one on this page, put your own details where it asks, and read the answer before you act on it.

Prompt

Recreated prompt

The source didn't share its exact prompt, so we wrote one from what it describes. The result shown is the source's, not ours.

What the prompt labels mean

The person didn't share their exact words, so we wrote this from what they described. We haven't tested it, and they didn't use this exact version.

Here's a task I'd like your help with. Read it all the way through before you start.

Goal: Automate my morning analytics check: every day at 8 a.m., pull yesterday's PostHog numbers, summarize them and post the summary to Slack.

Check with me first: Should it run even when my laptop is off?

What I'll give you:
- Access to my PostHog data (an API key)
- The Slack channel or DM where the summary should go
- A GitHub account if I want it to run in the cloud

Rules:
- Explain the options for running it on a schedule before setting anything up.
- Store keys safely (for example in GitHub's built-in secrets) and never put them in the code.
- If something is missing or unclear, ask me instead of guessing.
- Stop once it's set up, and let the first run confirm it works.

Output: The working setup, plus plain-language steps for how it runs and how to change it.

You'll know it worked when: the summary shows up in Slack the next morning without me doing anything.

Try this in:

Sends the Recreated prompt shown above. ChatGPT and Grok open with it filled in, and ChatGPT may send it straight away. Gemini and Claude open empty, so we copy the prompt for you to paste. Every button also copies it.

The source used Claude Code, which can take actions on your computer or in a browser. These are general chat tools, so results may differ, and a normal chat may only give you a plan.

Opens in a new tab. We don't see what you send.

These links are only a shortcut. We're not affiliated with OpenAI, Google, Anthropic or xAI, and your results may not match the source.

Optional stronger version

Our rewrite with extra checks. The poster didn't test it.

Here's a task I'd like your help with. Read it all the way through before you start.

Goal: Every day at 8 a.m., pull yesterday's PostHog numbers, summarize them and post to Slack.

Quick check first: tell me if anything below is missing or unclear.

Inputs (fill in or confirm):
- PostHog API key
- Slack channel
- Metrics to include
- Where it runs
- Time zone for '8 a.m.' and 'yesterday'

Rules:
- Store keys as secrets, never in code.
- Compare with the previous day and 7-day average.
- Keep the Slack message short with links.
- Alert on failures.
- Keep the script idempotent so a rerun doesn't post twice.
- Log each run's status and numbers.
- Make the metrics list easy to edit in one config file.
- Post a test message to a private channel first.
- Log errors and post a short failure notice if a pull fails.

Checkpoint: Test in a private channel first.

If you get stuck: If the API fails, post an error note instead of silence. If a login, CAPTCHA or two-step code appears, stop and ask me to handle it; never guess or store passwords.

Verify before you finish: Check numbers against PostHog's dashboard.

Output: Script, schedule config and sample message.

Done when: a correct summary appears in Slack daily.

AI tool

Claude Code

Source

Posted
by Pranav Date (@PranavDate)
Last checked
Method:
How we verify

https://x.com/PranavDate/status/2031210925806530779

Tell us how it went A reader message. It is not published on this page, and it is not a test of the prompt.

More in Dashboards & reporting

More in DataRandom case in Data