$npx -y skills add indranilbanerjee/digital-marketing-pro --skill data-importImport data from external sources. Use when: loading CRM contacts, email lists, or campaign data from CSV, JSON, or Sheets.
| 1 | # /digital-marketing-pro:data-import |
| 2 | |
| 3 | ## Purpose |
| 4 | |
| 5 | Universal data import tool for bringing structured data into any connected platform. Import from CSV, JSON, or Google Sheets into CRM systems, email subscriber lists, audience segments, competitor trackers, campaign managers, or custom data stores. Handles the full import pipeline — field mapping with auto-suggestion, data validation, deduplication against existing records, consent and compliance verification for contact data, batched execution through platform MCPs, and detailed result reporting with rollback guidance if needed. |
| 6 | |
| 7 | ## Execution gate (MANDATORY — cannot be skipped) |
| 8 | |
| 9 | 1. Present the full preview — recipients / spend / changes / compliance — as an **Execution Summary** before touching any live system. |
| 10 | 2. The user must type `yes` (or an equivalent explicit approval). ANY other input — ambiguous, implied, partial, or absent approval — cancels the run. |
| 11 | 3. Never proceed on ambiguous input. Never auto-retry a failed execution; a failure needs human review before any re-run. |
| 12 | 4. Record the approval with `python "${CLAUDE_PLUGIN_ROOT}/scripts/approval-manager.py" --brand {slug} --action create-approval --data '{"risk_level":"<tier>","summary":"..."}'` **before** executing, then `python "${CLAUDE_PLUGIN_ROOT}/scripts/approval-manager.py" --brand {slug} --action mark-executed --id {approval_id}` after the platform confirms success. |
| 13 | |
| 14 | ## Input Required |
| 15 | |
| 16 | The user must provide (or will be prompted for): |
| 17 | |
| 18 | - **Data source**: File path to a local CSV or JSON file, or a Google Sheets URL — the raw data to import. For CSV, specify delimiter if non-standard. For Google Sheets, specify the sheet name and range if not the full first sheet. The file must be accessible from the current environment |
| 19 | - **Destination platform**: Where the data should land — CRM (HubSpot, Salesforce), email platform (Mailchimp, ActiveCampaign, SendGrid), audience manager, competitor tracker, or custom destination. Must have the corresponding MCP server connected and configured in `.mcp.json` |
| 20 | - **Field mapping**: How source columns map to destination fields — provide explicit mappings (e.g., "Company Name" -> "company", "Work Email" -> "email"), or request auto-mapping where the system suggests mappings based on column name similarity. Unmapped columns are flagged for review, and unmapped required destination fields block the import until resolved |
| 21 | - **Import options (optional)**: Deduplication strategy (`skip` duplicates, `update` existing records, or `create-new` regardless — default is `skip`), consent verification level (`strict` requires explicit opt-in field, `standard` checks for unsubscribe flags, `none` for non-contact data), batch size for API writes (default 100), and dry-run mode to validate without executing |
| 22 | |
| 23 | ## Process |
| 24 | |
| 25 | 1. **Load brand context**: Read `~/.claude-marketing/brands/_active-brand.json` for the active slug, then load `~/.claude-marketing/brands/{slug}/profile.json`. Apply compliance rules for target markets (`skills/context-engine/compliance-rules.md`) — especially GDPR, CAN-SPAM, and CCPA requirements for contact data imports. Check for agency SOPs at `~/.claude-marketing/sops/`. If no brand exists, ask: "Set up a brand first (/digital-marketing-pro:brand-setup)?" — or proceed with defaults. |
| 26 | 2. **Read and parse source data**: Load the data from the specified source — parse CSV with header detection and delimiter handling, parse JSON with schema inference, or fetch from Google Sheets via the Google Sheets MCP. Validate basic format integrity — consistent column count across rows, parseable data types, no completely empty rows or columns. Report source statistics: total records, columns detected, data types inferred. |
| 27 | 3. **Field mapping wizard**: Auto-suggest mappings based on column name similarity to destination field names (fuzzy matching on common patterns like "email", "first_name", "phone", "company"). Present the suggested mapping for user confirmation. Flag any unmapped source columns (data that will be ignored) and any unmapped required destination fields (blockers that must be resolved before import). Allow the user to adjust, add, or remove mappings. |
| 28 | 4. **Validate data quality**: Run validation checks on every record — email format validation (RFC 5322), phone number format detection, required fields present and non-empty, data type conformance (dates, numbers, strings), field length limits per destination platform. Detect duplicates within the import file itself. If CRM is connected, check for duplicates against existing records using email or phone as match keys. For email and SMS imports, verify consent fields — check for explicit opt-in timestamps, unsubscribe flags, and compliance with the brand's market regulations. |
| 29 | 5. ** |