# Affinity

> Work with your Affinity CRM: find, create and update people and companies with their fields, create deals on your pipelines, add records to lists and set their columns, write notes, and manage reminders. Triggers start a workflow when a list gets a new row, when a column such as Status changes, or when someone writes a note.

App · 25 actions. Web page: https://docs.lodol.com/docs/integrations/affinity

## Actions

### Add to list

Add a person or company to a list, and fill in its columns. Affinity allows the same record on a list twice, so check with 'Get list entries' first if that matters.

**Inputs**

- List (`list_id`, text, required): A list of people or companies. To add to a pipeline, use 'Create opportunity'.
- Person or company ID (`record_id`, text, required): The person (for a list of people) or company (for a list of companies) to add.
- Fields (`fields`, object): Values for the list's columns, such as Status or Amount. Fill in only what should change.

**Outputs**

- `entry` (object): The list row, with its fields

**Example output**

```json
{
  "entry": {
    "created_at": "2026-10-15T09:00:00Z",
    "creator_id": 443,
    "entity_id": 64779194,
    "entity_name": "Acme Corporation",
    "entity_type": "company",
    "field_list": [
      {
        "category": "list",
        "id": "field-1625",
        "name": "Status",
        "value": "Interested",
        "value_type": "ranked-dropdown"
      },
      {
        "category": "list",
        "id": "field-1626",
        "name": "Amount",
        "value": 250000,
        "value_type": "number"
      },
      {
        "category": "relationship-intelligence",
        "id": "last-email",
        "name": "Last Email",
        "value": "2026-10-14T16:20:00Z",
        "value_type": "interaction"
      }
    ],
    "fields": {
      "Amount": 250000,
      "Last Email": "2026-10-14T16:20:00Z",
      "Status": "Interested"
    },
    "id": 442313,
    "list_id": 4974
  }
}
```

### Create company

Add a company to Affinity. Use 'Find companies' first, since Affinity may already know it.

**Inputs**

- Name (`name`, text, required): The company's name.
- Domain (`domain`, text): The company's website domain, such as acme.com. A web address or an email address works too. Affinity links people to the company by it.
- Person IDs (`person_ids`, list): IDs of people who work there, from 'Find people'.

**Outputs**

- `company` (object): The company

**Example output**

```json
{
  "company": {
    "domain": "acme.com",
    "domains": [
      "acme.com"
    ],
    "id": 64779194,
    "is_global": false,
    "name": "Acme Corporation",
    "person_ids": [
      38706
    ]
  }
}
```

### Create note

Write a note on people, companies or opportunities.

**Inputs**

- Note (`content`, text, required): What the note says, as plain text. Line breaks are kept.
- People (`person_ids`, list): IDs of the people the note is about.
- Companies (`company_ids`, list): IDs of the companies the note is about.
- Opportunities (`opportunity_ids`, list): IDs of the opportunities the note is about. Fill in at least one of People, Companies or Opportunities.
- Date (`happened_at`, date and time): When to date the note, to record something past. Defaults to now.

**Outputs**

- `note` (object): The note

**Example output**

```json
{
  "note": {
    "content": "Met at the conference. Follow up in May.",
    "content_html": "<p>Met at the conference. Follow up in May.</p>",
    "created_at": "2026-10-15T09:00:00Z",
    "creator_id": 443,
    "creator_name": "Sam Rivera",
    "id": 22984,
    "type": "entities",
    "updated_at": ""
  }
}
```

### Create opportunity

Create a deal on one of your pipelines, with its people, companies and column values such as Status.

**Inputs**

- Pipeline (`list_id`, text, required): The opportunity list (pipeline) to create it on.
- Name (`name`, text, required): The opportunity's name.
- Person IDs (`person_ids`, list): IDs of the people on it, from 'Find people'.
- Company IDs (`company_ids`, list): IDs of the companies on it, from 'Find companies'.
- Fields (`fields`, object): Values for the pipeline's columns, such as Status or Amount.

**Outputs**

- `opportunity` (object): The opportunity

**Example output**

```json
{
  "opportunity": {
    "company_ids": [
      64779194
    ],
    "id": 117,
    "list_entry_id": 442313,
    "list_id": 4974,
    "name": "Acme Series A",
    "person_ids": [
      38706
    ]
  }
}
```

