HomeTutorialsNew 1★ and 2★ App Store and Google Play reviews in Slack, every morning

Tutorial · Intermediate

New 1★ and 2★ App Store and Google Play reviews in Slack, every morning

Every morning, one Slack message with the new low-star reviews of your iOS and Android app, grouped by store, with the release each complaint is about. It is a single Python file on a GitHub Actions schedule, with no server and no database, because the actor remembers what it already returned. It costs a few cents a month.

20 minPython 3.11+GitHub ActionsSlack≈ $0.06 a month

What you get

One Slack message a day, and only on days with something new. The busiest app and store come first. Each review shows its stars, title, app version and a link; past five per group, the rest are counted and linked.

Built from a real run against WhatsApp; review texts shortened.

How it works

  1. GitHub ActionsStarts the job at 07:17 UTC.
  2. App Store Reviews ScraperRuns on Apify: both stores, 1–2★ only, new since the last run.
  3. review_digest.pyGroups the rows, drops repeats, builds the message.
  4. SlackOne webhook post, retried while Slack is busy.

Three decisions carry the whole design:

  • The actor keeps the state. With onlyNewSinceLastRun it remembers the newest review it returned for each app, store and country, in a named key-value store in your Apify account, and stops there on the next run. The script stores nothing, so it runs the same on GitHub Actions, cron or a serverless function.
  • Filtering happens at the source. minScore and maxScore drop 3–5★ reviews inside the actor, and you are not charged for them.
  • Money and time have ceilings. Every run starts with a spending cap and a timeout. The actor stops cleanly below the cap and says so in its summary rows.

Before you start

  • An Apify account (the free plan is enough) and an API token from Console → Settings → API & Integrations.
  • A Slack incoming webhook: create an app at api.slack.com/apps, turn on Incoming Webhooks and add one for your channel.
  • Your app identifiers. The App Store id is the number after id in the app's URL (id310633997); the Google Play package name is the id= parameter of its store URL (com.whatsapp).
  • To try it on your machine: Python 3.11+ and uv.

1Look at the data first

Before writing code, look at what comes back. This input asks for at most three 1–2★ reviews per store from the US storefronts, well inside the 50 free reviews every account gets each month:

try-input.jsonJSONDownload
{
  "apps": [
    "https://apps.apple.com/us/app/whatsapp-messenger/id310633997",
    "com.whatsapp"
  ],
  "countries": ["us"],
  "minScore": 1,
  "maxScore": 2,
  "maxReviewsPerApp": 3
}

One synchronous call runs the actor and saves the dataset:

TerminalShell
API=https://api.apify.com/v2/actors/agentsgearbox~app-store-reviews-scraper
curl -s "$API/run-sync-get-dataset-items?maxTotalChargeUsd=0.05" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d @try-input.json -o sample.json

The rows come in four types. Here is one of each, trimmed to the fields that matter:

sample.json (trimmed)JSON
[
  {
    "type": "app",
    "store": "app-store",
    "appId": "310633997",
    "country": "us",
    "title": "WhatsApp Messenger",
    "score": 4.68,
    "ratings": 18830745,
    "version": "26.41.75",
    "updated": "2026-10-22T15:42:36Z"
  },
  {
    "type": "review",
    "store": "app-store",
    "appId": "310633997",
    "country": "us",
    "reviewId": "14701458845",
    "date": "2026-10-23T14:29:14.000Z",
    "score": 1,
    "title": "Bugs, account bans, and no customer support",
    "text": "My account crashed where I was unable to send or receive messages …",
    "appVersion": "26.41.75",
    "url": "https://apps.apple.com/us/app/id310633997?see-all=reviews",
    "source": "apple-feed"
  },
  {
    "type": "summary",
    "store": "app-store",
    "appId": "310633997",
    "country": "us",
    "status": "COMPLETE",
    "reviewsScraped": 3,
    "reviewsFilteredOut": 1,
    "averageScore": 1,
    "histogram": {"1": 3, "2": 0, "3": 0, "4": 0, "5": 0},
    "worstVersion": {"version": "26.41.75", "lowStarReviews": 3},
    "stoppedBy": "maxReviews",
    "checkpointUsed": null,
    "stuckPages": []
  },
  {
    "type": "error",
    "store": "app-store",
    "appId": "999999999",
    "country": "de",
    "error": "app not found in this country's App Store"
  }
]
  • review is the review itself. appVersion tells you which release the complaint is about; on Google Play, url links straight to the review.
  • app comes once per app and storefront, with the current rating and version. It is optional (includeAppDetails) and costs the same as a review.
  • summary is free, one per app and storefront: how many reviews matched, how many the star filter dropped, and why the walk stopped (stoppedBy: checkpoint, maxReviews, chargeLimit and so on).
  • error is free too. A missing app or an unknown storefront comes back as a row, not as a failed run, so one bad entry never costs you the whole digest.
