Daily foot traffic anomaly alerts in Slack

Every weekday morning, get one Slack message listing only the venues whose foot traffic swung outside your threshold.

Deterministic Code
Placer.aiGoogle SheetsSlackOperationsMarketingNotifications & AlertsDaily DigestsResearch & Monitoring

Build a code workflow that runs every weekday at 7am local time and posts a Slack alert about foot traffic anomalies for a list of tracked venues. The full pipeline is deterministic, no LLM reasoning needed.

Trigger: cron, Monday through Friday at 7:00am. Make the time zone configurable.

Step 1. Read the watch list from Google Sheets. Use the Google Sheets Get Values operation on a tab called venues. Each row has: venue name, Placer.ai ApiId (composite id like venue:597d121159b03f6cf8e78962), venue URL, and an optional threshold expressed as a decimal (e.g. 0.15 means plus or minus 15%). Default threshold is 0.15 when the column is blank.

Step 2. For each venue, call the Placer.ai Visit Trends Report operation with daily granularity for the prior 28 days (end date = yesterday, start date = 28 days before yesterday, inclusive). Use a single collection request batching the venues when possible to reduce API calls. Handle the Placer.ai async pattern: a 202 means the report is still generating, retry the same request body after ~5 seconds until a 200 comes back. Calls returning 202, 429, or 5xx do not count against the weekly quota.

Step 3. For each venue, compute deterministically: the 7-day rolling average of daily visits over the most recent 7 days, the trailing 28-day baseline average over the full window, and the percentage change = (recent7 - baseline28) / baseline28. Flag the venue when abs(percentageChange) > threshold. Skip any venue where Placer.ai returned no data (204) or fewer than 7 days of values.

Step 4. If at least one venue is flagged, append one row per flagged venue to a tab named history in the same spreadsheet using Google Sheets Append Values. Columns: run date, venue name, ApiId, recent 7-day avg, 28-day baseline, percentage change, direction (up or down), threshold used.

Step 5. Post a single Slack message to a configured channel using the Slack Send a Message operation. Use Slack mrkdwn and Block Kit. Header line summarizes how many venues moved. Then a clean bulleted list, one line per flagged venue, sorted by absolute percentage change descending. Each line shows the venue name as a clickable link to the venue URL, an up or down arrow, the percentage change rounded to one decimal, and the recent vs baseline numbers in parentheses. If zero venues flag, do not post anything (silent days are fine).

Inputs the user configures at setup: the Google Sheet ID, the venues tab name (default venues), the history tab name (default history), the Slack channel ID, the default threshold (default 0.15), and the schedule time zone.

Credentials needed: Placer.ai (API key), Google Sheets (OAuth, write scope so the history tab can be appended to), Slack (user OAuth, chat:write).

Additional information

What does this prompt do?
  • Reads your watch list of venues and per-venue thresholds from a Google Sheets tab every weekday at 7am.
  • Pulls the last 28 days of daily foot traffic from Placer.ai for each venue.
  • Compares the most recent 7-day average to the trailing 28-day baseline and flags any venue that moved beyond its threshold (default plus or minus 15%).
  • Posts a single, formatted Slack message listing only the flagged venues with direction, magnitude, and a link, and appends the same rows to a history tab for auditing.
What do I need to use this?
  • A Placer.ai account with API access turned on. This is a paid add-on, so your customer success manager has to enable it.
  • A Google Sheet with one tab listing the venues you want to watch (name, Placer venue ID, optional threshold) and a second tab named history for the audit log.
  • A Slack workspace and the channel you want the morning alert posted into.
How can I customize it?
  • Change the schedule. Run it twice a day, only on Mondays, or shift the time zone for your team.
  • Tune the threshold. Use the default plus or minus 15 percent, set a tighter or looser default, or override per venue in the sheet.
  • Change the destination. Post to a different channel, split alerts by region, or send to a DM if you are the only viewer.

Frequently asked questions

Where does the venue list live? Do I need to keep it in code?
No. The venue list and the per-venue thresholds live in your Google Sheet. You can add or remove venues by editing the sheet, no code changes required.
What happens if a venue has no data that week?
The workflow skips that venue for the day and keeps going. It will not flag a venue it does not have enough data for.
Will I get a Slack ping every single morning?
Only when something actually moves past its threshold. If nothing is anomalous you can configure it to stay silent, so you only hear from it when it matters.
Can I run this on weekends or at a different hour?
Yes. The schedule is a setting on the workflow, so you can switch it to daily, weekly, or any specific hour and time zone.
Does my whole team need a Placer.ai login?
No. Only the person who sets up the workflow connects Placer.ai. Everyone in the Slack channel sees the alerts without needing their own account.

Stop manually combing Placer.ai every Monday morning.

Connect Placer.ai, Google Sheets, and Slack once, and Geni will surface only the venues that actually moved, every weekday at 7am.