<!-- BusyBot node reference — https://busybot.net/tools/affinity-trigger/ -->

> Node: Affinity Trigger (`affinity_trigger`) · Webhook trigger · v1
> Category: Sales · Credentials: Affinity API (`affinityApi`)
> Updated: 2026-08-16

# Affinity Trigger

> Triggers on Affinity CRM events like person, organization, or opportunity changes.

## Overview

The Affinity Trigger node listens for webhook events from Affinity CRM. When configured events occur (such as creating or updating persons, organizations, opportunities, lists, list entries, notes, fields, or files), Affinity sends an HTTP POST to this webhook. The node receives the event payload, identifies the resource type and ID, and outputs the event data for downstream processing. Supports 25 distinct event types across 9 resource categories.

**Category:** Sales  
**Tool Name:** `affinity_trigger`  
**Version:** 1

**Appearance:** Icon: `lucide-Network` | Color: `#5948a2`

## Node Type

**Trigger** — webhook (receives incoming HTTP callbacks)

## Input / Output

| Direction | Port(s) |
|-----------|--------|
| Input | None (trigger node) |
| Output | `Output` |

## Credentials

This tool requires **Affinity API** credentials.
See the [Credentials Guide](https://busybot.net/credentials/affinity-api/) for setup instructions.

### Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Events | `multiOptions` | Yes | `[]` | Which Affinity events to listen for. Select one or more event types that will trigger this workflow. |
| | | | | Options: `field_value.created`, `field_value.deleted`, `field_value.updated`, `field.created`, `field.deleted`, `field.updated`, `file.created`, `file.deleted`, `list_entry.created`, `list_entry.deleted`, `list.created`, `list.deleted`, `list.updated`, `note.created`, `note.deleted`, `note.updated`, `opportunity.created`, `opportunity.deleted`, `opportunity.updated`, `organization.created`, `organization.deleted`, `organization.updated`, `person.created`, `person.deleted`, `person.updated` |

## Output Data

Each delivered event produces one output item:

- `type` — the Affinity event type, e.g. `person.created`
- `resource` — the part of the event before the dot, e.g. `person`
- `action` — the part after the dot, e.g. `created`
- `entityId` — the ID of the entity the event is about, or `null` when Affinity does not send one
- `body` — the entity data Affinity sent for the event (for `person.created`, fields such as `id`, `first_name`, `last_name`, `emails`, `organization_ids`)
- `_rawPayload` — the complete, unmodified webhook payload
- `_trigger` — always `affinity_webhook`
- `_timestamp` — ISO 8601 timestamp of when the request arrived
- `_webhookEvent` — the same value as `type`

Affinity's `sample.webhook` test ping is acknowledged but does not start the workflow.

Reference the payload downstream by expression, e.g. `{{ $json.body.first_name }}` or `{{ $json.entityId }}`.

## Usage Examples

- Trigger workflow when a new person is created in Affinity
- React to organization updates in Affinity CRM
- Start automation when an opportunity is created or updated
- Listen for new list entries added in Affinity
- Detect when notes are created or deleted in Affinity

## Example Configuration

Watch for new and updated people:

```json
{
  "type": "affinity_trigger",
  "parameters": {
    "events": ["person.created", "person.updated"]
  }
}
```

Track the full opportunity lifecycle:

```json
{
  "type": "affinity_trigger",
  "parameters": {
    "events": ["opportunity.created", "opportunity.updated", "opportunity.deleted"]
  }
}
```

React to pipeline movement and notes:

```json
{
  "type": "affinity_trigger",
  "parameters": {
    "events": ["list_entry.created", "list_entry.deleted", "note.created"]
  }
}
```

### Trigger Behavior

- **Activation:** When the workflow is activated, a webhook endpoint is registered with the service.
- **Deactivation:** The webhook is automatically unregistered when the workflow is deactivated.
- **Payload:** The incoming webhook payload is parsed and output as workflow items.
- **Verification:** Supports signature verification where applicable.

## Tips

Receives webhook events from Affinity CRM. Configure which events to listen for (e.g., person.created, organization.updated, opportunity.deleted). When the event fires, the trigger outputs the event type and associated entity data.

- One node can subscribe to several event types at once. Branch on `{{ $json.type }}` (or on `resource` / `action`) with a Switch node when different events need different handling.
- Affinity rejects webhook URLs that contain spaces, so keep the workflow's webhook path free of them.
- `body` holds what Affinity chose to send with the event. If you need the complete current record, follow the trigger with an HTTP Request node that fetches it by `{{ $json.entityId }}`.