All jobs

Call Every New Inbound Lead Within Minutes and Post the Outcome to Slack

Each new lead who asked to be called gets an AI phone call through LumisReach within minutes, and the outcome, summary and next step land in your Slack channel.

Run this on RushOpens the console with this prompt ready to send. Connect LumisReach there first.

What the agent does

This is for a business whose leads arrive through a website form, a quote request or a booking page and go cold while they wait for a callback: a home services company, a clinic, an agency. Your server receives the form submission and starts one run per lead with the lead's name, phone number, what they asked for and the consent text they agreed to. The run has no repository. It names two connections: LumisReach, the remote MCP server that places AI phone calls, and your own Slack sign-in.

The agent checks the lead before it dials. It calls only a number whose form submission says the person asked to be contacted by phone, and it stops when the consent field is empty or the local time for the number's area code is outside 9:00 to 20:00. Then it calls LumisReach's start_ai_phone_call with the number in to_numbers, a goal such as confirming what the lead needs and offering a time for a quote, instructions that say what the business does and what never to promise, and an opening_message that says it is an AI assistant calling for the business about the request the person just sent. It sets retry_attempts to 1, max_call_duration_seconds to 300, and leaves a short voicemail with the business's callback number when nobody answers.

LumisReach answers at once with a job id. The agent polls get_quick_action_status with that id until the lead's target leaves pending and in_progress, then reads the target's status (completed, no_answer, failed or opted_out), its summary, goal_achieved and end_reason. When the call connected, it reads the full transcript with get_call, using the target's last_call_id, and takes the lead's own words about timing and budget from it rather than paraphrasing.

Last, it posts one message to your sales channel in Slack: the lead's name, the outcome, two lines of what was said, the time the lead chose if they chose one, and the next step for a person. A lead who said not to call again is posted as opted_out with a note to remove them from every follow-up list.

Start it with one API call

POST https://api.phoenix.so/o/{org}/sessions with this body:

{
  "agent": "claude",
  "input": "A new lead just submitted our quote form. Call them with the LumisReach connection, then post the outcome to Slack.\n\nRules before dialing: call only if consent_to_call below is true and the consent text says they asked to be called. Do not call if the local time for the phone number's area code is before 9:00 or after 20:00; post to Slack that the lead needs a call in the morning instead.\n\nCall with start_ai_phone_call: to_numbers [phone], goal 'Confirm what the lead needs and offer a quote visit this week; agree a day and a time window', instructions 'You call for {business}, a {trade} company in {city}. Be brief and friendly. Do not quote prices or promise dates; offer a visit and take their preferred time. If they ask not to be called, apologise and end the call.', opening_message 'Hi {name}, this is an AI assistant calling for {business} about the quote request you just sent us. Is now a good time?', retry_attempts 1, max_call_duration_seconds 300, voicemail_enabled true, voicemail_message 'Hi {name}, this is an AI assistant for {business} about your quote request. Call us back at {callback_number} when it suits you.'\n\nPoll get_quick_action_status with the job id until the target's status is no longer pending or in_progress. If the call connected, read the call record, with its transcript, using get_call on last_call_id. Post one Slack message to #sales: name, phone, status, goal_achieved, a two-line summary in the lead's own words, the time window they chose if any, and the next step for a person. If status is opted_out, say so first and tell us to remove them from follow-ups. Do not call any number other than the one below.\n\nLead: name {name}; phone {phone}; request {message}; consent_to_call {consent}; consent text '{consent_text}'; submitted {submitted_at}",
  "connections": [
    "lumisreach",
    "slack"
  ]
}
  1. Get an API key. In the console, open Settings, then API keys, and create a key for your org. Send it in the Authorization header as a Bearer token.
  2. Send the request. POST the body in request.json to https://api.phoenix.so/o/{org}/sessions, with your repository as the resources URL. The run starts in its own cloud sandbox.
  3. Read what came back. Follow the run on its live stream or wait for the run.completed webhook, then read the result and its trajectory.

