> ## Documentation Index
> Fetch the complete documentation index at: https://developers.scoutworks.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Badge celebration board

> Add a row to a Google Sheet each time a young person is awarded a badge, and show the latest on a screen at the hut.

> [!NOTE]
>
> * **For:** section leaders
> * **You get:** a **Badge board** sheet that gains a row each time a badge is awarded
> * **Time:** about fifteen minutes
> * **Scopes:** `badges:read`

Young people love seeing their name go up. This recipe adds a row to a Google Sheet the moment a leader awards a badge in Scoutworks. Put the sheet on a screen at the hut, and everyone sees the week's badges as they come in.

It uses a [webhook](https://developers.scoutworks.app/guides/webhooks.md), so a group admin needs to have turned on webhooks in the beta programme, and **Webhooks by Zapier**, which needs a paid Zapier plan.

> [!NOTE]
>
> The sandbox group cannot send webhooks, so build this on your own group. **Send test event** in Scoutworks checks the address; it names no real badge record, so the GET step answers `404`.

## 1. Make the sheet

Create a Google Sheet called **Badge board**, with these headings in row 1:

| A | B | C |
| - | - | - |
| Awarded | Name | Badge |

## 2. Catch the webhook

**1. Choose the trigger**

Create a Zap. For the trigger, choose **Webhooks by Zapier**, then **Catch Hook**. Copy the web address Zapier shows.

**2. Add the address to Scoutworks**

In Scoutworks, a group admin opens **Settings → Integrations → Webhooks**, adds the address from Zapier and ticks **`badge.awarded`**.

The webhook carries the badge record's id, the member's id, the badge's id and when it was awarded. It never carries a name: the next step reads the record with your key.

Next, add a **Filter by Zapier** step that continues only when **Data Bulk** *does not exist*. A big import sends one [bulk summary](https://developers.scoutworks.app/guides/webhooks.md#bulk-changes) instead of an event for each record, and this step skips it.

## 3. Read the badge record

Add a **Webhooks by Zapier → GET** action:

* **URL:** `https://api.scoutworks.app/api/v1/badges/` followed by the **Data Badge Record Id** field from the trigger
* **Headers:** `Authorization` → `Bearer ` followed by your key

Your key needs the `badges:read` scope. The record names the member and the badge.

## 4. Add the row

Add **Google Sheets → Create Spreadsheet Row**, in the **Badge board** sheet:

* **Awarded:** the **Data Awarded At** field from the trigger
* **Name:** the **Data Member First Name** field from the GET step, then a space and the first letter of **Data Member Last Name** (use a **Formatter → Text → Truncate** step with a length of 1)
* **Badge:** the **Data Badge Name** field from the GET step

A first name and an initial is enough to celebrate, and keeps a young person's full name off a screen that visitors to the hut can see.

## 5. Show it at the hut

Sort the sheet newest first (**Data → Sort sheet → Z → A** on column A), then open it on the hut's screen in a browser that is signed in to Google, and choose **View → Full screen**.

> [!WARNING]
>
> Do not use **File → Share → Publish to web**. A published sheet is public to anyone with the link, and it holds young people's names.

## Limits

* **A big import adds no rows.** An OSM import or a bulk award of more than 100 badges at once sends one bulk summary instead of an event for each, so the board is not filled with old badges. The filter step skips it. See [Bulk changes](https://developers.scoutworks.app/guides/webhooks.md#bulk-changes).
* **Writing to Google Sheets.** If a name starts with `=`, Sheets can run it as a formula. Add a **Formatter** step that puts `'` in front of values that start with `=`, `+`, `-` or `@`.
* **Keep the hook address to yourself.** A fake message to it names a record that does not exist, so the GET step answers `404` and no row is added.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.