Digital product · Service design

Club Slack API integration

A team challenge engine that lives inside Slack, built to run for free.

Three of the Lagh Leaderboards bot’s Slack screens standing on a dark floor: the New challenge form, one challenge in the Home tab with its charts, and the Friday digest with its squad board.

At a glance

Role
Product owner and designer, building with Claude Code
Team
Solo, with Claude Code writing the code
Tools
Slack (Bolt for JavaScript, TypeScript), Firebase Cloud Functions, Firestore, Google Cloud Billing, Claude Code
Timeline
June–July 2026
Status
Live in Ranelagh Ultimate’s Slack since late June 2026

What it shows

  • Product decisions under hard limits: free, self-reported, Slack’s free plan
  • Designing for zero running cost, and proving it
  • One flexible challenge model instead of hard-coded types
  • Reworks driven by real use
  • Phase-by-phase testing and a stress test

Highlights

  • Free to run, held by four layers of cost protection
  • 316 ms median response in a 150-request stress test (Slack allows 3 seconds)
  • ~1% of the free daily quota used by a whole day of deploys and tests

Discover

Lagh Leaderboards runs team challenges for my club, Ranelagh Ultimate, inside the club’s Slack. Anyone can set up a challenge. Members log progress with a button and a short form. The bot keeps the leaderboards, posts updates, sends a Friday digest and sums up each challenge when it ends.

I play Ultimate for club and country, and represented Ireland in 2025. Before the bot, members just posted photos and comments in Slack.

How it came together

7 steps · 8 reworks · 2 milestones

  • Step
  • Rework: went back and changed something
  • Milestone
  1. 1Plan2 steps
  2. 2Build3 steps · 3 reworks
  3. 3Make it free, then launch2 steps · 3 reworks · 1 milestone
  4. 4Real use2 reworks · 1 milestone
  1. 1Plan23 June 2026

    1. Step 01

      Limits and decisions

      Free, self-reported, and built around Slack’s free plan.

    2. Step 02

      Proving the connection

      A /ping command, answered from my laptop.

      Reworked later in09

  2. 2Build23–24 June

    1. Step 03

      The core: create, log, leaderboard

      A form to set up a challenge, a form to log progress, and a leaderboard.

      Reworked later in04,11,12,15,16

    2. Rework 04

      Managing and deleting challenges

      Back to 03: The core: create, log, leaderboard

      An admin list to post, edit, archive and delete.

      Why: An accidental duplicate challenge showed there was no way to tidy up.

    3. Step 05

      The dashboard and scheduled posts

      A personal dashboard in the Home tab, and scheduled updates.

      Reworked later in06

    4. Rework 06

      Reactions taken out of the dashboard

      Back to 05: The dashboard and scheduled posts

      A cheer button went through two versions, then was removed.

      Why: Slack can’t show its emoji picker inside the Home tab.

    5. Step 07

      Feature batches, each tested in Slack

      Squads, streaks, My stats and milestone celebrations.

      Reworked later in08

    6. Rework 08

      An emoji diet

      Back to 07: Feature batches, each tested in Slack

      Far fewer emoji, plus the club’s badge and five custom ones.

      Why: Heavy emoji felt tacky, and the club needed to take the bot seriously.

  3. 3Make it free, then launch23–25 June

    1. Rework 09

      Hosting rethought, twice

      Back to 02: Proving the connection

      Laptop, then an always-on machine, then cloud functions that are free by design.

      Why: It had to stay free with my laptop off.

    2. Step 1024–25 June

      Four layers of cost protection

      A usage meter, capped copies, a budget alert and a kill switch.

    3. Rework 11

      Answer first, work later

      Back to 03: The core: create, log, leaderboard

      The bot answers at once and works in the background.

      Why: Slack allows 3 seconds. Doing all the work first caused errors and duplicate posts.

    4. Rework 1225 June

      Every log made cheap

      Back to 03: The core: create, log, leaderboard

      A flat 6 writes and 4 reads per log: room for 2,500–3,000 logs a day.

      Why: At first the free database reads would have run out at around 200 logs a day.

    5. Step 1325 June

      Stress test and kill switch drill

      150 requests answered in under half a second, and billing really switched off.

    6. Milestone 1425–28 June

      Into the club’s Slack

      Moved from my test workspace.

  4. 4Real use28 June – 7 July

    1. Rework 1528 June

      Logs posted by the bot, led by the member’s name

      Back to 03: The core: create, log, leaderboard

      Four fixes in under an hour. Photos are no longer stored.

      Why: Posting as the member fell back to an anonymous post, and only a bot post can show a private photo.

    2. Rework 166–7 July

      Challenges stay open past 100%

      Back to 03: The core: create, log, leaderboard

      It runs to its end date, and the bar turns gold past 100%.

      Why: Hitting the target shouldn’t end the challenge.

    3. Milestone 17July 2026

      Reviewed and refined

      A review from four angles found five problems, all fixed.