What comes back

What comes back is the Slack message, posted through your own sign-in, so it appears as you in the channel, and the session's result, a short summary of the same outcome that arrives in data.result on the run.completed webhook. Your server can store it on the lead record in your CRM next to the form submission.

The session's transcript at GET /o/{org}/sessions/{id}/messages keeps every LumisReach call the agent made with its arguments and answers: the start_ai_phone_call body it sent, each status poll, and the call record with its transcript. If a lead later says they never got a call, or says the agent promised something, you open the run and read exactly what was said on the phone.

What a person checks: the time window the lead chose, before confirming it in your calendar, and any lead posted as failed, which usually means the number on the form was mistyped. A no_answer lead has had a voicemail and one retry; whether to call again is your team's call, not the agent's.

Run it on every new lead from your form

Point your form tool's webhook, or your CRM's new-lead webhook, at a handler on your server that fills in the placeholders and sends the request above, one run per lead. Send a request_id that is a UUID v5 of the lead's id, so a form tool that delivers the same webhook twice does not get the lead called twice: the retry returns the run the first one started.

If leads reach you as email instead, a Project automation in the console with an email trigger on a Gmail label can start the same prompt for each new message, reading Gmail about once a minute. Runs past the key's concurrent limit are created queued and start as slots free, so a burst of form submissions after an ad goes live needs no queue of your own.

The use case this job follows, with its automation and trigger: Run an agent per customer task.

Why run it on Rush?

Speed to lead is the whole job: a callback in five minutes reaches people a callback tomorrow does not, and nobody on a small team can watch the form all day. A script that dials from a cron job still needs someone to read the result and tell the team. Here one run does the calling, reads the outcome and writes the note a salesperson needs, and each lead gets its own run in its own sandbox, started by the event and not by someone remembering.

Each run keeps a record you can show a customer or a compliance reviewer: the consent text it was given, the decision to dial or not, the exact call request, and the transcript. The run reaches only the two connections it names, and your LumisReach key is pasted once in Settings, never into a prompt or a script on someone's laptop.

Costs are split by who serves them. LumisReach bills the calls to your own LumisReach account, $0.20 for each call placed (each retry is a new call) plus $0.20 a minute billed by the second, per its docs. Rush bills the run's compute and model usage from your credits, and the session reads back its total_cost_usd. A lead that is never answered costs $0.40 at LumisReach with one retry.

Frequently asked questions

Is it legal to call a lead with an AI voice?

Consent is yours to get. Under the TCPA, and since February 2024 the FCC treats AI-generated voices as artificial voices, a call like this needs the person's prior consent, and a sales call needs it in writing: put clear consent language on the form and pass it into the run. The prompt refuses to dial without it, and LumisReach's site says every number is checked against federal, state and internal Do Not Call lists before dialing (lumisreach.com); its API docs do not repeat it, so the consent check here does not lean on it. This is not legal advice; check your own case with counsel.

How do I connect LumisReach?

Create an API key in LumisReach under Settings > Developer API (app.lumisreach.com/settings/api), and add a card under Settings > Billing so calls can be placed. In Rush, paste the key under Settings → Connections → LumisReach, or send POST /me/connections {"type": "mcp", "name": "LumisReach", "url": "https://mcp.lumisreach.com/mcp", "auth": {"mode": "bearer", "token": "lumisreach_…"}}. The request then names it as lumisreach.

Can I run this for each of my customers' businesses?

Not yet with one template. An agent made from a template for a developer's end users connects only MCP servers that sign in with OAuth, and LumisReach takes an API key, so these runs use the LumisReach connection of the member who owns the Rush API key. A business running its own leads is the case this page covers.

What happens when the lead asks the agent to stop calling?

The instructions tell it to apologise and end the call, LumisReach marks the target opted_out, and the Slack message leads with that so your team removes the number from every list. The run calls one number once, plus one retry if unanswered, and never dials anyone else.

More LumisReach jobs

More jobs like this: Run an agent per customer task

Keep reading