Gotcha

Google Play answers by language, not by storefront. Ask for us and gb and you get the same English reviews twice: in our test run, all 40 review IDs matched. App Store storefronts really do differ. The script therefore groups Google Play reviews per language and drops repeats by review ID.

2The script

Save it as review_digest.py at the root of the repository that will run it, then change RUN_INPUT to your apps and storefronts. The dependency is declared inline (PEP 723), so uv run review_digest.py needs no virtualenv and no requirements file.

review_digest.pyPythonDownload
#!/usr/bin/env python3
# /// script
# requires-python = ">=3.11"
# dependencies = ["apify-client>=3.3,<4"]
# ///
"""Post new 1- and 2-star App Store and Google Play reviews to Slack.

Runs agentsgearbox/app-store-reviews-scraper on Apify. The actor keeps a checkpoint
per app, store and country in a key-value store in your Apify account, so each run
returns only reviews it has not returned before and this script keeps no state.
Schedule it once a day.

Environment:
  APIFY_TOKEN        Apify API token (Console > Settings > API & Integrations)
  SLACK_WEBHOOK_URL  Slack incoming webhook
  DRY_RUN=1          print the Slack messages instead of posting them
  REPLAY_RUN_ID=...  format an earlier run again instead of starting a new one
"""
import json
import os
import sys
import time
import urllib.error
import urllib.request
from collections import Counter, defaultdict
from datetime import timedelta
from decimal import Decimal

from apify_client import ApifyClient

ACTOR = "agentsgearbox/app-store-reviews-scraper"
RUN_INPUT = {
    "apps": [
        "https://apps.apple.com/us/app/whatsapp-messenger/id310633997",  # App Store
        "com.whatsapp",  # Google Play: package name or store URL
    ],
    "countries": ["us", "gb"],  # App Store storefronts to watch
    "language": "en",  # Google Play reviews come by language, not by storefront
    "minScore": 1,
    "maxScore": 2,
    "onlyNewSinceLastRun": True,
    "checkpointStoreName": "review-digest-whatsapp",  # one store per digest
    "reviewedAfter": "3d",  # first run or lost checkpoint: reach back 3 days at most
    "maxReviewsPerApp": 200,
    "includeAppDetails": True,  # one record per app and storefront: rating, version
}
MAX_CHARGE_USD = Decimal("0.50")  # hard cap per run; a normal day costs under a cent
QUOTED = 5  # reviews quoted per group; the rest are counted and linked
STORES = {"app-store": "App Store", "google-play": "Google Play"}
CONSOLE = "https://console.apify.com"


def fetch(client):
    """Starts the actor and waits, or loads an earlier run. Returns run and rows."""
    replay = os.environ.get("REPLAY_RUN_ID")
    if replay:
        run = client.run(replay).get()
    else:
        run = client.actor(ACTOR).call(
            run_input=RUN_INPUT,
            max_total_charge_usd=MAX_CHARGE_USD,
            run_timeout=timedelta(minutes=15),
        )
    if run is None:
        sys.exit(f"Run {replay} not found")
    if run.status != "SUCCEEDED":
        sys.exit(f"Actor run ended {run.status}: {run_url(run)}")
    return run, list(client.dataset(run.default_dataset_id).iterate_items(clean=True))


