Affinity CRM Operations Tool Server for AI Agents - n8n Workflow

Use this comprehensive n8n workflow to expose 16 different Affinity CRM operations (People, Organizations, Lists) via a specialized n8n trigger. Essential for custom AI agents.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

AI Agent Developers: Those building complex AI systems that require reliable access to CRM data using n8n. CRM Power Users: Individuals needing a single, consolidated endpoint to manage a vast array of Affinity data operations. n8n Automation Specialists: Users looking for advanced examples of combining specialized n8n node configurations (like mcpTrigger) with standard integrations. DevOps Teams: Groups deploying microservices where Affinity operations must be exposed as callable tools via a standardized n8n workflow API.

Overview

This specialized n8n workflow template is designed to function as a powerful backend tool server for external AI agents or complex automation orchestrators. Instead of creating 16 individual API endpoints, this single n8n workflow leverages the Managed Command Processor (MCP) trigger to consolidate all necessary Affinity CRM CRUD operations (Create, Read, Update, Delete) for Lists, People, and Organizations. By using this n8n template, you gain immediate, structured access to critical CRM functionality, making it easy for an AI agent to decide which n8n node to execute based on its natural language input. This is a highly efficient way to manage large-scale tool exposure within the n8n environment.

How it Works

This n8n workflow employs a specialized structure where a single n8n trigger handles incoming requests and delegates execution to one of 16 connected tools.


  1. Trigger Activation (Affinity Tool MCP Server): The workflow starts with the mcpTrigger n8n trigger. This trigger establishes a webhook endpoint that expects structured commands from an AI orchestrator (like a LangChain agent). This single n8n trigger acts as the dispatcher for all subsequent operations.

  2. Tool Exposure: All 16 affinityTool n8n node instances are connected to the mcpTrigger using the ai_tool connection type. This registers each function—such as 'Create a person' or 'Delete an organization'—as a callable tool available to the external agent.

  3. Agent Selection: When the agent sends a command (e.g., “Find the latest list entry for John Doe”), the mcpTrigger directs the request to the relevant n8n node ('Get a list entry') based on the agent's decision and executed tool call.

  4. Execution: The targeted Affinity n8n node executes the specific CRM operation (e.g., retrieving or modifying data).

  5. Result Return: The result of the n8n node execution is returned back through the mcpTrigger endpoint to the initiating AI agent.

Installation Guide

To deploy this comprehensive n8n workflow, follow these steps:


  1. Import the n8n Workflow: Copy the provided JSON data and navigate to your n8n instance. Click 'New' -> 'Import from JSON' and paste the code.

  2. Configure Credentials: Before activating the n8n workflow, you must configure the credentials for the Affinity Tool n8n node. This typically involves providing an API key or access token for your Affinity CRM account.

  3. Activate the Trigger: Since this is a specialized n8n trigger (mcpTrigger), once the workflow is active, n8n will provide the necessary webhook URL. This URL is what your external AI agent framework (e.g., LangChain application) will use to access all 16 exposed tools.

  4. Testing: Execute the workflow via your AI agent setup to ensure the n8n node connections are functioning correctly and data operations are processed as expected.

Node Details

This n8n workflow utilizes the specialized Affinity Tool node to provide comprehensive coverage of CRM data manipulation:

Affinity Tool MCP Server (mcpTrigger): This special n8n trigger serves as the central API endpoint. It facilitates communication between an external AI agent and the internal n8n workflow nodes, routing the request to the appropriate function.

Affinity Tool n8n Node (List Operations):
Get a list
Get many lists
Create a list entry
Delete a list entry
Get a list entry
Get many list entries

Affinity Tool n8n Node (Organization Operations):
Create an organization
Delete an organization
Get an organization
Get many organizations
Update an organization

Affinity Tool n8n Node (People Operations):
Create a person
Delete a person
Get a person
Get many people
Update a person

All 16 Affinity n8n node instances are configured to operate as callable tools for the main n8n trigger, creating a robust, unified service.

Related n8n Workflows

Paid

Nodes: 3 Nodes
Updated: December 26 2025
View all
Created by

A hacker by nature, programmer by trade ⚒️ I'm looking to collaborate on things that save human labor 📫 How to reach me Github👇 -> Discord

Featured*