CallRail form to Salesforce lead with Slack alert

Every 15 minutes, turn new CallRail form submissions into Salesforce leads and ping a Slack channel with an AI summary and suggested reply.

Agentic Task
CallRailSalesforceSlackSalesMarketingLead EnrichmentData SyncNotifications & Alerts

Build me an agent workflow that runs on a cron trigger every 15 minutes and syncs new CallRail form submissions into Salesforce as leads, with a Slack alert for the sales team.

On each run, the agent should:

1. Call CallRail "List All Form Submissions" for my account, filtered to submissions created since the previous run (use a small overlap window, e.g. the last 20 minutes, to be safe). Request the tags and the full form data fields so we can see what's already been processed and read every field the visitor typed.

2. For each submission, skip it if the tags already include a "synced-to-sf" tag, or if it looks like obvious spam. Spam rules: missing email address, or the main message field is shorter than 5 characters. Log skipped submissions briefly and move on.

3. For each remaining submission, read out the prospect's name, email, phone, the message they typed, and the marketing attribution (CallRail's source and campaign, plus the form name and the tracking number or landing page if present).

4. Call Salesforce "Create Lead" with those mapped fields. Map first and last name from the CallRail name field, email and phone directly, and set LeadSource as a combination of the CallRail source and campaign (for example "CallRail - Google Ads - Spring Promo"). Put the form name in Company if no company was captured, and any state or city the form captured into the matching Salesforce fields. Capture the new lead's Salesforce ID from the response.

5. Call Salesforce "Add Note to Lead" against that new lead ID, with a note title like "CallRail form submission" and the full raw form text as the body (every field the visitor typed, key/value pairs). This guarantees reps see exactly what was submitted, not just the fields we mapped.

6. Generate a short AI summary of the submission with three parts: (a) two sentences on what the prospect is asking for, (b) one line on which marketing source and campaign brought them in, and (c) a one-paragraph suggested first-touch reply tailored to their question, in a friendly professional tone, that I can copy paste into an email.

7. Call Slack "Send a Message" to the channel I choose at setup time (default #inbound-leads). Post the summary as a single message: prospect name on the first line in bold, then the two-sentence ask, then "Source: …", then the suggested reply paragraph indented as a quote, then a link to the new Salesforce lead record. Use Slack mrkdwn formatting (single asterisks for bold).

8. Call CallRail "Update a Form Submission" on the same submission to add a "synced-to-sf" tag (preserve any existing tags). This is what guarantees the same submission never gets processed twice on future runs.

If any step fails for a given submission, do not tag it as synced, log the error, and continue with the next submission so one bad record doesn't block the rest.

At setup time, ask me which Slack channel to post to, which CallRail company (or all of them), and confirm the default LeadSource format. Use my CallRail, Salesforce, and Slack connections for all calls.

Additional information

What does this prompt do?
  • Watches CallRail for new website form submissions every 15 minutes and skips anything that looks like obvious spam.
  • Creates a new lead in Salesforce for each submission, mapping name, email, phone, the prospect's message, and the marketing source they came from.
  • Attaches the full original form text as a note on the Salesforce lead so reps see exactly what the prospect typed.
  • Posts a Slack alert to your sales channel with a two-sentence summary of the ask, the source they came from, and a one-paragraph suggested first-touch reply.
  • Tags each submission as synced inside CallRail so the same lead never gets created twice.
What do I need to use this?
  • A CallRail account with form tracking enabled and access to your API key.
  • A Salesforce login with permission to create leads and add notes.
  • A Slack workspace and a channel where the new lead alerts should land.
How can I customize it?
  • Change the schedule. Run every 5 minutes for fast-response teams or every hour for quieter inboxes.
  • Pick which Slack channel the alert goes to, and choose whether to also DM the rep who owns that source or campaign.
  • Adjust how the lead source is set in Salesforce, for example combine the CallRail source and campaign or map specific campaigns to specific lead owners.
  • Tighten or loosen the spam filter, for example require a phone number or a minimum message length.
  • Tune the tone of the suggested reply, for example formal for B2B or casual for consumer leads.

Frequently asked questions

Does this work for any CallRail form, or only specific ones?
It works across every form on every tracked company in your CallRail account by default. You can scope it to a single company or a single form during setup if you only want one source flowing into Salesforce.
Will the same form submission ever get pushed to Salesforce twice?
No. After each submission is processed, the workflow tags it as synced inside CallRail. On the next run, anything that already carries that tag is skipped, so the same person never becomes two leads.
What happens if the prospect is already a lead in Salesforce?
The workflow always creates a fresh lead so you have a clean record of the new inquiry. If you want it to update an existing lead instead of creating a duplicate, you can ask Geni to match by email first and only create when no match exists.
Can the Slack alert tag a specific rep instead of just posting in a channel?
Yes. Tell Geni which rep owns which source or campaign, and the workflow will @mention them in the Slack alert so the right person sees it immediately.
How does it decide what counts as spam?
By default it skips submissions with no email address or with a message under five characters. You can make the rule stricter, for example requiring a real phone number or filtering out submissions from known disposable email domains.

Stop letting CallRail form submissions sit in an inbox.

Connect CallRail, Salesforce, and Slack once, and every new form becomes a lead, a note, and a sales alert within minutes.