def run_url(run):
    return f"{CONSOLE}/actors/{run.act_id}/runs/{run.id}"


def scope(row):
    """App Store reviews differ per storefront. Google Play serves the same reviews to
    every storefront of a language, so a Play app gets one group per language."""
    if row.get("store") == "google-play":
        return "google-play", row.get("appId"), RUN_INPUT["language"]
    return row.get("store"), row.get("appId"), row.get("country")


def build_messages(run, rows):
    """Turns dataset rows into Slack Block Kit messages; [] when there is nothing new."""
    apps, summaries, problems, groups, seen = {}, {}, [], defaultdict(list), set()
    for row in rows:
        if row["type"] == "app":
            apps.setdefault(scope(row), row)
        elif row["type"] == "summary":
            summaries.setdefault(scope(row), row)
            problems += summary_problems(row)
        elif row["type"] == "error":
            store = STORES.get(row.get("store"), "Input")
            problems.append(f"{store} {row.get('appId')} ({row.get('country') or '-'}): "
                            f"{row['error']}")
        elif row["type"] == "review" and (row["store"], row["reviewId"]) not in seen:
            seen.add((row["store"], row["reviewId"]))  # Play repeats it per storefront
            groups[scope(row)].append(row)

    total = sum(len(reviews) for reviews in groups.values())
    if not total and not problems:
        return []
    noun = "review" if total == 1 else "reviews"
    header = [
        {"type": "header",
         "text": {"type": "plain_text", "text": f"{total} new 1–2★ {noun}"}},
        context(f"Since the last digest · <{run_url(run)}|Apify run>"),
    ]
    busiest_first = sorted(groups.items(), key=lambda item: -len(item[1]))
    sections = [group_blocks(key, reviews, apps.get(key, {}), summaries.get(key, {}), run)
                for key, reviews in busiest_first]
    if problems:  # a context block holds at most 10 elements
        notes = [mrkdwn("⚠️ " + esc(clip(p, 280))) for p in problems[:10]]
        sections.append([{"type": "context", "elements": notes}])
    return pack(header, sections, fallback=f"{total} new 1–2★ app {noun}")


def summary_problems(s):
    where = f"{STORES.get(s['store'], s['store'])} {s['appId']} ({s['country']})"
    if s.get("stoppedBy") == "chargeLimit":
        yield f"{where}: stopped at the ${MAX_CHARGE_USD} cap; raise MAX_CHARGE_USD"
    if s.get("stoppedBy") == "scanLimit":
        yield f"{where}: scan limit reached before the checkpoint; run more often"
    if s.get("stuckPages"):
        pages = ", ".join(map(str, s["stuckPages"]))
        yield f"{where}: Apple's feed skipped page(s) {pages}"


def group_blocks(key, reviews, app, summary, run):
    store, app_id, where = key
    place = f"{flag(where)} {where.upper()}" if store == "app-store" else f"· {where}"
    title = f"*{esc(app.get('title') or app_id)}* · {STORES[store]} {place}"
    if app.get("score"):
        title += f" · ★ {app['score']:.2f}"
    if app.get("version"):
        title += f" · v{esc(app['version'])}"
    facts = [f"{len(reviews)} new"]
    low, other = summary.get("reviewsScraped", 0), summary.get("reviewsFilteredOut", 0)
    if low + other:
        facts.append(f"{round(100 * low / (low + other))}% of all new reviews are 1–2★")
    versions = Counter(r["appVersion"] for r in reviews if r.get("appVersion"))
    if versions and versions.most_common(1)[0][1] > 1:
        version, count = versions.most_common(1)[0]
        facts.append(f"{count} on v{esc(version)}")
    blocks = [section(title), context(" · ".join(facts))]
    blocks += [section(review_text(r)) for r in reviews[:QUOTED]]
    if len(reviews) > QUOTED:
        dataset = f"{CONSOLE}/storage/datasets/{run.default_dataset_id}"
        more = len(reviews) - QUOTED
        blocks.append(context(f"+{more} more in the <{dataset}|run's dataset>"))
    return blocks


