Reference · Tools

Affinity

Manage organizations, persons, lists, and list entries in the Affinity relationship intelligence CRM.

Action Sales v1

The Affinity node lets you automate full CRUD operations against your Affinity relationship intelligence CRM — organizations, persons, lists, and list entries. You could build a workflow that automatically adds a new contact to an Affinity list the moment a deal reaches a certain stage in another tool. It connects via the official Affinity API using your API credentials.

Node type
Action
Parameters
43
Outputs
Output, Error
Credentials
Affinity API

Affinity

Manage organizations, persons, lists, and list entries in Affinity CRM.

Overview

Affinity is a relationship intelligence CRM. This tool provides CRUD operations for organizations, persons, lists, and list entries via the Affinity API. It supports creating, reading, updating, and deleting records, as well as searching and paginating through results.

Category: Sales
Tool Name: affinity
Version: 1

Appearance: Icon: lucide-Network | Color: #6240C1

Node Type

Action — processes input items and produces output

Input / Output

DirectionPort(s)
InputInput
OutputOutput, Error

Credentials

This tool requires Affinity API credentials. See the Credentials Guide for setup instructions.

Resources

ResourceValue
Listlist
List EntrylistEntry
Organizationorganization
Personperson

Operations

Which operations are available depends on the selected resource — see the parameter subsections below. Lists are read-only: they offer get and getAll only.

OperationValueDescription
CreatecreateCreate a list entry, organization or person.
DeletedeleteDelete a list entry, organization or person.
GetgetGet a single record.
Get ManygetAllGet many records.
UpdateupdateUpdate an organization or person.

Parameters

List: Get

ParameterTypeRequiredDefaultDescription
List IDstringYesThe unique ID of the list object to be retrieved.

List: Get Many

ParameterTypeRequiredDefaultDescription
Return AllbooleanNofalseWhether to return all results or only up to a given limit.
LimitnumberNo5Max number of results to return. (shown when Return All is false)

List Entry: Create

ParameterTypeRequiredDefaultDescription
List IDstringYesThe unique ID of the list to add the entry to. To find list IDs, use the List > Get Many operation.
Entity IDstringYesThe unique ID of the entity (person, organization, or opportunity) to add to this list.
Additional FieldscollectionNo{}Optional fields sent with the new list entry.
— Creator IDstringNoThe ID of a Person resource who should be recorded as adding the entry to the list. Must be a person who can access Affinity. If not provided the creator defaults to the owner of the API key.

List Entry: Delete

ParameterTypeRequiredDefaultDescription
List IDstringYesThe unique ID of the list that contains the specified list entry. To find list IDs, use the List > Get Many operation.
List Entry IDstringYesThe unique ID of the list entry object to be deleted.

List Entry: Get

ParameterTypeRequiredDefaultDescription
List IDstringYesThe unique ID of the list that contains the specified list entry. To find list IDs, use the List > Get Many operation.
List Entry IDstringYesThe unique ID of the list entry object to be retrieved.

List Entry: Get Many

ParameterTypeRequiredDefaultDescription
List IDstringNoThe unique ID of the list whose list entries are to be retrieved. To find list IDs, use the List > Get Many operation.
Return AllbooleanNofalseWhether to return all results or only up to a given limit.
LimitnumberNo5Max number of results to return. (shown when Return All is false)

Organization: Create

ParameterTypeRequiredDefaultDescription
NamestringYesThe name of the organization.
DomainstringYesThe domain name of the organization.
Additional FieldscollectionNo{}Optional fields sent with the new organization.
— Person IDsstringNoComma-separated IDs of persons to associate with this organization. Find person IDs via Person > Get Many.

Organization: Delete

ParameterTypeRequiredDefaultDescription
Organization IDstringYesUnique identifier for the organization.

Organization: Get

ParameterTypeRequiredDefaultDescription
Organization IDstringYesUnique identifier for the organization.
OptionscollectionNo{}Extra settings applied to the lookup.
— With Interaction DatesbooleanNofalseWhether interaction dates will be present on the returned resources.

Organization: Get Many

ParameterTypeRequiredDefaultDescription
Return AllbooleanNofalseWhether to return all results or only up to a given limit.
LimitnumberNo5Max number of results to return. (shown when Return All is false)
OptionscollectionNo{}Extra settings applied to the search.
— TermstringNoA string used to search all the organizations in your team’s address book. This could be an email address, a first name or a last name.
— With Interaction DatesbooleanNofalseWhether interaction dates will be present on the returned resources.

Organization: Update

ParameterTypeRequiredDefaultDescription
Organization IDstringYesUnique identifier for the organization.
Update FieldscollectionNo{}The fields to change. Anything you leave out is left as it is.
— DomainstringNoThe domain name of the organization.
— NamestringNoThe name of the organization.
— Person IDsstringNoComma-separated IDs of persons to associate with this organization. Find person IDs via Person > Get Many.

Person: Create

ParameterTypeRequiredDefaultDescription
First NamestringYesThe first name of the person.
Last NamestringYesThe last name of the person.
EmailsstringNoComma-separated email addresses of the person.
Additional FieldscollectionNo{}Optional fields sent with the new person.
— Organization IDsstringNoComma-separated IDs of organizations to associate with this person. Find organization IDs via Organization > Get Many.

Person: Delete

ParameterTypeRequiredDefaultDescription
Person IDstringYesUnique identifier for the person.

Person: Get

ParameterTypeRequiredDefaultDescription
Person IDstringYesUnique identifier for the person.
OptionscollectionNo{}Extra settings applied to the lookup.
— With Interaction DatesbooleanNofalseWhether interaction dates will be present on the returned resources.

Person: Get Many