### Create person

Add a person to Affinity. Use 'Find people' first: Affinity keeps one person per email address.

**Inputs**

- First name (`first_name`, text, required): The person's first name.
- Last name (`last_name`, text, required): The person's last name.
- Email addresses (`emails`, list): Their email addresses. Affinity keeps one person per address, so an address someone already has is refused.
- Company IDs (`company_ids`, list): IDs of companies they work with, from 'Find companies'.

**Outputs**

- `person` (object): The person

**Example output**

```json
{
  "person": {
    "company_ids": [
      64779194
    ],
    "emails": [
      "jo@acme.com"
    ],
    "first_name": "Jo",
    "id": 38706,
    "last_name": "Bloggs",
    "name": "Jo Bloggs",
    "primary_email": "jo@acme.com",
    "type": "external"
  }
}
```

### Create reminder

Remind a teammate to follow up on a person, company or opportunity, once or on a repeating schedule.

**Inputs**

- For (`owner_id`, text, required): The teammate the reminder is for.
- About (`attached_to`, text, required): Whether the reminder is about a person, a company or an opportunity. One of: `person` (A person), `company` (A company), `opportunity` (An opportunity).
- Record ID (`record_id`, text, required): The ID of that person, company or opportunity. A person must be someone outside your team.
- Reminder (`content`, text): What to remember, such as Send the term sheet.
- Due (`due_at`, date and time): When it's due. Required unless it repeats; for a repeating one it sets the first due date.
- Repeat every (days) (`repeat_every_days`, number): Make it repeat: it comes due again this many days after it's last reset. Leave empty for a one-time reminder. From 1 to 3650.
- Reset by (`reset_on`, text): For a repeating reminder, what restarts its countdown. One of: `interaction` (An email or a meeting (default)), `email` (An email), `event` (A meeting). Default: `interaction`.

**Outputs**

- `reminder` (object): The reminder

**Example output**

```json
{
  "reminder": {
    "attached_to": "company",
    "completed_at": "",
    "content": "Send the term sheet",
    "created_at": "2026-10-15T09:00:00Z",
    "creator_id": 443,
    "due_at": "2026-11-02T17:00:00Z",
    "id": 15326,
    "owner_id": 443,
    "record_id": 64779194,
    "repeat_every_days": 0,
    "reset_on": "",
    "status": "active",
    "type": "one-time",
    "updated_at": ""
  }
}
```

### Delete company

Delete a company you added to Affinity, with its field values and list rows. Companies from Affinity's own database can't be deleted. This can't be undone.

**Inputs**

- Company ID (`company_id`, text, required): The company's ID, from 'Find companies' or an earlier step.

**Outputs**

- `company_id` (number): The company deleted
- `deleted` (true/false): Always true once it's deleted

**Example output**

```json
{
  "company_id": 64779194,
  "deleted": true
}
```

### Delete note

Delete a note. Only its author can. This can't be undone.

**Inputs**

- Note ID (`note_id`, text, required): The note's ID, from 'Create note' or 'List notes'.

**Outputs**

- `deleted` (true/false): Always true once it's deleted
- `note_id` (number): The note deleted

**Example output**

```json
{
  "deleted": true,
  "note_id": 22984
}
```

### Delete person

Delete a person from Affinity, with their field values and list rows. This can't be undone.

**Inputs**

- Person ID (`person_id`, text, required): The person's ID, from 'Find people' or an earlier step.

**Outputs**

- `deleted` (true/false): Always true once it's deleted
- `person_id` (number): The person deleted

**Example output**

```json
{
  "deleted": true,
  "person_id": 38706
}
```

### Delete reminder

Delete a reminder. This can't be undone.

**Inputs**

- Reminder ID (`reminder_id`, text, required): The reminder's ID, from 'Create reminder' or 'List reminders'.

**Outputs**

- `deleted` (true/false): Always true once it's deleted
- `reminder_id` (number): The reminder deleted

**Example output**

```json
{
  "deleted": true,
  "reminder_id": 15326
}
```

### Find companies