def review_text(r):
    score = int(r.get("score") or 0)
    head = "★" * score + "☆" * (5 - score)
    if r.get("title"):
        head += f"  *{esc(clip(r['title'], 120))}*"
    if r.get("appVersion"):
        head += f"  ·  v{esc(r['appVersion'])}"
    head += f"  ·  <{r['url']}|open>"
    body = clip((r.get("text") or "").strip(), 400)
    quote = "\n".join(f">{esc(line)}" for line in body.splitlines() if line.strip())
    return f"{head}\n{quote}" if quote else head


def pack(header, sections, fallback, limit=50):
    """Slack takes at most 50 blocks per message: split between groups, never inside."""
    messages, blocks = [], list(header)
    for part in sections:
        if len(blocks) + len(part) > limit:
            messages.append(blocks)
            blocks = []
        blocks += part
    messages.append(blocks)
    return [{"text": fallback, "blocks": b} for b in messages]


def post(webhook, message):
    """Posts one message. Retries rate limits, server errors and network failures."""
    data = json.dumps(message).encode()
    for attempt in range(4):
        request = urllib.request.Request(
            webhook, data=data, headers={"Content-Type": "application/json"}
        )
        try:
            with urllib.request.urlopen(request, timeout=30):
                return
        except urllib.error.HTTPError as e:
            if (e.code != 429 and e.code < 500) or attempt == 3:
                reason = e.read().decode()[:200]
                raise RuntimeError(f"Slack answered HTTP {e.code}: {reason}") from None
            time.sleep(int(e.headers.get("Retry-After") or 2**attempt))
        except urllib.error.URLError as e:
            if attempt == 3:
                raise RuntimeError(f"Slack unreachable: {e.reason}") from None
            time.sleep(2**attempt)


def section(text):
    return {"type": "section", "text": mrkdwn(text)}


def context(text):
    return {"type": "context", "elements": [mrkdwn(text)]}


def mrkdwn(text):
    return {"type": "mrkdwn", "text": text}


def esc(text):
    return str(text).replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")


def clip(text, limit):
    return text if len(text) <= limit else text[:limit].rsplit(" ", 1)[0] + " …"


def flag(country):
    if len(country or "") != 2:
        return ""
    return "".join(chr(0x1F1E6 + ord(c) - ord("a")) for c in country)


def main():
    token, webhook, dry_run = (os.environ.get(k) for k in
                               ("APIFY_TOKEN", "SLACK_WEBHOOK_URL", "DRY_RUN"))
    if not token or not (webhook or dry_run):  # checked before paying for a run
        sys.exit("Set APIFY_TOKEN and SLACK_WEBHOOK_URL (or DRY_RUN=1) first.")
    run, rows = fetch(ApifyClient(token))
    print(f"Apify run {run.id}: {len(rows)} rows", file=sys.stderr)  # for REPLAY_RUN_ID
    messages = build_messages(run, rows)
    if not messages:
        print("No new 1-2 star reviews since the last run.")
        return
    if dry_run:
        print(json.dumps(messages, ensure_ascii=False, indent=2))
        return
    try:
        for message in messages:
            post(webhook, message)
    except RuntimeError as e:
        sys.exit(f"{e}\nNothing is lost: rerun with REPLAY_RUN_ID={run.id} "
                 "once Slack accepts messages again.")
    print(f"Posted {len(messages)} message(s) from run {run.id}.")


if __name__ == "__main__":
    main()

The parts worth a second look

