/intercom-pack:intercom-data-handlingfrom intercom-pack
Handles Intercom contact data for GDPR/CCPA compliance: DSAR export, right-to-deletion, PII redaction in logs, and data retention policies.
Ships in intercom-pack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Handle sensitive contact data in Intercom integrations with GDPR/CCPA compliance: data export via the Data Export API, contact deletion with an audit trail, PII redaction in logs, and data retention policies. This skill gives you a lean map of the five workflows here; the full copy-ready TypeScript lives in references/implementation.md and worked usage in references/examples.md.
intercom-client SDK installedEvery call authenticates with an Intercom access token via a Bearer header. Store
it as INTERCOM_ACCESS_TOKEN in the environment — never hardcode it and never log
it:
import { IntercomClient } from "intercom-client";
const client = new IntercomClient({
token: process.env.INTERCOM_ACCESS_TOKEN!,
});
// Raw REST calls use: Authorization: `Bearer ${process.env.INTERCOM_ACCESS_TOKEN}`
Grant the token the minimum scopes needed (read contacts/conversations for export, write/delete for erasure). Rotate it if it ever appears in a log or a diff.
| Category | Intercom Fields | Handling |
|---|---|---|
| PII | email, name, phone, location | Encrypt at rest, redact in logs |
| Identifiers | id, external_id, user_id | Use for lookups, no display |
| Conversation content | body, conversation_parts | May contain PII, scan before logging |
| Custom attributes | User-defined | Depends on content |
| System metadata | created_at, updated_at, role | Standard handling |
The five workflows below compose into a compliant Intercom data lifecycle. Follow the summary here, then open references/implementation.md for the complete function bodies.
exportContactData(contactId) gathers the contact profile,
all conversations (with parts), tags, segments, and data events into one bundle.
This is the "give me all my data" request.deleteContactData(contactId) exports for
the audit trail first, then deletes from Intercom and every local cache, and
records a PII-free audit entry (email is hashed, not stored).bulkExportMessages(start, end) kicks off the async
/export/messages/data job; checkExportStatus(jobId) polls until a CSV
download_url is returned.redactIntercomData(data) masks a fixed
PII_FIELDS set (including nested custom_attributes.*) before anything is
logged.enforceRetention() sweeps cached records past
their RETENTION window on a daily cron, and never touches the 7-year audit log.Data minimization underpins all five: sync only the fields you need so the erasure and breach surface stays small (see references/examples.md).
Here is the entry-point skeleton — the export that DSAR and deletion both build on:
const contact = await client.contacts.find({ contactId });
const convList = await client.conversations.search({
query: { field: "contact_ids", operator: "=", value: contactId },
});
// ...gather tags, segments, events → return one bundle
Each workflow returns a structured, PII-aware result:
contact, conversations[], tags[],
segments[], and events[] — the full data bundle to hand to the requester.{ deleted: true, auditRecord } where auditRecord holds the
action, hashed email, timestamp, purged data sources, and conversation count —
proof of erasure that contains no raw PII.job_identifier, then a { status, downloadUrl } once the
CSV is ready.[REDACTED].{ deleted: { [cacheType]: count } } per swept cache type.| Issue | Cause | Solution |
|---|---|---|
| Export job stuck in "pending" | Large dataset | Poll every 30s, timeout at 1h |
| Deletion returns 404 | Already deleted | Log and continue (idempotent) |
| PII in conversation bodies | User-submitted content | Scan with regex, redact in logs |
| Audit log gap | Failed write | Use write-ahead log or queue |
Full worked examples — fulfilling a DSAR, honoring a deletion request, polling a bulk export to completion, and redacting before logging — are in references/examples.md. The shortest one:
// A user asks for all their data — export the whole bundle to JSON.
const bundle = await exportContactData("5f3c9b2e8a1d4e0012ab34cd");
await fs.writeFile(`dsar/${bundle.contact.id}.json`, JSON.stringify(bundle, null, 2));
For enterprise access control and permission scoping on top of these data
workflows, see the intercom-enterprise-rbac skill in this pack.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub jeremylongshore/tons-of-skills-marketplace --plugin intercom-pack24 skills in this plugin
/intercom-ci-integrationConfigure CI/CD pipelines for Intercom integrations with GitHub Actions.
Use when setting up automated testing, configuring CI with Intercom secrets,
or integrating Intercom API tests into your build process.
Trigger with phrases like "intercom CI", "intercom GitHub Actions",
"intercom automated tests", "CI intercom", "intercom pipeline".
/intercom-common-errorsDiagnose and fix Intercom API errors by HTTP status code and error type.
Use when encountering Intercom errors, debugging failed API requests,
or troubleshooting integration issues.
Trigger with phrases like "intercom error", "fix intercom",
"intercom not working", "debug intercom", "intercom 401", "intercom 429".
/intercom-Other plugins' skills for the same job