# CRM recipes — spice association members into Sheets, HubSpot or Pipedrive

Every recipe starts from a **saved task** of this Actor (your search, `dedupeAcrossRuns` on) on a weekly schedule, so
each run delivers only member companies new to you. Upsert on **`companyKey`** — one id per company, the same when a
company sits on two lists — so a re-run never creates a duplicate record.

## Field mapping

| Actor field | Google Sheets column | HubSpot company property | Pipedrive organization field |
|---|---|---|---|
| `companyKey` | A — key (match on it) | a custom single-line property "Association member key" (unique) | a custom text field "Association member key" |
| `name` | Company | Company name | Name |
| `website` / `domain` | Website | Company domain name | Website (custom) |
| `country` | Country | Country/Region | Address — country |
| `association` · `memberType` · `alsoMemberOf` | Association · Type · Also member of | custom properties | custom fields |
| `companyEmail` · `contactRoute` | Role e-mail · Contact route | a note on the company | a note on the organization |
| `buyerRole` | Role (buyer / processor / exporter) | Industry or a custom "Buyer role" | a label |
| `score` · `label` | Score · Tier | custom number / dropdown | custom fields |
| `generatedText` | First line | a note (draft opener) | a note (draft opener) |
| `url` | Member page | a note link | a note link |

Rows with an empty `website` (most ESA members — the list prints name + country only) still carry `url`, the member
page on the association's site; keep them, the AI's `buyerRole` and `score` rank them.

## Google Sheets (no code)

1. Copy the header of [tracker.csv](tracker.csv) into row 1 of a new sheet and add a `companyKey` column.
2. In the task: **Integrations → Google Sheets → Add rows**, dataset view *Shortlist*, "Deduplicate by column" =
   `companyKey`.
3. Schedule the task weekly. New member companies append; nothing is overwritten.

## HubSpot (Make or Zapier, ≈ 15 minutes)

1. Trigger: **Apify → Watch Actor runs** (the task above), then **Apify → Get dataset items**.
2. **HubSpot → Search companies** where "Association member key" = `companyKey`.
3. Router: found → **Update a company**; not found → **Create a company** with the mapping above.
4. **HubSpot → Create an engagement (note)** with `generatedText` and `url`, associated with the company.

## Pipedrive (Make, n8n or Zapier)

1. Same trigger and dataset step as HubSpot.
2. **Pipedrive → Search organizations** by the "Association member key" field = `companyKey`.
3. Found → **Update an organization**; not found → **Create an organization**, then **Add a note** with
   `generatedText` and `contactRoute`.
4. Optional: **Create a deal** in a "Spice buyers" pipeline for rows with `label` = `hot`.

## n8n / your own code

The **webhook** (`webhookUrl`, API only) POSTs each delivered row as JSON, signed with `webhookSecret`; upsert on
`companyKey` in your handler. The Python and JavaScript snippets in the README read the same rows from the dataset.