Starting the run. call() starts the actor and blocks until it finishes. The spending cap and the run timeout bound the worst case. Any status other than SUCCEEDED exits non-zero with a link to the run, so the scheduler marks the job failed and GitHub emails you.

review_digest.py · fetch()Python
def fetch(client):
    """Starts the actor and waits, or loads an earlier run. Returns run and rows."""
    replay = os.environ.get("REPLAY_RUN_ID")
    if replay:
        run = client.run(replay).get()
    else:
        run = client.actor(ACTOR).call(
            run_input=RUN_INPUT,
            max_total_charge_usd=MAX_CHARGE_USD,
            run_timeout=timedelta(minutes=15),
        )
    if run is None:
        sys.exit(f"Run {replay} not found")
    if run.status != "SUCCEEDED":
        sys.exit(f"Actor run ended {run.status}: {run_url(run)}")
    return run, list(client.dataset(run.default_dataset_id).iterate_items(clean=True))

Grouping. One group per App Store storefront and one per Google Play language. Each group takes its rating and version from its app row and the share of low-star reviews from its summary; the version count comes from the reviews shown, so it stays right after duplicates are dropped.

review_digest.py · scope()Python
def scope(row):
    """App Store reviews differ per storefront. Google Play serves the same reviews to
    every storefront of a language, so a Play app gets one group per language."""
    if row.get("store") == "google-play":
        return "google-play", row.get("appId"), RUN_INPUT["language"]
    return row.get("store"), row.get("appId"), row.get("country")

Posting. Slack takes at most 50 blocks per message and 3,000 characters per section, so quotes are clipped at 400 characters, five reviews are quoted per group, and a long digest is split between groups, never inside one. Rate limits, server errors and network failures are retried with the delay Slack asks for; anything else fails the job at once, with the run's ID in the error.

review_digest.py · post()Python
def post(webhook, message):
    """Posts one message. Retries rate limits, server errors and network failures."""
    data = json.dumps(message).encode()
    for attempt in range(4):
        request = urllib.request.Request(
            webhook, data=data, headers={"Content-Type": "application/json"}
        )
        try:
            with urllib.request.urlopen(request, timeout=30):
                return
        except urllib.error.HTTPError as e:
            if (e.code != 429 and e.code < 500) or attempt == 3:
                reason = e.read().decode()[:200]
                raise RuntimeError(f"Slack answered HTTP {e.code}: {reason}") from None
            time.sleep(int(e.headers.get("Retry-After") or 2**attempt))
        except urllib.error.URLError as e:
            if attempt == 3:
                raise RuntimeError(f"Slack unreachable: {e.reason}") from None
            time.sleep(2**attempt)

3Run it on your machine

TerminalShell
export APIFY_TOKEN=apify_api_...  # Console > Settings > API & Integrations
DRY_RUN=1 uv run review_digest.py > digest.json  # real run, nothing posted

The dry run prints the messages to digest.json and the run's ID to the terminal, and posts nothing. Paste one message into Slack's Block Kit Builder to see it rendered.

It is still a real run, so it moves the checkpoint forward: running again would find nothing new. To post exactly what you just inspected, replay that run instead:

TerminalShell
export SLACK_WEBHOOK_URL=https://hooks.slack.com/services/...
REPLAY_RUN_ID=YOUR_RUN_ID uv run review_digest.py  # the ID the dry run printed
Why replay exists

The checkpoint moves when the run completes, before Slack sees anything. If Slack is down, the job fails, and its log prints the exact REPLAY_RUN_ID=… command that posts the same run later. The rows stay in the run's dataset in your Apify account for your plan's retention period, so no review is lost.

4Schedule it

Put the workflow next to the script:

.github/workflows/review-digest.ymlYAMLDownload
name: Review digest

on:
  schedule:
    - cron: "17 7 * * *"  # 07:17 UTC daily, off the busy full hour
  workflow_dispatch:  # the "Run workflow" button, for tests

