Affinity
CRMConnect AI agents to Affinity, the relationship intelligence CRM. Agents manage lists, people, organizations, opportunities, custom fields, and notes, and react to Affinity events in real time.
What This Integration Enables
An agent can search people and organizations by name, email, or domain before it acts, so it enriches the right record instead of creating a duplicate. It manages list entries, reads and writes custom field values, and logs notes against contacts and deals as a workflow runs. The Get Current User action validates the connection and reads plan and rate-limit context before a batch of work begins. The On Affinity Event trigger turns Affinity from a system you check into a system that starts flows. New people, deal updates, list-entry changes, field-value edits, and notes each become a signal an agent can act on. The relationship data your team already maintains becomes the thing that drives the next step, rather than a report someone reads later.
Without FlowRunner
With FlowRunner
Use Case Scenarios
New Signup Enters the Pipeline
A signup lands in another system. The agent calls Search Persons to check whether the person already exists in Affinity, then Create Person if they do not, and Create List Entry to add them to the right pipeline list with the correct owner and source. Because the search runs first, the person is added once, not twice. The relationship graph grows without a rep pasting rows between tabs.
Deal Update Reaches the Right People
The On Affinity Event trigger fires for an opportunity.updated event. The agent reads the deal name, value, and new stage, then posts a summary to the deal team through [Slack](/integrations/slack) so the people who own the account see the change the moment it happens. The pipeline meeting stops being where the team discovers movement.
Interaction Logged Without a Reviewer
After a call or meeting, the agent calls Search Persons to find the contact, then Create Note to log what was discussed against the record. The next person to open that contact sees the full history. When a note contains a commitment that carries a dollar figure or a deadline, the flow does not just file it; it pauses and asks a human to confirm the follow-up before it books the next action.
Human-in-Loop Highlight
The moment that needs judgment on a relationship CRM is not the data update, it is the commitment. When the On Affinity Event trigger reports a deal crossing a value threshold you configure, the agent does not advance it on its own. It treats the crossing as a [human-in-the-loop](/concepts/human-in-the-loop/) step: it pauses, assembles the deal, the new stage, and the field changes into a single message, routes it to the deal lead through Slack or email, and resumes only after they respond. Approve, and the agent updates the record and notifies the team. Hold, and it leaves the deal where it is. The graph stays clean, and a person owns the calls that move money.
Agent Capabilities
31 actionsAccount
1- Get Current User Returns the authenticated user and tenant behind the API key by calling Affinity's whoami endpoint. Use this to validate the API key connection and to read the account's plan tier and API rate-limit allowances. Returns the user (id, email, name), the tenant, and the granted API scopes.
Lists
5- Get Lists Retrieves all Lists visible to the API key's user, including saved views for people, organizations, and opportunities. Each list includes its id, name, type, public flag, and size. Use this to discover which lists exist before reading or writing their entries.
- Get List Retrieves a single List by id, including the full definition of its fields (columns). The fields array describes each custom field's id, name, value_type, and whether it allows multiple values, essential for reading and writing field values on that list's entries.
- Get List Entries Retrieves the entries (rows) of a List, one per person, organization, or opportunity on it. Results are paginated: pass a page size and, to continue, the page_token returned by the previous call. Each entry includes its id, the entity id and type, and the underlying entity object.
- Create List Entry Adds an existing person, organization, or opportunity to a List by its entity id, creating a new list entry (row). The list's type must match the entity being added. Optionally attribute the addition to a specific creator. Returns the created list entry.
- Delete List Entry Removes an entry (row) from a List by the list id and list entry id. This detaches the person, organization, or opportunity from the list; it does not delete the underlying entity. Returns a success flag.
Persons
6- Get Persons Retrieves people from Affinity, optionally filtered by a free-text search term matching name or email. Results are paginated via page size and page token, and can optionally include each person's first/last interaction dates and opportunity ids. Returns the person list plus the next page token.
- Search Persons Searches Affinity people by a free-text term matching name or email address and returns matching person records. This is a focused wrapper over the persons endpoint for lookups; use Get Persons when you also need pagination controls or interaction dates.
- Get Person Retrieves a single person by id, including their emails, associated organization ids, and list entries. Optionally include interaction dates (first/last email and meeting) and the person's opportunity ids. Returns the full person record.
- Create Person Creates a new person in Affinity with a first name, last name, and one or more email addresses, optionally linking them to existing organizations. Emails may be provided as a comma/newline separated list or an array. Returns the created person record including its new id.
- Update Person Updates an existing person by id. Any provided field (first name, last name, emails, or organization associations) replaces the current value; omitted fields are left unchanged. Note that Affinity replaces the full emails and organization_ids arrays when supplied. Returns the updated person record.
- Delete Person Permanently deletes a person from Affinity by id. This removes the person and their list entries; it cannot be undone. Returns a success flag.
Organizations
6- Get Organizations Retrieves organizations (companies) from Affinity, optionally filtered by a free-text term matching name or domain. Results are paginated via page size and page token. Optionally include each organization's first/last interaction dates. Returns the organization list plus the next page token.
- Search Organizations Searches Affinity organizations by a free-text term matching name or domain and returns matching company records. A focused wrapper over the organizations endpoint for lookups; use Get Organizations when you also need pagination or interaction dates.
- Get Organization Retrieves a single organization (company) by id, including its domains, associated person ids, opportunity ids, and list entries. Optionally include interaction dates. Returns the full organization record.
- Create Organization Creates a new organization (company) in Affinity with a name and primary domain, optionally associating existing people. Person ids may be provided as a comma/newline separated list or an array. Returns the created organization record including its new id.
- Update Organization Updates an existing organization by id. Any provided field (name, domain, or person associations) replaces the current value; omitted fields are left unchanged. Affinity replaces the full person_ids array when supplied. Returns the updated organization record.
- Delete Organization Permanently deletes an organization from Affinity by id. This removes the organization and its list entries; it cannot be undone. Returns a success flag.
Opportunities
5- Get Opportunities Retrieves opportunities (deals) from Affinity, optionally filtered by a free-text term. Results are paginated via page size and page token. Each opportunity includes its id, name, the list it belongs to, and associated person and organization ids. Returns the opportunity list plus the next page token.
- Get Opportunity Retrieves a single opportunity (deal) by id, including its name, the list it belongs to, and its associated person and organization ids. Returns the full opportunity record.
- Create Opportunity Creates a new opportunity (deal) in Affinity on a specified opportunity-type list, linking it to existing people and organizations by their ids. Person and organization ids may be provided as comma/newline separated lists or arrays. Returns the created opportunity record including its new id.
- Update Opportunity Updates an existing opportunity (deal) by id. Any provided field (name, person associations, or organization associations) replaces the current value; omitted fields are left unchanged. Affinity replaces the full person_ids and organization_ids arrays when supplied. Returns the updated opportunity record.
- Delete Opportunity Permanently deletes an opportunity (deal) from Affinity by id. This cannot be undone. Returns a success flag.
Fields
5- Get Fields Retrieves the definitions of custom fields (columns) in Affinity, optionally scoped to a single list. Each field includes its id, name, entity type, value type, and whether it allows multiple values. Optionally filter by entity type or value type. Field ids returned here are used when reading or writing field values.
- Get Field Values Retrieves the values stored in custom fields for a single entity. Provide exactly one of a person id, organization id, opportunity id, or list entry id. Each returned value includes its id, the field id, the entity, and the stored value (which varies by field value type). Use these ids to update or delete specific values.
- Create Field Value Sets a custom field value on an entity by supplying the field id, the target entity id, and the value. The value's shape depends on the field's value type (e.g. text/number, a dropdown option id, an ISO date, or a person/organization id). Optionally scope the value to a specific list entry. Returns the created field value.
- Update Field Value Updates an existing custom field value by its field value id, replacing the stored value. The value's shape must match the field's value type. Returns the updated field value.
- Delete Field Value Deletes a custom field value by its field value id, clearing that value from the entity. Returns a success flag.
Notes
2- Get Notes Retrieves notes from Affinity, optionally filtered to those associated with a specific person, organization, or opportunity. Results are paginated via page size and page token. Each note includes its content, author, associations, and timestamps. Returns the note list plus the next page token.
- Create Note Creates a note in Affinity with text content, associating it with any combination of people, organizations, and opportunities by their ids. Association ids may be provided as comma/newline separated lists or arrays. Returns the created note including its new id.
Interactions
1- Get Interactions Retrieves interactions (emails and meetings) recorded in Affinity for a given date range and entity. Specify the interaction type and a start/end date window, plus one of a person, organization, or opportunity id. Returns the matching interactions with their participants and timestamps.
Triggers
1 triggersEvent Triggers
1- On Affinity Event Fires when a subscribed Affinity webhook event occurs, such as a new person or organization, a deal update, a list-entry change, a field-value edit, or a new note. Starts a flow the moment relationship data changes.
Start building with Affinity
$100 in credits. No card required. Connect in minutes.