# Affinity

> Affinity integration for AI agents via ClawLink — browser login, no API key setup. Connect affinity through ClawLink's hosted setup. Use this skill when the user wants to work with Affinity (CRM & Sales) — connect Affinity, read or update Affinity data, or take actions in Affinity from chat instead of saying you cannot access it.

- Skill: `clawlink-hq/affinity` (Agent Skill)
- Install (CLI): `npx skillmds@latest add clawlink-hq/affinity`
- Raw SKILL.md: https://api.skillmd.com/api/skills/clawlink-hq/affinity/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Integrations & APIs
- Author: clawlink-hq (https://skillmd.com/u/clawlink-hq)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/clawlink-hq/affinity

---


# Affinity

Use **Affinity** from your AI agent through [ClawLink](https://claw-link.dev) — browser login, no API key to paste, no config to edit. Connect Affinity once and the agent can read and act on it. Works in any agent that can run shell commands (Claude Code, Cursor, Codex, Cline, and more).

## Setup

Run these once — the agent can run them for you:

```bash
npx @useclawlink/cli login              # opens browser → approve (mints + stores a key)
npx @useclawlink/cli connect affinity   # opens browser → authorize Affinity
```

No API key to create or paste — `login` stores the credential at `~/.clawlink/credentials.json`.

## Using Affinity

```bash
npx @useclawlink/cli actions affinity "<what you want to do>"   # find an action
npx @useclawlink/cli describe affinity <action-id>             # see its inputs (before writes)
npx @useclawlink/cli run affinity <action-id> --input '<json>' # execute
```

Reads first; confirm with the user before any write.

## Available actions

| Action | Description |
|--------|-------------|
| `affinity_get_a_company_s_list_entries` | Summarize company data across all lists, including list-specific fields and metadata like creation date and author. Access requires 'Export data from Lists' permission. |
| `affinity_get_a_company_s_lists` | Returns metadata for all the Lists on which the given Company appears. |
| `affinity_get_a_person_s_list_entries` | Summary: Browse rows for a Person in all Lists, showing field data and entry metadata like creation time and author. Requires 'Export data from Lists' permission. |
| `affinity_get_a_person_s_lists` | Returns metadata for all the Lists on which the given Person appears. |
| `affinity_get_a_single_company` | Retrieve basic company info and specific field data by using `fieldIds` or `fieldTypes` parameters. Multiple fields can be queried. No field data if parameters aren't specified. Requires 'Export All Organizations directory' permission. |
| `affinity_get_a_single_opportunity` | Get basic details about an Opportunity without field data via provided endpoints. Field data requires using specific list entry APIs and the 'Export data from Lists' permission. |
| `affinity_get_a_single_person` | Use GET `/v2/persons/fields` with `fieldIds` or `fieldTypes` for detailed data; basic info by default. Request multiple fields at once. 'Export All People' permission needed. |
| `affinity_get_all_companies` | Affinity API allows paginated access to company info and custom fields. Use `fieldIds` or `fieldTypes` to specify data in a request. Retrieve field IDs/Types via GET `/v2/companies/fields`. Export permission needed. |
| `affinity_get_all_list_entries_on_a_list` | Access and export essential data and metadata for Companies, Persons, or Opportunities from a List, specifying data via `fieldIds` or `fieldTypes`. 'Export data from Lists' permission is necessary. |
| `affinity_get_all_list_entries_on_a_saved_view` | Use the endpoint to access rows in a Saved View with specific filters and selected fields from a web app. It doesn't maintain sort order, supports only sheet-type views, and requires export permissions. |
| `affinity_get_all_opportunities` | Pagination through Opportunities in Affinity yields basic info but excludes field data. For field data, use specified GET endpoints. 'Export data from Lists' permission needed. |
| `affinity_get_all_persons` | The Affinity API offers paginated access to Person data using `fieldIds` or `fieldTypes`. Bulk extraction needs special permissions and supports multiple parameters. |

## Notes

- **No API key for Affinity itself** — ClawLink holds the OAuth token; the agent only holds your ClawLink credential.
- Not connected yet, or access expired? Re-run `npx @useclawlink/cli connect affinity`.
- The action list above is a snapshot; `npx @useclawlink/cli actions affinity` is always current.

## Resources

- ClawLink: https://claw-link.dev
- Docs: https://docs.claw-link.dev
- CLI: https://www.npmjs.com/package/@useclawlink/cli

---

**Powered by [ClawLink](https://claw-link.dev)** — connect 90+ apps to any AI agent.

