intercom-core-workflow-a
Manage Intercom contacts: create, search, update, merge leads into users. Use when building contact management features, syncing user data, or implementing contact search and segmentation. Trigger with phrases like "intercom contacts", "intercom users", "intercom leads", "create intercom contact", "search intercom contacts", "merge intercom lead".
Best use case
intercom-core-workflow-a is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Manage Intercom contacts: create, search, update, merge leads into users. Use when building contact management features, syncing user data, or implementing contact search and segmentation. Trigger with phrases like "intercom contacts", "intercom users", "intercom leads", "create intercom contact", "search intercom contacts", "merge intercom lead".
Teams using intercom-core-workflow-a should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/intercom-core-workflow-a/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How intercom-core-workflow-a Compares
| Feature / Agent | intercom-core-workflow-a | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Manage Intercom contacts: create, search, update, merge leads into users. Use when building contact management features, syncing user data, or implementing contact search and segmentation. Trigger with phrases like "intercom contacts", "intercom users", "intercom leads", "create intercom contact", "search intercom contacts", "merge intercom lead".
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
ChatGPT vs Claude for Agent Skills
Compare ChatGPT and Claude for AI agent skills across coding, writing, research, and reusable workflow execution.
Cursor vs Codex for AI Workflows
Compare Cursor and Codex for AI coding workflows, repository assistance, debugging, refactoring, and reusable developer skills.
SKILL.md Source
# Intercom Contacts & Contact Management
## Overview
Primary workflow for managing Intercom contacts. Covers creating users and leads, searching with filters, updating custom attributes, merging leads into users, and managing tags and segments.
## Prerequisites
- Completed `intercom-install-auth` setup
- Understanding of Intercom contact model (users vs leads)
- Valid API credentials with contacts read/write scope
## Instructions
### Step 1: Create Contacts
```typescript
import { IntercomClient } from "intercom-client";
const client = new IntercomClient({
token: process.env.INTERCOM_ACCESS_TOKEN!,
});
// Create an identified user (has external_id)
const user = await client.contacts.create({
role: "user",
externalId: "customer-9001",
email: "alice@acme.com",
name: "Alice Johnson",
phone: "+1-555-0100",
customAttributes: {
plan: "enterprise",
company_size: 500,
signed_up_at: Math.floor(Date.now() / 1000),
},
});
// Response: { type: "contact", id: "6657add46abd...", role: "user", ... }
// Create an anonymous lead (no external_id required)
const lead = await client.contacts.create({
role: "lead",
email: "visitor@example.com",
name: "Website Visitor",
customAttributes: {
landing_page: "/pricing",
utm_source: "google",
},
});
```
### Step 2: Search Contacts
POST to `https://api.intercom.io/contacts/search` with query filters.
```typescript
// Simple search by email
const byEmail = await client.contacts.search({
query: {
field: "email",
operator: "=",
value: "alice@acme.com",
},
});
// Compound search: users on enterprise plan who signed up recently
const filtered = await client.contacts.search({
query: {
operator: "AND",
value: [
{ field: "role", operator: "=", value: "user" },
{ field: "custom_attributes.plan", operator: "=", value: "enterprise" },
{ field: "signed_up_at", operator: ">", value: Math.floor(Date.now() / 1000) - 86400 * 30 },
],
},
pagination: { per_page: 50 },
sort: { field: "created_at", order: "descending" },
});
console.log(`Found ${filtered.totalCount} contacts`);
for (const contact of filtered.data) {
console.log(` ${contact.name} (${contact.email}) - plan: ${contact.customAttributes?.plan}`);
}
```
### Step 3: Update a Contact
```typescript
const updated = await client.contacts.update({
contactId: user.id,
name: "Alice Johnson-Smith",
customAttributes: {
plan: "enterprise_plus",
upgraded_at: Math.floor(Date.now() / 1000),
},
});
```
### Step 4: Merge a Lead into a User
When an anonymous lead is identified, merge them into a user contact. The lead's conversation history transfers to the user.
```typescript
// Lead must have role "lead", user must have role "user"
const merged = await client.contacts.merge({
from: lead.id, // Lead ID (will be deleted)
into: user.id, // User ID (will absorb lead data)
});
console.log(`Merged lead into user: ${merged.id}`);
// The lead's conversations, events, and tags are now on the user
```
### Step 5: List Segments for a Contact
```typescript
const segments = await client.contacts.listSegments({
contactId: user.id,
});
for (const segment of segments.data) {
console.log(`Segment: ${segment.name} (${segment.id})`);
}
```
### Step 6: Paginate All Contacts
```typescript
async function* allContacts(client: IntercomClient) {
let startingAfter: string | undefined;
do {
const page = await client.contacts.list({
perPage: 50,
startingAfter,
});
for (const contact of page.data) {
yield contact;
}
startingAfter = page.pages?.next?.startingAfter ?? undefined;
} while (startingAfter);
}
// Stream all contacts
let count = 0;
for await (const contact of allContacts(client)) {
count++;
if (count % 100 === 0) console.log(`Processed ${count} contacts`);
}
```
## Contact Data Model
| Field | Type | Description |
|-------|------|-------------|
| `id` | string | Intercom-generated unique ID |
| `external_id` | string | Your system's user ID |
| `role` | `"user"` or `"lead"` | Contact type |
| `email` | string | Email address |
| `name` | string | Full name |
| `phone` | string | Phone number |
| `custom_attributes` | object | Custom key-value data |
| `created_at` | number | Unix timestamp |
| `last_seen_at` | number | Last activity timestamp |
| `signed_up_at` | number | Signup timestamp |
| `tags` | object | Applied tags list |
| `companies` | object | Associated companies |
| `location` | object | GeoIP location data |
## Error Handling
| Error | HTTP Code | Cause | Solution |
|-------|-----------|-------|----------|
| `not_found` | 404 | Contact ID doesn't exist | Verify with search first |
| `conflict` | 409 | Duplicate `external_id` or `email` | Search before creating |
| `parameter_invalid` | 422 | Bad field value or missing required field | Check field types and names |
| `rate_limit_exceeded` | 429 | Over 10,000 req/min (private apps) | Add backoff, batch operations |
| `merge_not_possible` | 400 | Merging user into lead (reversed) | `from` must be lead, `into` must be user |
## Resources
- [Contacts API](https://developers.intercom.com/docs/references/rest-api/api.intercom.io/contacts)
- [Search Contacts](https://developers.intercom.com/docs/references/rest-api/api.intercom.io/contacts/searchcontacts)
- [Merge Contacts](https://developers.intercom.com/docs/references/rest-api/api.intercom.io/contacts/mergecontact)
- [Contact Guides](https://developers.intercom.com/docs/guides/contacts)
## Next Steps
For conversation management, see `intercom-core-workflow-b`.Related Skills
calendar-to-workflow
Converts calendar events and schedules into Claude Code workflows, meeting prep documents, and standup notes. Use when the user mentions calendar events, meeting prep, standup generation, or scheduling workflows. Trigger with phrases like "prep for my meetings", "generate standup notes", "create workflow from calendar", or "summarize today's schedule".
workhuman-core-workflow-b
Workhuman core workflow b for employee recognition and rewards API. Use when integrating Workhuman Social Recognition, or building recognition workflows with HRIS systems. Trigger: "workhuman core workflow b".
workhuman-core-workflow-a
Workhuman core workflow a for employee recognition and rewards API. Use when integrating Workhuman Social Recognition, or building recognition workflows with HRIS systems. Trigger: "workhuman core workflow a".
wispr-core-workflow-b
Wispr Flow core workflow b for voice-to-text API integration. Use when integrating Wispr Flow dictation, WebSocket streaming, or building voice-powered applications. Trigger: "wispr core workflow b".
wispr-core-workflow-a
Wispr Flow core workflow a for voice-to-text API integration. Use when integrating Wispr Flow dictation, WebSocket streaming, or building voice-powered applications. Trigger: "wispr core workflow a".
windsurf-core-workflow-b
Execute Windsurf's secondary workflow: Workflows, Memories, and reusable automation. Use when creating reusable Cascade workflows, managing persistent memories, or automating repetitive development tasks. Trigger with phrases like "windsurf workflow", "windsurf automation", "windsurf memories", "cascade workflow", "windsurf slash command".
windsurf-core-workflow-a
Execute Windsurf's primary workflow: Cascade Write mode for multi-file agentic coding. Use when building features, refactoring across files, or performing complex code tasks. Trigger with phrases like "windsurf cascade write", "windsurf agentic coding", "windsurf multi-file edit", "cascade write mode", "windsurf build feature".
webflow-core-workflow-b
Execute Webflow secondary workflows — Sites management, Pages API, Forms submissions, Ecommerce (products/orders/inventory), and Custom Code via the Data API v2. Use when managing sites, reading pages, handling form data, or working with Webflow Ecommerce products and orders. Trigger with phrases like "webflow sites", "webflow pages", "webflow forms", "webflow ecommerce", "webflow products", "webflow orders".
webflow-core-workflow-a
Execute the primary Webflow workflow — CMS content management: list collections, CRUD items, publish items, and manage content lifecycle via the Data API v2. Use when working with Webflow CMS collections and items, managing blog posts, team members, or any dynamic content. Trigger with phrases like "webflow CMS", "webflow collections", "webflow items", "create webflow content", "manage webflow CMS", "webflow content management".
veeva-core-workflow-b
Veeva Vault core workflow b for REST API and clinical operations. Use when working with Veeva Vault document management and CRM. Trigger: "veeva core workflow b".
veeva-core-workflow-a
Veeva Vault core workflow a for REST API and clinical operations. Use when working with Veeva Vault document management and CRM. Trigger: "veeva core workflow a".
vastai-core-workflow-b
Execute Vast.ai secondary workflow: multi-instance orchestration, spot recovery, and cost optimization. Use when running distributed training, handling spot preemption, or optimizing GPU spend across multiple instances. Trigger with phrases like "vastai distributed training", "vastai spot recovery", "vastai multi-gpu", "vastai cost optimization".