Find companies by part of their name or domain, in your Affinity and Affinity's own company database. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Name or domain (`search`, text): Part of a company's name or domain. Affinity also searches its own company database. Leave empty to list your companies.
- Page size (`limit`, number): How many to return, 1 to 500. Defaults to 25. From 1 to 500.
- Next page (`page_token`, text): The 'next_page_token' from an earlier page, to get the page after it.

**Outputs**

- `companies` (list): The companies found
- `count` (number): How many were returned
- `next_page_token` (text): Pass this as 'Next page' to get the next page; empty on the last page

**Example output**

```json
{
  "companies": [
    {
      "domain": "acme.com",
      "domains": [
        "acme.com"
      ],
      "id": 64779194,
      "is_global": false,
      "name": "Acme Corporation",
      "person_ids": [
        38706
      ]
    }
  ],
  "count": 1,
  "next_page_token": ""
}
```

### Find people

Find people in Affinity by part of their name or email address. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Name or email (`search`, text): Part of a first name, last name or email address. Leave empty to list everyone.
- Page size (`limit`, number): How many to return, 1 to 500. Defaults to 25. From 1 to 500.
- Next page (`page_token`, text): The 'next_page_token' from an earlier page, to get the page after it.

**Outputs**

- `count` (number): How many were returned
- `next_page_token` (text): Pass this as 'Next page' to get the next page; empty on the last page
- `people` (list): The people found

**Example output**

```json
{
  "count": 1,
  "next_page_token": "",
  "people": [
    {
      "company_ids": [
        64779194
      ],
      "emails": [
        "jo@acme.com"
      ],
      "first_name": "Jo",
      "id": 38706,
      "last_name": "Bloggs",
      "name": "Jo Bloggs",
      "primary_email": "jo@acme.com",
      "type": "external"
    }
  ]
}
```

### Get company

Get one company with every field Affinity has on it: your own fields, enriched ones such as industry and funding, and when you last emailed or met.

**Inputs**

- Company ID (`company_id`, text, required): The company's ID, from 'Find companies' or an earlier step.

**Outputs**

- `company` (object): The company, with its fields

**Example output**

```json
{
  "company": {
    "domain": "acme.com",
    "domains": [
      "acme.com"
    ],
    "field_list": [
      {
        "category": "enriched",
        "id": "affinity-data-industry",
        "name": "Industry",
        "value": [
          "Software"
        ],
        "value_type": "filterable-text-multi"
      },
      {
        "category": "enriched",
        "id": "affinity-data-year-founded",
        "name": "Year Founded",
        "value": 2012,
        "value_type": "number"
      }
    ],
    "fields": {
      "Industry": [
        "Software"
      ],
      "Year Founded": 2012
    },
    "id": 64779194,
    "is_global": false,
    "name": "Acme Corporation"
  }
}
```

### Get current user

Get the Affinity user the connection acts as, and the account it belongs to.

**Inputs**: None.

**Outputs**

- `account` (object): Their Affinity account
- `user` (object): The connected user

**Example output**

```json
{
  "account": {
    "id": 1,
    "name": "Northpoint Ventures",
    "subdomain": "northpoint"
  },
  "user": {
    "email": "sam@northpoint.vc",
    "first_name": "Sam",
    "id": 443,
    "last_name": "Rivera"
  }
}
```

### Get list entries

Get a list's rows with every column's value, or the row of one person, company or opportunity. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- List (`list_id`, text, required): The Affinity list. Pick one, or give its ID from an earlier step.
- Only this record (`record_id`, text): A person's, company's or opportunity's ID, to get just its row on the list. Leave empty for every row.
- Page size (`limit`, number): How many to return, 1 to 100. Defaults to 25. From 1 to 100.
- Next page (`page_token`, text): The 'next_page_token' from an earlier page, to get the page after it.

**Outputs**

- `count` (number): How many were returned
- `entries` (list): The list's rows
- `next_page_token` (text): Pass this as 'Next page' to get the next page; empty on the last page

**Example output**