# Two overlapping runs would read one checkpoint and post the same reviews twice.
concurrency: review-digest

jobs:
  digest:
    runs-on: ubuntu-latest
    timeout-minutes: 20
    steps:
      - uses: actions/checkout@v7
      - uses: astral-sh/setup-uv@v10
      - run: uv run review_digest.py
        env:
          APIFY_TOKEN: ${{ secrets.APIFY_TOKEN }}
          SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

Add the two secrets and start a first run without waiting for tomorrow:

TerminalShell
gh secret set APIFY_TOKEN        # paste the token when asked
gh secret set SLACK_WEBHOOK_URL
gh workflow run "Review digest"  # first digest now instead of tomorrow morning
  • 07:17, not 07:00. GitHub delays scheduled jobs at the top of the hour, when most of them start.
  • concurrency keeps two runs from overlapping. Two runs would read the same checkpoint and post the same reviews twice.
  • Public repositories: GitHub disables scheduled workflows after 60 days without activity in a public repository. Keep the job in a private one, or re-enable it when GitHub emails you.

What it costs

You pay per row the actor returns. Filtered-out reviews, summaries and errors are free, and the first 50 reviews each month are free for every account. For an app with about ten new low-star reviews a day on Google Play and five per App Store storefront:

Rows per dayCountPricePer month
Google Play reviews, fetched once per storefront (2)20$0.00006$0.036
App Store reviews, US and GB10$0.00006$0.018
App records (rating and version)4$0.00006$0.007
First 50 reviews of the monthfree−$0.003
Total≈ $0.06

GitHub Actions needs about a minute a day, inside the free minutes of any plan. Paid Apify plans pay less per row, up to 40% less on Gold. Google Play reviews repeat across storefronts but are charged each time, so keep countries to the App Store storefronts you care about.

Running it for real

  • A capped run re-sends rather than skips. When a storefront hits the spending cap, the actor marks it PARTIAL and leaves its checkpoint where it was. The next run walks from the old checkpoint again: you may see a few reviews twice, but you never miss one. The digest shows a warning so you can raise MAX_CHARGE_USD.
  • Apple's feed has holes. On some days Apple's public reviews feed returns empty pages for an app and storefront. The actor tries other URL spellings and the App Store website's own reviews endpoint before it gives up. A page that stays empty is skipped and listed in stuckPages, and the digest warns about it.
  • Very busy apps. Each storefront returns at most maxReviewsPerApp reviews per run, and with a star filter Google Play is scanned for at most a few thousand reviews (stoppedBy: scanLimit). An app with hundreds of low-star reviews a day, WhatsApp for one, needs the job every hour or two, not once a day.
  • One checkpoint store per digest. Two digests sharing a checkpointStoreName would split each other's reviews.

Variations

  • Discord or Microsoft Teams: build_messages() and post() are the only Slack-specific parts; swap them for the other webhook format.
  • Include 3★ reviews: set maxScore to 3.
  • One channel per team or market: run the script once per app list, each with its own checkpointStoreName and webhook.
  • A weekly sentiment report: drop the star filter, run it weekly and chart the histogram of the summary rows.

Troubleshooting

Nothing gets posted

Either there were no new 1–2★ reviews (the log says so) or the checkpoint is further ahead than you expect, for example after a dry run. To start over, delete the key-value store named in checkpointStoreName under Storage → Key-value stores in the Apify Console.

"app not found in this country's App Store"

The app is not sold in that storefront. Remove the country from countries, or keep it: error rows are free and only add a warning line.

Slack answered HTTP 403, 404 or 410

The response names the reason: a revoked or mistyped webhook (invalid_token, no_service) or an archived channel (channel_is_archived). Create a new webhook, update the secret, then replay the failed run.

"stopped at the $0.50 cap"

A storefront delivered more reviews than the cap allows in one run, usually on the first run. Raise MAX_CHARGE_USD; nothing was skipped, the next run continues from the old checkpoint.