# Weekly recompete sheet with Zapier

To keep a weekly recompete sheet with Zapier, use Schedule by Zapier to run every Monday, a Webhooks by Zapier GET request to /api/v1/recompetes with your NAICS and months_ahead, an Authorization header with your key, and a Google Sheets action that creates one row per returned contract.

Capture teams who live in spreadsheets. A shared sheet of contracts ending in the next 12 to 18 months, refreshed weekly, is the backbone of a pipeline review, and Zapier keeps it current without anyone opening a chat or writing code.

## The prompt

```
Set up a Zapier Zap that every Monday pulls contracts in NAICS 541512 ending in the next 18 months from samgovapi.io and adds them to my Recompetes Google Sheet with incumbent, agency, value, end date and USAspending link.
```

## What the agent calls

1. recompetes: The same query the webhook step sends; shown here so an agent in Zapier's AI steps could use the tool instead.

```json
{"name":"recompetes","arguments":{"naics":"541512","months_ahead":18,"limit":100,"user_request":"weekly recompete sheet"}}
```

## Sample output

Trimmed; field names and structure match the live response, values are shortened or illustrative.

```json
{
  "data": [
    {
      "piid": "70B04C25F00000603",
      "recipient_name": "EXAMPLE SYSTEMS CORP",
      "awarding_agency": "Department of Homeland Security",
      "potential_end_date": "2027-03-31",
      "potential_value": 4800000,
      "record_url": "https://www.usaspending.gov/award/CONT_AWD_70B04C25F00000603_7014_70B04C22A00000025_7014"
    }
  ],
  "meta": {
    "next_cursor": null
  }
}
```

## How to read the answer

- Zapier turns the data array into line items. Use a Looping by Zapier step, or map line items into the Sheets action, so each contract becomes its own row.
- Re-running weekly adds duplicates. Look up the PIID in the sheet first (Google Sheets Lookup Spreadsheet Row) and only create rows that are new.

## Make it yours

- Send only contracts above a potential value with min_value in the query string.
- Post a weekly summary to Slack instead of a sheet.

## Pitfalls

- Keep the API key in the header field, not in the URL, so it does not appear in task history links.
- Zapier's webhook step times out on very large responses; keep limit at 100 and paginate in a second step if needed.

## The same job over REST

```bash
curl "https://samgovapi.io/api/v1/recompetes?naics=541512&months_ahead=18&limit=100" -H "Authorization: Bearer $SAMGOVAPI_API_KEY"
```

Plan: every plan. Credits: 1 credit per 100 rows returned, minimum 1; about 1 credit a week.

## Questions

### Do I need a paid Zapier plan?

Webhooks by Zapier is a premium app on Zapier's side; check Zapier's current plan list. On this API, the free plan covers a weekly call.

### Can Make do the same?

Yes. Make's HTTP Make a request module with an Authorization header and a Google Sheets Add a Row module does the same job.

All recipes: https://samgovapi.io/agents/recipes.md

Independent. Not affiliated with, endorsed by or sponsored by GSA, SAM.gov or any U.S. government agency. Registering in SAM.gov is free at sam.gov.
