Global Finalist2026 Amazon Ads Partner Awards
Guides & TutorialsAutomation & Tools

Build a weekly Amazon PPC client report in Slack with Claude, in 30 minutes

SellerMate Team

Content Writer

10/22/20264 min read

Monday morning at most Amazon agencies looks the same. Someone opens ten accounts, copies numbers into a deck or a sheet, writes three lines per client, and sends it. It takes two hours, it is a week stale by Wednesday, and nobody enjoys it.

This guide replaces it with a script that posts one Slack message per client every Monday at 8am, with spend, sales, ACoS and orders versus the week before, and the three campaigns that moved most. You will not write the script. Claude will. Your job is a key, a prompt and a cron line.

Time: about thirty minutes. Cost: nothing, the API is included in every SellerMate plan.

What you need

  • A SellerMate workspace with the client accounts connected. Any plan works.
  • A Slack channel and an incoming webhook URL for it. Slack's "Incoming Webhooks" app gives you one in two clicks.
  • Claude, ChatGPT or Cursor. The prompt below is written for any of them.
  • Somewhere to run a Python script on a schedule. Your laptop works for a test. A small server, a GitHub Action or a Vercel cron is fine for real.

Step 1: create a read-only API key

In SellerMate, open Profile โ†’ API Keys and create a key with the tools:read scope. If you want to be tidy, limit it to the client accounts this report covers. Copy the key now; it is shown once.

Set it as an environment variable where the script will run:

1export SELLERMATE_API_KEY="sm_live_..."
2export SLACK_WEBHOOK_URL="https://hooks.slack.com/services/..."

Step 2: paste the prompt

Open your assistant and paste this. The first line sends it to the SellerMate documentation, where every tool and parameter is listed, so it does not have to guess.

1Read https://www.sellermate.ai/api-docs first. It documents the SellerMate Public API: REST over HTTPS, X-API-Key auth, and every tool with its parameters is on that page.
2
3Build me a weekly client report that runs every Monday at 8am and posts one Slack message per Amazon account.
4
5Each message should show, for the last 7 days versus the 7 before:
6- Spend, sales, ACoS and orders, with the percentage change
7- The three campaigns whose spend or ACoS moved most, with the numbers
8- A one-line plain-English summary a client can read in ten seconds
9
10Use get_user_context to list accounts, get_marketplace_summary for the account totals, and get_campaign_performance with sort_field set to cost for the movers. Post to the Slack webhook in SLACK_WEBHOOK_URL. Give me a --dry-run flag that prints the messages instead of posting.
11
12Rules:
13- My key is in the SELLERMATE_API_KEY environment variable. Send it as the X-API-Key header. Never hard-code it or log it.
14- Call get_user_context first and use the accounts it returns.
15- Report tools are paginated (page, page_size up to 500, pagination.hasMore). Walk every page.
16- On a 429, wait for the Retry-After header and retry.
17
18Stack: Python 3 with requests, no framework. Include a README with the cron line.

The same prompt lives on the prompt library page with a copy button.

Step 3: what the assistant will do

A good assistant reads the docs page, then writes a script in three parts. It is worth recognising them so you can check its work.

Discovery. It calls get_user_context with an empty body. The response lists your workspace and every Amazon account the key can reach, with ids, names, marketplaces and account types. Everything else takes an amazon_account_id from this list.

1ctx = call("get_user_context")
2accounts = ctx["workspaces"][0]["accounts"]

Totals. For each account it calls get_marketplace_summary twice, once per week, and computes the deltas. Spend is cost, sales is attributedSales14d, orders is purchases. ACoS comes back already calculated.

Movers. It calls get_campaign_performance for both weeks, sorted by cost, joins the two lists by campaign name, and ranks by the absolute change in spend and ACoS. Because the tool paginates, it should loop while pagination.hasMore is true.

Then it formats a Slack message and posts it, or prints it when you pass --dry-run.

Step 4: test with a dry run

1python weekly_report.py --dry-run

Read the output next to SellerMate's own dashboard for one account. The numbers should match to the cent for the same date range. If they don't, the usual cause is the date window: tell the assistant exactly which seven days you mean, and whether to use the account's local timezone.

If you see a 401, the key is wrong or revoked. A 403 means the key cannot see that account. A 429 means you are over 120 requests a minute, which is unlikely for this script unless you have a very large number of accounts.

Step 5: schedule it

The README the assistant wrote will have the cron line. It looks like this:

10 8 * * 1 cd /opt/reports && /usr/bin/python3 weekly_report.py >> report.log 2>&1

Remove --dry-run, run it once by hand to see the real message land in Slack, and you are done.

Making it yours

Once it works, the assistant can extend it in a sentence:

  • "Send each client to their own channel" if every client has a shared Slack channel.
  • "Add TACoS" using get_retail_product_performance for total sales. This needs the Seller Central connection, available from Pro.
  • "Add the top three search terms by spend" using get_search_term_performance.
  • "Post to WhatsApp instead" and it will swap the webhook for the WhatsApp Business API.

Why this works without a developer

The hard part of an internal tool was never the fifty lines that format a Slack message. It was authenticating with Amazon, requesting asynchronous reports, waiting for them, parsing differently shaped results per ad type, and doing it for ten accounts. SellerMate's API hides all of that behind one call shape, and the documentation is written so an AI assistant can read it in one go. The assistant does the typing; you do the deciding.

Get your API key ยท All ten prompts ยท API documentation

Book Demo