Skip to content

The moment it happens

Turn website inquiries into Salesforce leads

Every inquiry creates or updates a Salesforce lead, with a task holding the message so nothing gets lost.

Runs
The moment it happens
Apps
Salesforce
AI
Optional
Access
api, refresh_token (read+write)

Send this to your assistant

Create a ClickRuntime automation: give me a link my contact form can send to. Find the lead or contact by email in Salesforce, create a lead if it's new or update it if not, log a task with their message, and email me about new leads.

Paste it into your assistant. It tells you what it will send or change before it runs live.

First time? Adding ClickRuntime to your assistant takes about two minutes.

Why use it

Why teams use this automation

Inquiries reach a business through too many doors: a web form, a missed phone call logged by a call-tracking tool, a webinar registration, a campaign response. Each one lands in a different place, and someone has to retype it into Salesforce. Meanwhile the same person calls twice and gets two lead records, or fills a form after already being a lead, and the rep who follows up has no idea about the earlier contact. Slow entry and duplicates both mean leads go cold.

When an event arrives, the automation receives its fields, searches Salesforce by email and phone for an existing lead, and either updates that lead or creates a new one. It also creates a Task so the follow-up is on someone's list, and can email you when a brand-new lead appears. It runs the moment the event is sent. AI is optional, for example to tidy a free-text message into a clean description. It fits small sales teams and agencies handling mixed inbound channels.

What you get out of it

  • One lead per person, not three

    The lookup by email and phone means a repeat caller updates the existing lead rather than creating a second record. Reps see the full history in one place, and lead counts in reports are not inflated by duplicates.

  • Follow-up Task created automatically

    Every inquiry produces a Task tied to the lead, so the next action exists in Salesforce rather than in someone's memory. Leads that arrive on a Friday afternoon do not wait for Monday to be noticed.

  • Every channel feeds the same pipeline

    Calls, forms and campaign events end up as leads with the same fields. Marketing can compare which channel produces conversions because the source data is in Salesforce, not scattered across tools.

  • New leads announced as they arrive

    The email on a new lead lets the owner respond while the person is still thinking about their question. Response time is one of the clearest predictors of whether an inquiry becomes a conversation.

  • Less retyping, fewer typos

    Fields travel from the source to Salesforce without being copied by hand. Phone numbers keep their digits and email addresses stay valid, so later outreach does not bounce because of a transcription slip.

How it works

What happens, step by step

  1. The moment an inquiry arrives from your website form, voice agent or outreach tool, ClickRuntime receives the details.

  2. It searches Salesforce for an existing lead with the same email or phone number.

  3. It updates that lead or creates a new one, and adds a task holding the person's message.

  4. For new leads, you get an email with their details and a link to the lead in Salesforce.

Before it runs live

  • Connect Salesforce
  • Paste your automation's link into the other app's webhook settings

What you get

RunsThe moment it happens
Turn website inquiries into Salesforce leadsjust nowSucceeded
Email · New lead: Dana Ruiz (Northwind)dana@northwind.example · "Looking for pricing on 50 seats" · https://yourcompany.my.salesforce.com/00Q…

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • Your own rules

    Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.

  • Any number of apps

    One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.

  • AI where it helps

    Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.

  • On a schedule or on each event

    Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.

Changes you can ask for

  • Act only on the items that match your own rules, and skip the rest
  • Change what the AI looks for, or how it writes the result
  • Add another app, for example also send it to Slack
  • Combine it with other Salesforce steps into one automation

Under the hood

The code that runs this automation

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
inquiries_and_calls_into_salesforce_leads.pyexample
from clickruntime import on_event, credentials, http, notify

INSTANCE = "https://yourcompany.my.salesforce.com"
API = f"{INSTANCE}/services/data/v61.0"

@on_event
def handle(event):
    form = event.json or {}
    email = form["email"].replace("'", "")
    headers = {"Authorization": f"Bearer {credentials.connection('salesforce', 'work')}"}
    found = http.get(f"{API}/query", headers=headers,
                     params={"q": f"SELECT Id FROM Lead WHERE Email = '{email}' AND IsConverted = false LIMIT 1"}).json()["records"]
    fields = {"Email": email, "LastName": form.get("name") or email, "Company": form.get("company") or "Unknown",
              "Phone": form.get("phone"), "LeadSource": "Web"}
    if found:
        lead_id = found[0]["Id"]
        http.patch(f"{API}/sobjects/Lead/{lead_id}", headers=headers, json=fields).raise_for_status()
    else:
        lead_id = http.post(f"{API}/sobjects/Lead", headers=headers, json=fields).json()["id"]
        notify.email_me(f"New lead: {fields['LastName']} ({fields['Company']})",
                        f"{email}\n\n{form.get('message', '')}\n\n{INSTANCE}/{lead_id}")
    http.post(f"{API}/sobjects/Task", headers=headers, json={
        "WhoId": lead_id, "Subject": "Website inquiry", "Description": form.get("message", ""), "Status": "Not Started"}).raise_for_status()
    return {"lead": lead_id, "new": not found}

FAQ

Common questions

How does it decide that an inquiry is a duplicate?
It looks up Salesforce leads by the email address and phone number in the incoming event. If either matches an existing lead, that lead is updated and a Task is added. If neither matches, a new lead is created.
What does the sender need to post to the link?
The sender, such as a form tool or call tracker, posts fields like name, email, phone and a message. The mapping to Salesforce fields is set up with your AI assistant, so you can match whatever names your source uses.
Can calls and web forms be assigned to different owners?
Yes. Because the event includes its source, the setup can set a different lead owner, lead source value or Task subject for calls than for forms. Salesforce assignment rules that already exist on lead creation also still apply.
What permissions does it need?
api, refresh_token (read+write). Nothing else in your accounts is used.
Does it need AI?
No, but you can ask for an AI step (for example a summary). It then uses ClickRuntime's built-in AI allowance.
How many runs does it use?
One run for each event the app sends.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

Set up “Turn website inquiries into Salesforce leads” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.