Skip to main content
Integrations · Affinity
A Guild agent reads and updates your Affinity CRM, searches records, retrieves interaction history, and resolves introduction paths without exposing credentials to agent code. Guild stores the Affinity API key server-side and injects it through its credential proxy, so the key never appears in agent logic. Credential policies let you restrict which operations each agent can call, and every request is auditable through that same proxy.

Book a demo

See how teams govern agents that use Affinity.

Talk to sales

Get access to Guild, then connect Affinity to your first agent.

What the Affinity integration exposes

The tools cover companies, people, opportunities, and list entries, including reading and writing field values in batch. They also cover notes, meetings, calls, emails, chat messages, transcripts, files, reminders, webhooks, and teams. Tools for duplicate detection let an agent retrieve suggestions and initiate merges for both company and person profiles. Relationship tools return interaction scores, inferred connections, and ranked introduction paths.

How it works

1

Open credentials in Guild

Go to your organization at app.guild.ai and open Access & setup > Credentials. Guild supports account, workspace, member, and agent-scoped credentials for Affinity; see Credentials for the differences.
2

Connect the Affinity integration

Click Connect, select affinity-openapi, and paste your Affinity API key into the API Key field. Guild sends the key as a bearer token in the Authorization header on every request.
3

Import tools into your agent

Import AffinityOpenapiTools from @guildai-services/guildai~affinity-openapi and spread it into your agent’s tools object. Use pick() with the affinity_openapi_ prefix to include only the tools your agent needs.

Why Affinity access needs governing

Affinity holds sensitive relationship data: interaction scores, communication history, investor connections, and deal information. An agent with unrestricted access could read every contact, update opportunity fields, merge profiles, or create webhooks across the whole organization. Guild’s credential proxy enforces credential policies before any request leaves Guild, so you can write ALLOW and DENY rules scoped to specific operations, agents, or workspaces. A rule that allows only read operations on companies and persons, for example, blocks an agent from updating fields or initiating merges even if the underlying API key permits it. Guild stores the API key server-side and injects it after the policy check passes. Agent code never sees the key. You can scope a credential to one workspace, one member, or one agent using the Credentials page, and pair it with Credential policies that limit the operations each agent may call. That combination keeps a narrowly scoped research agent separate from a pipeline agent that writes field values.

About the Affinity integration

Agents can read and update CRM data in Affinity, including companies, people, opportunities, and list entries. They can create and manage notes, search records, retrieve meeting and email history, and work with files and reminders. Agents can also merge duplicate profiles and explore relationship paths and inferred connections. The integration is guildai~affinity-openapi.

Authentication

  • Type: API key
  • Header: Guild sends the key as a bearer token in the Authorization header

Setup

1

Connect Affinity

In Guild, go to Access & setup > Credentials, click Connect, select affinity-openapi, and paste the key into API Key.
See Credentials for workspace, member, and agent-scoped credentials.

Usage

Selecting specific tools

Tools are named with the affinity_openapi_ prefix. Use pick() to include only what your agent needs.

Tools

Tools in the latest published version of guildai~affinity-openapi:

Frequently asked questions

Not yet. The catalog entry for guildai~affinity-openapi lists no webhook events, so the integration does not deliver inbound event triggers to Guild agents.
Write a DENY rule in Credential policies that targets the merge operations and scopes it to the agent that should be blocked. The other agent, not covered by that rule, continues to call the merge tools normally.
Yes. Connect a workspace-scoped credential on that workspace’s Credentials page and choose The whole workspace. Guild resolves the workspace credential ahead of the account-level credential for agents running in that workspace.
No. Guild injects the key server-side through its credential proxy after the credential policy check passes. The key is never passed to agent code.

Put a governed agent on Affinity this week

Book a demo

See how teams govern agents that use Affinity.

Talk to sales

Get access to Guild, then connect Affinity to your first agent.
Also runs on Guild: Attio · Brex · Gong · Google Ads Read: Docs: Credential policies · Credentials · Tools in agents
Last modified on November 20, 2026