Use casesWorkflow
AI Sales Follow-Up Agent
Turn demo requests and pricing enquiries into conversations. Give your agent a real inbox to answer questions, follow up with opted-in leads, and book the next step.
The Problem
Someone asks for a demo, requests pricing, or signs up to hear from your sales team. They have a specific question and expect a useful response. A generic acknowledgement leaves the real conversation waiting in a queue.
Your team needs to understand the request, answer product questions, and arrange the right meeting. Those steps often span several emails, with important details scattered between a form submission, the CRM, and a rep's inbox.
The work continues after the first response. A lead asks about an integration, changes their availability, or needs a colleague involved. Your agent needs to receive those replies and carry the conversation forward with the original request in view.
How an Agent Solves This
An AI sales agent starts with the lead's request and your approved product information. It sends a relevant response, receives the reply, and helps with the next step. Pricing exceptions, commitments, and complex questions go to a human rep with the full thread attached.
- Uses the demo request, pricing enquiry, or recorded opt-in to establish the conversation
- Answers the question using approved product details and the context the lead supplied
- Follows up within the agreed scope and stops when the lead opts out or declines
- Handles replies: answers questions, shares requested case studies, and suggests meeting times
- Hands off warm leads to human reps with the full thread and a summary of the prospect's interest
For this to work, the agent needs more than a sending API. It needs a dedicated email address with a real inbox, the ability to receive and parse replies, and thread tracking to maintain conversation context across multiple exchanges.
How It Works with Robotomail
Robotomail gives your sales agent a real mailbox with full send and receive capability. Here is the workflow from a requested demo to a booked meeting.
1. Respond to a demo request
Confirm the recipient requested this contact or explicitly opted in, then check their current preferences and suppression status before sending. Your application records that permission; finding an address online does not provide it. See the Acceptable Use Policy. Send the requested information from the agent's mailbox so the lead can reply directly.
# Your application first verifies the demo request, recipient permission, and suppressions.
# Agent responds to the requested demo.
curl -X POST https://api.robotomail.com/v1/mailboxes/mbx_sales01/messages \
-H "Authorization: Bearer rm_live_abc123" \
-H "Content-Type: application/json" \
--data-binary @- <<'JSON'
{
"to": [
"cto@targetco.com"
],
"subject": "Your requested CI/CD demo",
"bodyText": "Hi Sarah, thanks for requesting a CI/CD demo and asking us to email you. You mentioned your Kubernetes migration in the form. We can focus the walkthrough on that setup. Would Thursday at 2pm work? Reply here with questions or let us know if you no longer want follow-up.",
"bodyHtml": "<p>Hi Sarah, thanks for requesting a CI/CD demo and asking us to email you. You mentioned your Kubernetes migration in the form. We can focus the walkthrough on that setup. Would Thursday at 2pm work? Reply here with questions or let us know if you no longer want follow-up.</p>"
}
JSON
# Response (excerpt)
{
"message": {
"id": "msg_3n7k2x",
"threadId": "thr_5m9p1q",
"status": "SENT",
"sentAt": "2026-03-22T09:00:00Z"
}
}2. Receive replies in real time
When a prospect replies, Robotomail delivers the message to your agent via webhook. The payload includes the full text, sender info, and the thread_id so your agent can look up the original request and the conversation so far.
# Robotomail delivers the reply via webhook
{
"event": "message.received",
"timestamp": "2026-03-22T10:15:00Z",
"data": {
"message_id": "11111111-1111-4111-8111-111111111111",
"mailbox_id": "22222222-2222-4222-8222-222222222222",
"mailbox_address": "sales@yourcompany.com",
"from": "cto@targetco.com",
"to": [
"sales@yourcompany.com"
],
"cc": [],
"subject": "Re: Your requested CI/CD demo",
"body_text": "Thursday works. Could you send a case study before the demo?",
"thread_id": "33333333-3333-4333-8333-333333333333",
"received_at": "2026-03-22T10:15:00Z",
"attachments": []
}
}3. Follow up with context
The agent reads the reply, determines the right response, and sends a follow-up in the same thread. It can also pull the full thread history from the API to build richer context for the LLM. Process opt-outs before generating a reply and cancel any pending follow-ups for that contact.
# inReplyTo below stands for the fetched message.messageId; see the reply example below.
# Agent follows up in the same thread
curl -X POST https://api.robotomail.com/v1/mailboxes/mbx_sales01/messages \
-H "Authorization: Bearer rm_live_abc123" \
-H "Content-Type: application/json" \
--data-binary @- <<'JSON'
{
"to": [
"cto@targetco.com"
],
"subject": "Re: Your requested CI/CD demo",
"inReplyTo": "<original-message@example.com>",
"bodyText": "Thanks, Sarah. Here is the case study you requested: https://example.com/case-study. We can walk through the setup during your demo on Thursday at 2pm.",
"bodyHtml": "<p>Thanks, Sarah. Here is the case study you requested: https://example.com/case-study. We can walk through the setup during your demo on Thursday at 2pm.</p>"
}
JSON4. Access full thread history
Your agent can fetch the entire thread at any point to maintain context across long conversations — useful when handing off to a human rep.
# Pull the full thread history for context
curl https://api.robotomail.com/v1/mailboxes/mbx_sales01/threads/thr_5m9p1q \
-H "Authorization: Bearer rm_live_abc123"
# Response (excerpt)
{
"message": {
"data": [
{
"id": "msg_3n7k2x",
"direction": "outbound",
"subject": "Your requested CI/CD demo",
"sentAt": "2026-03-22T09:00:00Z"
},
{
"id": "msg_8v4j6w",
"direction": "inbound",
"subject": "Re: Your requested CI/CD demo",
"receivedAt": "2026-03-22T10:15:00Z"
}
],
"status": "SENT"
}
}Key Benefits
- Real mailbox, not a sending API. Your agent sends from a real inbox with a real address. Replies come back to the same mailbox, keeping conversations natural and deliverability high.
- Instant reply handling. Webhooks deliver inbound replies in seconds. Your agent can respond while the prospect is still at their desk — a massive conversion advantage.
- Thread-aware conversations. Every message includes a
thread_id. Your agent always knows the full conversation history, so follow-ups never feel disjointed. - Custom domain for trust. Send from your company domain with verified DKIM and SPF. Prospects see a professional sender, not a generic platform address.
- Controlled sending. Per-mailbox send limits bound throughput. Your application checks recipient permission and preferences before each send, including scheduled follow-ups.
Read the API documentation for details on threading, webhooks, and domain setup. Learn more in our launch post, or get started to start building your sales agent today — paid plans come with a 30-day money-back guarantee.
Connect the workflow to a real reply
The webhook's data.message_id is a database ID used to retrieve or deduplicate a message. Fetch it with the GET message endpoint, then use the response's message.messageId (the RFC Message-ID) as inReplyTo. Keep data.thread_id for your application's conversation state. Do not use a database ID or thread ID as a reply header. Stop and investigate if the fetched message has no Message-ID.
Examples use illustrative IDs. Replace them with IDs from your account; never construct an email Message-ID from a database ID. Exchange mail only between your agent and your verified email address. Upgrade to email anyone. See plans for higher limits.
Verify the webhook signature over the raw body, persist the event and deduplicate on the database message ID before acknowledging it. Run your application logic from a durable queue. The database, calendar, CRM and model functions shown above belong to your application.
This shell example fetches an incoming email and builds all required send fields. Set ROBOTOMAIL_API_KEY, ROBOTOMAIL_MAILBOX_ID and ROBOTOMAIL_MESSAGE_ID in your environment. Apply your recipient and approval rules before sending.
# Requires jq. Use mailbox_id and message_id from the verified webhook.
original=$(curl --fail --silent --show-error \
"https://api.robotomail.com/v1/mailboxes/$ROBOTOMAIL_MAILBOX_ID/messages/$ROBOTOMAIL_MESSAGE_ID" \
-H "Authorization: Bearer $ROBOTOMAIL_API_KEY") || exit 1
payload=$(printf '%s' "$original" | jq -e --arg body "Thanks, I received your message." '
.message | if (.messageId | type == "string" and length > 0) then
{to: [.fromAddress], subject: ("Re: " + .subject), bodyText: $body, inReplyTo: .messageId}
else error("Original email has no Message-ID") end
') || exit 1
curl --fail --silent --show-error \
"https://api.robotomail.com/v1/mailboxes/$ROBOTOMAIL_MAILBOX_ID/messages" \
-H "Authorization: Bearer $ROBOTOMAIL_API_KEY" \
-H "Content-Type: application/json" \
--data-binary "$payload"
Read receive and reply and webhook verification for the full setup.