Define

The limits

  • Free. No budget, so it had to run on free tiers and stay there.
  • Trust, not proof. Progress is self-reported, and every challenge says so.
  • Slack’s free plan. Only 90 days of history and no Workflow Builder, so the bot’s own database is the record.
  • No admin access at first. I built it in my own workspace, then moved it to the club’s.

One challenge model, not many

Three choices make up any challenge, so new kinds need no new code.

  • How each log counts+1, a number (like hours or kilometres), or interval sprints.
  • Who it tracksIndividuals, or one pool for the whole team.
  • The targetNone, one per person, or one for the whole team.

The Slack screens on this page run the bot’s own code with made-up members, so no real member appears.

Design

How the system works

In Slack

  • Club membersSlash commands, buttons and forms
  • Channel posts and messagesLogs, updates, digests and celebrations
  • The Home tabEach member’s own dashboard

Google Cloud (free tier)

  • Request handlerChecks Slack’s signature and answers within 3 seconds
  • Background workerPosts, milestones and dashboards
  • SchedulerEvery 15 minutes: updates, digests and summaries
  • FirestoreThe record: challenges, logs, streaks and squads

Safeguards and extras

  • QuickChartDraws the charts from numbers only, never names
  • Usage meterPauses the bot before a free daily limit
  • Budget and kill switchAn alert, then billing switched off

How it flows

  1. A member logs progress. Slack sends a signed request to the handler.
  2. The handler saves the log and running total in one write, and answers straight away.
  3. The background worker posts to the channel, checks milestones and refreshes dashboards.
  4. Every 15 minutes the scheduler sends any updates, digests and summaries due.
  5. Near a free daily limit, the bot pauses and tells me.
Slack is the interface, Firestore is the record, and safeguards keep it free.

Logging progress

A log is the amount, plus an optional note and photo. Photos are posted to the channel but never stored.

The channel post leads with the member’s name, then the note and the team’s progress.

Leaderboards and the dashboard

Each member’s Home tab shows their challenges, charts, 14 days of activity and whether the team is on track. Squads are hand-picked teams that can be reused.

The call-outs have gone down well. Nudging a teammate used to mean putting your name to it, so people didn’t. Now the nudge is anonymous and comes from the bot, which takes the harshness out.

Celebrations and scheduled posts

The bot celebrates 25%, 50% and 75% of a target and the moment it’s reached. Every Friday a digest shouts out the top performer. The day after a challenge ends, a final summary closes it.

A milestone: the team passes 75%.
The Friday digest: progress, the squad board and the top performer.
The final summary. Past 100%, the bar turns gold.

A light brand

The club’s winged-R badge became the bot’s icon, and five custom emoji replaced Slack’s, each with one job. They stay clear in Slack’s light and dark themes.

Emoji When the bot uses it
A light-blue flag on a dark-blue pole A new challenge is posted
Three rising bars, the first dark blue The team passes 25%, 50% or 75% of its target, and the weekly digest
A white tick in a light-blue circle A member reaches their own target
A light-blue flame with a white centre A member’s daily streak, and who put in the most work each week
A light-blue trophy on a dark-blue base The team reaches its target, and the winning squad when a challenge ends
The bot’s icon: the club’s winged-R badge.

Deliver

Running it for free

The bot had to be free to run. Google Cloud needs a card and has no hard spending cap, so “free” had to be designed in, then proven.