```json
{
  "count": 1,
  "entries": [
    {
      "created_at": "2026-10-15T09:00:00Z",
      "creator_id": 443,
      "entity_id": 64779194,
      "entity_name": "Acme Corporation",
      "entity_type": "company",
      "field_list": [
        {
          "category": "list",
          "id": "field-1625",
          "name": "Status",
          "value": "Interested",
          "value_type": "ranked-dropdown"
        },
        {
          "category": "list",
          "id": "field-1626",
          "name": "Amount",
          "value": 250000,
          "value_type": "number"
        },
        {
          "category": "relationship-intelligence",
          "id": "last-email",
          "name": "Last Email",
          "value": "2026-10-14T16:20:00Z",
          "value_type": "interaction"
        }
      ],
      "fields": {
        "Amount": 250000,
        "Last Email": "2026-10-14T16:20:00Z",
        "Status": "Interested"
      },
      "id": 442313,
      "list_id": 4974
    }
  ],
  "next_page_token": ""
}
```

### Get lists

Get the lists you can see, with their IDs and what they hold (people, companies or opportunities), optionally by name.

**Inputs**

- Lists of (`holds`, text): Every list, or only those holding one kind of record. One of: `all` (Every list (default)), `person` (Lists of people), `company` (Lists of companies), `opportunity` (Pipelines (opportunities)). Default: `all`.
- Name contains (`search`, text): Only lists whose name contains this text.

**Outputs**

- `count` (number): How many were returned
- `lists` (list): The lists

**Example output**

```json
{
  "count": 1,
  "lists": [
    {
      "created_at": "2025-01-10T09:00:00Z",
      "id": 4974,
      "is_public": true,
      "name": "Deal flow",
      "owner_id": 443,
      "type": "opportunity"
    }
  ]
}
```

### Get person

Get one person with every field Affinity has on them: your own fields, enriched ones such as job title, and when you last emailed or met.

**Inputs**

- Person ID (`person_id`, text, required): The person's ID, from 'Find people' or an earlier step.

**Outputs**

- `person` (object): The person, with their fields

**Example output**

```json
{
  "person": {
    "emails": [
      "jo@acme.com"
    ],
    "field_list": [
      {
        "category": "enriched",
        "id": "affinity-data-job-titles",
        "name": "Job Titles",
        "value": [
          "Head of Partnerships"
        ],
        "value_type": "filterable-text-multi"
      },
      {
        "category": "enriched",
        "id": "affinity-data-location",
        "name": "Location",
        "value": "London, United Kingdom",
        "value_type": "location"
      }
    ],
    "fields": {
      "Job Titles": [
        "Head of Partnerships"
      ],
      "Location": "London, United Kingdom"
    },
    "first_name": "Jo",
    "id": 38706,
    "last_name": "Bloggs",
    "name": "Jo Bloggs",
    "primary_email": "jo@acme.com",
    "type": "external"
  }
}
```

### List notes

List notes, all of them or one record's, optionally only those written since a time. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Notes on (`attached_to`, text): Every note you can see, or only one record's notes. One of: `all` (Any record (default)), `person` (A person), `company` (A company), `opportunity` (An opportunity). Default: `all`.
- Record ID (`record_id`, text): The ID of the person, company or opportunity. Only when Notes on is A person, A company or An opportunity.
- Written since (`created_after`, date and time): Only notes written at or after this time.
- Page size (`limit`, number): How many to return, 1 to 100. Defaults to 25. From 1 to 100.
- Next page (`page_token`, text): The 'next_page_token' from an earlier page, to get the page after it.

**Outputs**

- `count` (number): How many were returned
- `next_page_token` (text): Pass this as 'Next page' to get the next page; empty on the last page
- `notes` (list): The notes

**Example output**

```json
{
  "count": 1,
  "next_page_token": "",
  "notes": [
    {
      "content": "Met at the conference. Follow up in May.",
      "content_html": "<p>Met at the conference. Follow up in May.</p>",
      "created_at": "2026-10-15T09:00:00Z",
      "creator_id": 443,
      "creator_name": "Sam Rivera",
      "id": 22984,
      "type": "entities",
      "updated_at": ""
    }
  ]
}
```

### List reminders

