Search all guides

Reference · Tools

Affinity integration

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.

Works as
Action
Tool name
affinity
Operations
5 — Create , Delete , Get , Get Many , Update
Parameters
43
Outputs
Output, Error
Credentials
Affinity API
Official docs
Affinity docs api-docs.affinity.co

What you can build with Affinity

  • 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.

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.

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 IDstringYes—The 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 IDstringYes—The unique ID of the list to add the entry to. To find list IDs, use the List > Get Many operation.
Entity IDstringYes—The 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 IDstringNo—The 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 IDstringYes—The unique ID of the list that contains the specified list entry. To find list IDs, use the List > Get Many operation.
List Entry IDstringYes—The unique ID of the list entry object to be deleted.

List Entry: Get

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

List Entry: Get Many

ParameterTypeRequiredDefaultDescription
List IDstringNo—The 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
NamestringYes—The name of the organization.
DomainstringYes—The domain name of the organization.
Additional FieldscollectionNo{}Optional fields sent with the new organization.
— Person IDsstringNo—Comma-separated IDs of persons to associate with this organization. Find person IDs via Person > Get Many.

Organization: Delete

ParameterTypeRequiredDefaultDescription
Organization IDstringYes—Unique identifier for the organization.

Organization: Get

ParameterTypeRequiredDefaultDescription
Organization IDstringYes—Unique 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.
— TermstringNo—A 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 IDstringYes—Unique identifier for the organization.
Update FieldscollectionNo{}The fields to change. Anything you leave out is left as it is.
— DomainstringNo—The domain name of the organization.
— NamestringNo—The name of the organization.
— Person IDsstringNo—Comma-separated IDs of persons to associate with this organization. Find person IDs via Person > Get Many.

Person: Create

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

Person: Delete

ParameterTypeRequiredDefaultDescription
Person IDstringYes—Unique identifier for the person.

Person: Get

ParameterTypeRequiredDefaultDescription
Person IDstringYes—Unique 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.
— TermstringNo—A 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 IDstringYes—Unique identifier for the person.
EmailsstringNo—Comma-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 NamestringNo—The first name of the person.
— Last NamestringNo—The last name of the person.
— Organization IDsstringNo—Comma-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 }}.

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

Affinity manages organizations, persons, lists and list entries in the Affinity relationship intelligence CRM. It is the right tool when a workflow must create, update, delete or look up organizations and persons, add or delete list entries, or read its lists in Affinity, rather than in another CRM or a plain contact list. It returns the matching records as JSON items, with the getAll operations paging through many organizations, persons, lists or entries.

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 Affinity

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 reviewed . Spotted something wrong? Tell us.