ParameterTypeRequiredDefaultDescription
Return AllbooleanNofalseWhether to return all results or only up to a given limit.
LimitnumberNo5Max number of results to return. (shown when Return All is false)
OptionscollectionNo{}Extra settings applied to the search.
— TermstringNoA string used to search all the persons in your team’s address book. This could be an email address, a first name or a last name.
— With Interaction DatesbooleanNofalseWhether interaction dates will be present on the returned resources.

Person: Update

ParameterTypeRequiredDefaultDescription
Person IDstringYesUnique identifier for the person.
EmailsstringNoComma-separated email addresses of the person. This field is always sent on update.
Update FieldscollectionNo{}The fields to change. Anything you leave out is left as it is.
— First NamestringNoThe first name of the person.
— Last NamestringNoThe last name of the person.
— Organization IDsstringNoComma-separated IDs of organizations to associate with this person. Find organization IDs via Organization > Get Many.

All Operations

ParameterTypeRequiredDefaultDescription
Max ConcurrencynumberNo10Maximum number of items to process concurrently.

Output Data

Affinity’s response is merged onto the input item’s JSON in every operation — your existing fields survive and the record’s fields are added alongside them, overwriting any key of the same name. Binary data on the input item is forwarded.

OperationOutput items per input item
create, get, updateOne — the record merged onto the item.
deleteOne — the API’s delete acknowledgement merged onto the item.
getAllOne per record returned, so a single input item fans out across the whole result set.

Two behaviours of getAll are worth planning for:

  • A getAll that matches nothing produces no output items at all. The input item does not pass through — that branch of the workflow simply goes quiet. If a downstream node must run regardless, do not depend on this node emitting something.
  • Return All changes how much is fetched, not the shape. On, Affinity is paged through until every record is collected. Off, the result is capped at Limit — which accepts values from 1 to 10, so a capped getAll returns at most ten records.

The record fields themselves are whatever Affinity returns; the node does not rename, nest or filter them. Reference them downstream by expression, e.g. {{ $json.id }}.

Usage Examples

  • Create a new organization in Affinity
  • Get all persons from Affinity
  • Add an entity to an Affinity list
  • Update organization details in Affinity
  • Delete a list entry from Affinity

Example Configuration

Look up one list by ID:

{
  "type": "affinity",
  "parameters": {
    "resource": "list",
    "operation": "get",
    "listId": "{{ $json.listId }}"
  }
}

Create an organization from data on the item:

{
  "type": "affinity",
  "parameters": {
    "resource": "organization",
    "operation": "create",
    "name": "{{ $json.company }}",
    "domain": "{{ $json.domain }}"
  }
}

Search organizations by term, paging through every match:

{
  "type": "affinity",
  "parameters": {
    "resource": "organization",
    "operation": "getAll",
    "returnAll": true,
    "options": {
      "term": "acme",
      "withInteractionDates": true
    }
  }
}

Create a person and attach them to an organization:

{
  "type": "affinity",
  "parameters": {
    "resource": "person",
    "operation": "create",
    "firstName": "{{ $json.firstName }}",
    "lastName": "{{ $json.lastName }}",
    "emails": "{{ $json.email }}",
    "additionalFields": {
      "organizations": "12345"
    }
  }
}

Add an entity to a list:

{
  "type": "affinity",
  "parameters": {
    "resource": "listEntry",
    "operation": "create",
    "listId": "{{ $json.listId }}",
    "entityId": "{{ $json.organizationId }}"
  }
}

Remove a list entry:

{
  "type": "affinity",
  "parameters": {
    "resource": "listEntry",
    "operation": "delete",
    "listId": "{{ $json.listId }}",
    "listEntryId": "{{ $json.listEntryId }}"
  }
}

Error Handling

ModeBehavior
stopHalts workflow on first error
continueSkips failed items, passes successful ones through
errorPortRoutes failed items to Error output port

Tips

Manage organizations, persons, lists, and list entries in Affinity CRM via API.

Important Notes

  • Collection type parameters (additionalFields, updateFields, options) use flat object structure
  • The emails parameter for persons accepts comma-separated values
  • List IDs can be found using the List > Get Many operation
  • Entity IDs refer to persons, organizations, or opportunities that can be added to lists
  • When updating persons, the emails field is always sent even if not changed

Frequently asked questions

What credential do I need to connect the Affinity node?

You need an Affinity API credential, configured in BusyBot as type `affinityApi`. You can generate an API key from your Affinity account settings. Without this credential the node cannot authenticate any requests.

How do I find the List ID I need when adding an entry to a list?

Use the List > Get Many operation first. It returns all lists in your Affinity account along with their IDs. Copy the ID from that result and pass it into any subsequent List Entry operation that requires one.

How should I supply multiple email addresses when creating or updating a person?

The `emails` parameter accepts a single comma-separated string — for example `alice@example.com,bob@example.com`. Also be aware that when updating a person record, the `emails` field is always included in the API request even if you haven't changed it, so make sure the value is complete and correct before running an update.

What do 'Entity IDs' refer to when working with list entries?

Entity IDs identify the specific Affinity record — a person, organization, or opportunity — that you want to associate with a list entry. They are not the same as list IDs. Retrieve them from earlier Get or Search operations on the relevant resource type before passing them to List Entry operations.

What happens when this node encounters an error, and how do I handle it in my workflow?

The Affinity node has two outputs: Output and Error. Successful results flow through the Output branch; any API or configuration error routes to the Error branch instead. Wire the Error output to a notification step or a fallback action so your workflow handles failures gracefully without silently dropping data.

Build with the Affinity node

Drop it into a workflow, wire it to an agent, or call it on a schedule. You'll need Affinity API credentials first.

Open BusyBot

Last updated . Spotted something wrong? Tell us.