List reminders, soonest due first, by teammate, status, record or due date. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- For (`owner_id`, text): Only reminders for this teammate.
- Status (`status`, text): Only active, overdue or completed reminders. One of: `active`, `overdue`, `completed`.
- About (`attached_to`, text): Only reminders about one record: say which kind. One of: `person` (A person), `company` (A company), `opportunity` (An opportunity).
- Record ID (`record_id`, text): The ID of that person, company or opportunity. Only when About is A person, A company or An opportunity.
- Due after (`due_after`, date and time): Only reminders due at or after this time.
- Due before (`due_before`, date and time): Only reminders due at or before this time.
- Page size (`limit`, number): How many to return, 1 to 100. Defaults to 25. From 1 to 100.
- Next page (`page_token`, text): The 'next_page_token' from an earlier page, to get the page after it.

**Outputs**

- `count` (number): How many were returned
- `next_page_token` (text): Pass this as 'Next page' to get the next page; empty on the last page
- `reminders` (list): The reminders

**Example output**

```json
{
  "count": 1,
  "next_page_token": "",
  "reminders": [
    {
      "attached_to": "company",
      "completed_at": "",
      "content": "Send the term sheet",
      "created_at": "2026-10-15T09:00:00Z",
      "creator_id": 443,
      "due_at": "2026-11-02T17:00:00Z",
      "id": 15326,
      "owner_id": 443,
      "record_id": 64779194,
      "repeat_every_days": 0,
      "reset_on": "",
      "status": "active",
      "type": "one-time",
      "updated_at": ""
    }
  ]
}
```

### Remove from list

Take a row off a list, with the values in its list-only columns. The person or company stays in Affinity; on a pipeline, the opportunity is deleted.

**Inputs**

- List (`list_id`, text, required): The Affinity list. Pick one, or give its ID from an earlier step.
- List entry ID (`list_entry_id`, text, required): The row's ID on that list, from 'Get list entries', 'Add to list' or a trigger. It isn't the person's or company's own ID.

**Outputs**

- `list_entry_id` (number): The row removed
- `list_id` (number): The list
- `removed` (true/false): Always true once it's removed

**Example output**

```json
{
  "list_entry_id": 442313,
  "list_id": 4974,
  "removed": true
}
```

### Update company

Change a company's name or domain, add people to it, or set its fields. Only what you fill in changes.

**Inputs**

- Company ID (`company_id`, text, required): The company's ID, from 'Find companies' or an earlier step.
- Name (`name`, text): A new name. Leave empty to keep it. Companies from Affinity's own database can't be renamed.
- Domain (`domain`, text): A new website domain, such as acme.com. Leave empty to keep it.
- Add person IDs (`add_person_ids`, list): IDs of people to associate with it. Current ones are kept.
- Fields (`fields`, object): Values for the fields every company has, such as your own global fields. Fill in only what should change.

**Outputs**

- `company` (object): The company, with its fields

**Example output**

```json
{
  "company": {
    "domain": "acme.com",
    "domains": [
      "acme.com"
    ],
    "field_list": [
      {
        "category": "enriched",
        "id": "affinity-data-industry",
        "name": "Industry",
        "value": [
          "Software"
        ],
        "value_type": "filterable-text-multi"
      },
      {
        "category": "enriched",
        "id": "affinity-data-year-founded",
        "name": "Year Founded",
        "value": 2012,
        "value_type": "number"
      }
    ],
    "fields": {
      "Industry": [
        "Software"
      ],
      "Year Founded": 2012
    },
    "id": 64779194,
    "is_global": false,
    "name": "Acme Corporation"
  }
}
```

### Update list entry fields

Set a list row's columns, such as a deal's Status, Owners or Amount. Only what you fill in changes.

**Inputs**

- List (`list_id`, text, required): The Affinity list. Pick one, or give its ID from an earlier step.
- List entry ID (`list_entry_id`, text, required): The row's ID on that list, from 'Get list entries', 'Add to list' or a trigger. It isn't the person's or company's own ID.
- Fields (`fields`, object, required): Values for the list's columns, such as Status or Amount. Fill in only what should change.

**Outputs**

- `entry` (object): The list row, with its fields

**Example output**