7 steps · 3 reworks · 1 milestone

  • Step
  • Rework: went back and changed something
  • Milestone
  1. 1Decide1 step · 1 rework
  2. 2Safeguards first2 steps
  3. 3Prove it2 steps · 1 rework · 1 milestone
  4. 4Watch the bill2 steps · 1 rework
  1. 1Decide23 June 2026

    1. Step 01

      Hosting under the free rule

      Pay-as-you-go needs a card, so the first plan was an always-on machine I own.

      Reworked later in02

    2. Rework 02

      Free by design instead

      Back to 01: Hosting under the free rule

      Pay-as-you-go, with safeguards tested before billing was switched on.

      Why: A cost walkthrough showed everything fitting in the free tier, and only cloud functions run with my laptop off.

  2. 2Safeguards first24 June

    1. Step 03

      Four layers agreed

      The first layer, a usage meter, was my idea.

    2. Step 04

      The cloud version built and tested

      The Slack entry point, secrets, a scheduled function and the meter.

      Reworked later in11

  3. 3Prove it24–25 June

    1. Step 05

      The kill switch drill

      Test alerts sent under budget, then over budget.

      Reworked later in06

    2. Rework 06

      A silent failure, fixed

      Back to 05: The kill switch drill

      Fixed and rerun: billing really switched off.

      Why: Over budget, it fired but couldn’t switch billing off: the Cloud Billing service wasn’t enabled.

    3. Step 07

      The stress test

      150 signed requests, all answered in under half a second.

    4. Milestone 0825 June

      Live, and the laptop retired

  4. 4Watch the bill25 June – 7 July

    1. Step 0925 June

      The scheduler slowed to every 15 minutes

      About 96 runs a day instead of 288.

    2. Step 106 July

      The 1-cent question

      A charge of about a cent a day turned up. The billing report showed the free tier covering it.

    3. Rework 117 July

      The meter’s blind spot fixed

      Back to 04: The cloud version built and tested

      Usage is now recorded on every path.

      Why: Early exits in the background job skipped recording usage, so the meter could under-count.

Option Catch Outcome
My laptop, over Socket Mode Stops when the laptop does Used while building
An always-on machine I own Needs a process manager and restarts The first plan
Free cloud hosts Need a card, or sleep when idle Ruled out
Cloudflare Workers The Slack and Firebase libraries won’t run there Ruled out
Socket Mode on a cloud server Can’t scale to zero, so never free Ruled out
Cloud Functions, pay-as-you-go Needs a card, but scales to zero Chosen
  • Layer 0: a meter that pauses firstMy idea. Every database read, write and delete is counted. At 75% of a free daily limit the bot pauses, then resumes when the quota resets.
  • Layer 1: lean code and capped copiesAt most 10 copies of the request handler and one of the scheduler, so a bug can’t multiply.
  • Layer 2: a budget alertEmails me at about a cent.
  • Layer 3: a kill switchOver budget, a function switches billing off. Turning it back on is my decision.
  1. Budget alertGoogle Cloud sends the budget’s status
  2. The kill switch checksIt acts only if actual cost is over budget
  3. Billing switched offThe bot stops
  4. I decideRe-link billing, and the functions resume

I chose “pause, don’t pay”: a stopped bot is better than a bill.

Running totals made each log cost the same, whatever the challenge size.

  • ~200Logs a day before the free reads ran out, at first
  • 6 + 4Writes and reads per log, whatever the challenge size
  • 2,500–3,000Logs a day now, before the meter pauses
  • 150 / 150Requests succeeded, at about 60 a second
  • 316 msMedian response. Slack allows 3 seconds
  • ~1%Of the free daily quota, for the whole day of deploys and tests

So far, the bill is still at zero.

Testing it, phase by phase

I tested every phase in Slack before approving the next. In July, a review from four angles found five problems, all fixed.

Outcome

The bot moved into Ranelagh Ultimate’s Slack at the end of June 2026, and it’s still running there, free.

The real Home tab in October 2026, with two “Road to Euros” challenges running.

The club has about 40 members in its Slack. Use follows the season: at its busiest, in September 2026, members added up to 8 logs a day.

Live from the bot

These numbers come straight from the bot, rebuilt every hour. Only totals leave the bot: no names, Slack IDs, messages or photos, and the leaderboard shows ranks, not players.

Loading live numbers…

Totals only. No names, messages or photos leave the bot.

What’s next?

  • The five emoji in the club’s workspace, so members stop seeing codes like “:lagh_streak:”.
  • A backup. The code exists only on my Mac, so it needs a private online repository.
  • Leaders’ controls. Right now anyone can edit or delete a challenge.
  • Engagement stats and a history of finished challenges.
  • Other clubs. For now it’s for Ranelagh only.