Outcome
Optional, one-way: read contacts with an email from the connected TopoloCRM workspace as the signed-in person and add them to Engage; nothing is written to TopoloCRM. Reads up to maxContacts (default 1000, max 5000), filtered by q and updatedAfter. Matches by email like imports.apply: new contacts get source connector and custom field crm_contact_id; existing ones only gain changed fields. Suppressed contacts stay ineligible; the suppression ledger is never touched. Adds every imported contact to listId when given. Returns imported, updated, unchanged, skipped, addedToList, truncated. 424 connector_not_configured (connect first), 409 connector_unavailable, 401/403 crm_access_denied, 502 crm_unavailable, 404 list_not_found, 409 state_conflict (archived list). Audited. Verify with contacts.list.
Before you start
- Verify the intended environment, signed-in credential, authorized organization and the action permission workspace:write.
- Discover and select an authorized canonical Engage workspace. Pass resourceType=workspace and resourceId separately from action input.
- Review the exact effects and obtain approval before CLI --confirm or MCP confirm:true. A local capture does not authorize a live mutation.
Discover the target
topolo whoami --json
topolo actions get app_topolo_engage.contacts.import_from_crm --json
topolo workspaces list topolo-engage --json
Set ENGAGE_WORKSPACE_ID to the identifier of the selected authorized workspace.
Input contract
| Field | Required | Declared constraints |
|---|---|---|
listId | No | {"type":"string","minLength":1,"maxLength":128} |
q | No | {"type":"string","minLength":1,"maxLength":200} |
updatedAfter | No | `{"type":"string","format":"date-time","pattern":"^(?:(?:\d\d[2468][048] |
maxContacts | No | {"type":"integer","minimum":1,"maximum":5000} |
Validate, plan and execute
Build payload.json from the current schema and discovered identifiers. The action description above defines its behavior, limits, side effects and declared errors.
: "${ENGAGE_WORKSPACE_ID:?Set ENGAGE_WORKSPACE_ID to your selected workspace identifier}"
topolo actions validate app_topolo_engage.contacts.import_from_crm --data @payload.json --json
topolo actions plan app_topolo_engage.contacts.import_from_crm --resource-type workspace --resource-id "$ENGAGE_WORKSPACE_ID" --data @payload.json --confirm --json
Review the plan and approve its exact effects before executing the unchanged request.
: "${ENGAGE_WORKSPACE_ID:?Set ENGAGE_WORKSPACE_ID to your selected workspace identifier}"
topolo actions call app_topolo_engage.contacts.import_from_crm --resource-type workspace --resource-id "$ENGAGE_WORKSPACE_ID" --data @payload.json --confirm --json
For MCP, use topolo_get_action, topolo_validate_action, topolo_plan_action and topolo_call_action. Pass resource context separately where required; confirm:true is required for mutations.
Captured successful requests and responses
Captured HTTP 200 · contacts.import_from_crm > imports CRM contacts as the person, skips missing or invalid emails, dedupes and audits
Action input
{}
Actual local response
{
"imported": 2,
"updated": 0,
"unchanged": 0,
"skipped": 3,
"listId": null,
"addedToList": 0,
"truncated": false
}
Source test: crm-import.test.ts. Actual route handlers with SQLite repositories; synthetic identity/workspace grants and provider ports.
Captured HTTP 200 · contacts.import_from_crm > keeps suppressed contacts ineligible: the ledger is never written
Action input
{}
Actual local response
{
"imported": 1,
"updated": 0,
"unchanged": 0,
"skipped": 0,
"listId": null,
"addedToList": 0,
"truncated": false
}
Source test: crm-import.test.ts. Actual route handlers with SQLite repositories; synthetic identity/workspace grants and provider ports.
Captured HTTP 200 · contacts.import_from_crm > adds every imported contact to the list, refusing missing and archived lists
Action input
{
"listId": "eng_lst_1"
}
Actual local response
{
"imported": 2,
"updated": 0,
"unchanged": 0,
"skipped": 0,
"listId": "eng_lst_1",
"addedToList": 2,
"truncated": false
}
Source test: crm-import.test.ts. Actual route handlers with SQLite repositories; synthetic identity/workspace grants and provider ports.
Captured HTTP 200 · contacts.import_from_crm > passes filters and stops at maxContacts, reporting truncation
Action input
{
"q": "acme",
"updatedAfter": "2026-09-01T00:00:00.000Z",
"maxContacts": 2
}
Actual local response
{
"imported": 2,
"updated": 0,
"unchanged": 0,
"skipped": 0,
"listId": null,
"addedToList": 0,
"truncated": true
}
Source test: crm-import.test.ts. Actual route handlers with SQLite repositories; synthetic identity/workspace grants and provider ports.
Captured HTTP 200 · contacts.import_from_crm > uses the person's default CRM workspace when the connection names none
Action input
{}
Actual local response
{
"imported": 0,
"updated": 0,
"unchanged": 0,
"skipped": 0,
"listId": null,
"addedToList": 0,
"truncated": false
}
Source test: crm-import.test.ts. Actual route handlers with SQLite repositories; synthetic identity/workspace grants and provider ports.
Captured HTTP 200 · contacts.import_from_crm > updates existing contacts only with changed fields, counts unchanged ones and never clears values
Action input
{}
Actual local response
{
"imported": 0,
"updated": 0,
"unchanged": 1,
"skipped": 0,
"listId": null,
"addedToList": 0,
"truncated": false
}
Source test: crm-import.test.ts. Actual route handlers with SQLite repositories; synthetic identity/workspace grants and provider ports.
Captured HTTP 200 · contacts.import_from_crm > updates existing contacts only with changed fields, counts unchanged ones and never clears values
Action input
{}
Actual local response
{
"imported": 0,
"updated": 1,
"unchanged": 0,
"skipped": 0,
"listId": null,
"addedToList": 0,
"truncated": false
}
Source test: crm-import.test.ts. Actual route handlers with SQLite repositories; synthetic identity/workspace grants and provider ports.
Captured HTTP 200 · contacts.import_from_crm > adds every imported contact to the list, refusing missing and archived lists
Action input
{
"listId": "eng_lst_1"
}
Actual local response
{
"imported": 0,
"updated": 0,
"unchanged": 2,
"skipped": 0,
"listId": "eng_lst_1",
"addedToList": 0,
"truncated": false
}
Source test: crm-import.test.ts. Actual route handlers with SQLite repositories; synthetic identity/workspace grants and provider ports.
Effects and response meaning
- Optional, one-way: read contacts with an email from the connected TopoloCRM workspace as the signed-in person and add them to Engage; nothing is written to TopoloCRM. Reads up to maxContacts (default 1000, max 5000), filtered by q and updatedAfter. Matches by email like imports.apply: new contacts get source connector and custom field crm_contact_id; existing ones only gain changed fields. Suppressed contacts stay ineligible; the suppression ledger is never touched. Adds every imported contact to listId when given. Returns imported, updated, unchanged, skipped, addedToList, truncated. 424 connector_not_configured (connect first), 409 connector_unavailable, 401/403 crm_access_denied, 502 crm_unavailable, 404 list_not_found, 409 state_conflict (archived list). Audited. Verify with contacts.list.
Verify the outcome
- Check the response against the declared output schema and the requested operation. For mutations, use the action-specific read described in the action description before any dependent operation.
Recover
For an uncertain result, inspect current retained state with a read action before retrying. Do not replay a mutation unless its contract explicitly guarantees idempotency.
Refused requests
Captured HTTP 404 · contacts.import_from_crm > adds every imported contact to the list, refusing missing and archived lists
Action input
{
"listId": "eng_lst_missing"
}
Actual local response
{
"error": {
"code": "list_not_found",
"message": "List was not found in this workspace.",
"details": {
"listId": "eng_lst_missing"
}
}
}
Source test: crm-import.test.ts. Actual route handlers with SQLite repositories; synthetic identity/workspace grants and provider ports.
Captured HTTP 409 · contacts.import_from_crm > adds every imported contact to the list, refusing missing and archived lists
Action input
{
"listId": "eng_lst_old"
}
Actual local response
{
"error": {
"code": "state_conflict",
"message": "Archived lists cannot be changed.",
"details": {
"listId": "eng_lst_old"
}
}
}
Source test: crm-import.test.ts. Actual route handlers with SQLite repositories; synthetic identity/workspace grants and provider ports.
Captured HTTP 409 · contacts.import_from_crm > refuses when no TopoloCRM in this deploy
Action input
{}
Actual local response
{
"error": {
"code": "connector_unavailable",
"message": "TopoloCRM is not available in this deploy. Engage keeps working without it.",
"details": {
"connectorId": "topolo_crm"
}
}
}
Source test: crm-import.test.ts. Actual route handlers with SQLite repositories; synthetic identity/workspace grants and provider ports.
Captured HTTP 503 · contacts.import_from_crm > refuses when no address hashing secret
Action input
{}
Actual local response
{
"error": {
"code": "address_hashing_unconfigured",
"message": "Contact storage is unavailable: the address hashing secret is not configured."
}
}
Source test: crm-import.test.ts. Actual route handlers with SQLite repositories; synthetic identity/workspace grants and provider ports.
Captured HTTP 424 · contacts.import_from_crm > refuses when TopoloCRM not connected
Action input
{}
Actual local response
{
"error": {
"code": "connector_not_configured",
"message": "Connect TopoloCRM to this workspace first (connectors.connect).",
"details": {
"connectorId": "topolo_crm"
}
}
}
Source test: crm-import.test.ts. Actual route handlers with SQLite repositories; synthetic identity/workspace grants and provider ports.
Captured HTTP 401 · contacts.import_from_crm > needs a person's credential, the write permission and valid input
Action input
{}
Actual local response
{
"error": {
"code": "crm_access_denied",
"message": "Importing from TopoloCRM needs a signed-in person's credential."
}
}
Source test: crm-import.test.ts. Actual route handlers with SQLite repositories; synthetic identity/workspace grants and provider ports.
Captured HTTP 403 · contacts.import_from_crm > needs a person's credential, the write permission and valid input
Action input
{}
Actual local response
{
"error": {
"code": "permission_denied",
"message": "The credential lacks workspace:write.",
"details": {
"requiredPermission": "workspace:write"
}
}
}
Source test: crm-import.test.ts. Actual route handlers with SQLite repositories; synthetic identity/workspace grants and provider ports.
Captured HTTP 422 · contacts.import_from_crm > needs a person's credential, the write permission and valid input
Refused input; do not execute
{
"maxContacts": 0
}
Actual local response
{
"error": {
"code": "invalid_action_input",
"message": "Input for contacts.import_from_crm is invalid.",
"details": [
{
"origin": "number",
"code": "too_small",
"minimum": 1,
"inclusive": true,
"path": [
"maxContacts"
],
"message": "Too small: expected number to be >=1"
}
]
}
}
Source test: crm-import.test.ts. Actual route handlers with SQLite repositories; synthetic identity/workspace grants and provider ports.
Captured HTTP 403 · contacts.import_from_crm > maps CRM refusals and rethrows unexpected failures, writing nothing
Action input
{}
Actual local response
{
"error": {
"code": "crm_access_denied",
"message": "TopoloCRM refused your access. Check your CRM permissions.",
"details": {
"connectorId": "topolo_crm"
}
}
}
Source test: crm-import.test.ts. Actual route handlers with SQLite repositories; synthetic identity/workspace grants and provider ports.
Captured HTTP 502 · contacts.import_from_crm > maps CRM refusals and rethrows unexpected failures, writing nothing
Action input
{}
Actual local response
{
"error": {
"code": "crm_unavailable",
"message": "down",
"details": {
"connectorId": "topolo_crm"
}
}
}
Source test: crm-import.test.ts. Actual route handlers with SQLite repositories; synthetic identity/workspace grants and provider ports.
Captured HTTP 422 · contacts.import_from_crm > needs a person's credential, the write permission and valid input
Refused input; do not execute
{
"extra": true
}
Actual local response
{
"error": {
"code": "invalid_action_input",
"message": "Input for contacts.import_from_crm is invalid.",
"details": [
{
"code": "unrecognized_keys",
"keys": [
"extra"
],
"path": [],
"message": "Unrecognized key: \"extra\""
}
]
}
}
Source test: crm-import.test.ts. Actual route handlers with SQLite repositories; synthetic identity/workspace grants and provider ports.
Error recovery
- HTTP 404
list_not_found: Rediscover the identifier using the related list or get action in the same authorized resource. Do not guess identifiers or change organization context. - HTTP 409
state_conflict: Read the current retained state and reconcile the requested transition before retrying. Do not blindly replay a non-idempotent mutation. - HTTP 409
connector_unavailable: Preserve the request and inspect the declared dependency state. Retry only after the transient or configuration cause is resolved; do not infer that the operation completed. - HTTP 503
address_hashing_unconfigured: Read the refusal details and current action contract, correct the stated cause, then validate and plan again. Do not retry unchanged or infer success. - HTTP 424
connector_not_configured: Read the refusal details and current action contract, correct the stated cause, then validate and plan again. Do not retry unchanged or infer success. - HTTP 401
crm_access_denied: Read the refusal details and current action contract, correct the stated cause, then validate and plan again. Do not retry unchanged or infer success. - HTTP 403
permission_denied: Stop and inspect the current credential and selected resource. It needs workspace:write; do not broaden access or switch organization automatically. - HTTP 422
invalid_action_input: Correct the request against the current action input schema, then validate it again before planning. - HTTP 403
crm_access_denied: Read the refusal details and current action contract, correct the stated cause, then validate and plan again. Do not retry unchanged or infer success. - HTTP 502
crm_unavailable: Preserve the request and inspect the declared dependency state. Retry only after the transient or configuration cause is resolved; do not infer that the operation completed.
Related actions
- List prospect contacts
- Create prospect contact
- Resolve prospect contact id
- Get prospect contact
- Update prospect contact
- Archive prospect contact
- Qualify contacts with AI
- Get contact qualification
- Get contact WhatsApp state
- Set contact phone
- Record WhatsApp opt-in
- Revoke WhatsApp opt-in
- Export contact data
- Erase contact data
Evidence and limits
-
/api/imports/crm -
crm-import.test.ts -
Actual route handlers with SQLite repositories; synthetic identity/workspace grants and provider ports.
-
Widget/bootstrap use actual app handler but mocked worker runtime and app identity.
-
No gateway execution, live permissions, external delivery or deployed proof.
These are local route captures with synthetic identity and simulated dependencies. They do not prove live authorization, gateway execution, production state, or external delivery.