```json
{
  "entry": {
    "created_at": "2026-10-15T09:00:00Z",
    "creator_id": 443,
    "entity_id": 64779194,
    "entity_name": "Acme Corporation",
    "entity_type": "company",
    "field_list": [
      {
        "category": "list",
        "id": "field-1625",
        "name": "Status",
        "value": "Interested",
        "value_type": "ranked-dropdown"
      },
      {
        "category": "list",
        "id": "field-1626",
        "name": "Amount",
        "value": 250000,
        "value_type": "number"
      },
      {
        "category": "relationship-intelligence",
        "id": "last-email",
        "name": "Last Email",
        "value": "2026-10-14T16:20:00Z",
        "value_type": "interaction"
      }
    ],
    "fields": {
      "Amount": 250000,
      "Last Email": "2026-10-14T16:20:00Z",
      "Status": "Interested"
    },
    "id": 442313,
    "list_id": 4974
  }
}
```

### Update opportunity

Rename an opportunity or add people and companies to it. To change its Status or other columns, use 'Update list entry fields' with its list entry ID.

**Inputs**

- Opportunity ID (`opportunity_id`, text, required): The opportunity's ID, from 'Create opportunity' or a list row.
- Name (`name`, text): A new name. Leave empty to keep it.
- Add person IDs (`add_person_ids`, list): IDs of people to add to it. Current ones are kept.
- Add company IDs (`add_company_ids`, list): IDs of companies to add to it. Current ones are kept.

**Outputs**

- `opportunity` (object): The opportunity

**Example output**

```json
{
  "opportunity": {
    "company_ids": [
      64779194
    ],
    "id": 117,
    "list_entry_id": 442313,
    "list_id": 4974,
    "name": "Acme Series A",
    "person_ids": [
      38706
    ]
  }
}
```

### Update person

Change a person's name, add email addresses or companies, or set their fields. Only what you fill in changes.

**Inputs**

- Person ID (`person_id`, text, required): The person's ID, from 'Find people' or an earlier step.
- First name (`first_name`, text): A new first name. Leave empty to keep it.
- Last name (`last_name`, text): A new last name. Leave empty to keep it.
- Add email addresses (`add_emails`, list): Email addresses to add. Their current ones are kept.
- Add company IDs (`add_company_ids`, list): IDs of companies to associate them with. Current ones are kept.
- Fields (`fields`, object): Values for the fields every person has, such as Industry or your own global fields. Fill in only what should change.

**Outputs**

- `person` (object): The person, with their fields

**Example output**

```json
{
  "person": {
    "emails": [
      "jo@acme.com"
    ],
    "field_list": [
      {
        "category": "enriched",
        "id": "affinity-data-job-titles",
        "name": "Job Titles",
        "value": [
          "Head of Partnerships"
        ],
        "value_type": "filterable-text-multi"
      },
      {
        "category": "enriched",
        "id": "affinity-data-location",
        "name": "Location",
        "value": "London, United Kingdom",
        "value_type": "location"
      }
    ],
    "fields": {
      "Job Titles": [
        "Head of Partnerships"
      ],
      "Location": "London, United Kingdom"
    },
    "first_name": "Jo",
    "id": 38706,
    "last_name": "Bloggs",
    "name": "Jo Bloggs",
    "primary_email": "jo@acme.com",
    "type": "external"
  }
}
```

### Update reminder

Change a reminder's text, due date or teammate, or mark it complete. Only what you fill in changes.

**Inputs**

- Reminder ID (`reminder_id`, text, required): The reminder's ID, from 'Create reminder' or 'List reminders'.
- Reminder (`content`, text): New text for the reminder. Leave empty to keep it.
- Due (`due_at`, date and time): A new due date. Leave empty to keep it.
- For (`owner_id`, text): Reassign it to another teammate. Leave empty to keep it.
- Complete (`completion`, text): Mark it complete, or not complete again. Completing a repeating reminder moves it to its next due date. One of: `complete` (Mark it complete), `reopen` (Mark it not complete).

**Outputs**

- `reminder` (object): The reminder

**Example output**

```json
{
  "reminder": {
    "attached_to": "company",
    "completed_at": "2026-10-20T10:00:00Z",
    "content": "Send the term sheet",
    "created_at": "2026-10-15T09:00:00Z",
    "creator_id": 443,
    "due_at": "2026-11-02T17:00:00Z",
    "id": 15326,
    "owner_id": 443,
    "record_id": 64779194,
    "repeat_every_days": 0,
    "reset_on": "",
    "status": "completed",
    "type": "one-time",
    "updated_at": "2026-10-20T10:00:00Z"
  }
}
```
