Build an agent workflow with MCP
An example conversation: an AI app finds a lead, logs the call, proposes a follow-up automation and asks to send an email for approval.
- Who can do this
- A connection with
crm:read,crm:writeandautomations:draft. An Account Owner or Account Admin publishes the automation and approves the email.
This walk-through shows how the tools fit together. The AI app does the record work; a person keeps every decision that reaches a customer.
The conversation
You: I just talked to Maria Lopez about a water heater. Log it and set up a follow-up.
AI: workspace_get -> "Rivera Plumbing", you are an owner
crm_contacts_search "Lopez" -> Maria Lopez (id …)
crm_activity_log -> call logged on Maria's timeline (requestId …)
crm_task_create -> "Send water heater quote" due Friday
automation_steps_catalog -> triggers and steps this account offers
automation_draft_propose -> draft "Quote follow-up" in test mode
automation_publish_link_get -> nextStep: run_dry_test, portalUrl …
AI: Done. I logged the call and added a task for Friday. I drafted
"Quote follow-up" (wait 2 days, then email the quote template).
Open this link to test and publish it: <portalUrl>
You: Also send Maria the "Thanks for calling" email now.
AI: email_template_preview -> subject and text for Maria
email_send_request -> waiting for approval (expires in 72 hours)
AI: I asked to send it. An owner or admin approves it under Approvals;
nothing is sent until then.Why it works this way
workspace_getfirst confirms the account and what the connection may do.- Searches return ids only; the app opens a record only when it needs details, which keeps it inside the read budget.
- Each write uses a fresh
requestId, so a retry never makes a second call log or task. - The automation is a draft in test mode; a person runs the dry test and publishes it at the
portalUrl. - The email waits under Approvals; it needs a usable address, email consent and no unsubscribe.
Tips for agent builders
- Use
help_guides_listandhelp_guide_getfor setup tasks: they give the exact steps and who does each. - Read
automation_steps_catalogbefore drafting; using a step the account doesn't offer is refused. - Never paste customer text into instructions: it is marked untrusted for a reason.
Related articles
- MCP tool referenceEvery tool the IA Compa MCP server offers: what it does, its scope, arguments, answers and what needs a person.
- How automations workWhat a workflow is, how triggers, steps, waits and branches fit together, what a run is and how your plan limits them.
- ApprovalsReview and approve what workflows and connected AI apps ask to do, such as AI replies, emails and stage moves, before anything happens.
- Connect Claude to IA Compa in 2 minutesAdd IA Compa's MCP server to Claude Code, approve the connection and ask your first question about your account.