Skip to content

The moment it happens

Email yourself every finished chat

When a chat ends, you get the visitor's details and the whole transcript in one email.

Runs
The moment it happens
Apps
LiveChat
AI
Not needed
Access
chats--all:ro, webhooks.configuration:rw

Send this to your assistant

Create a ClickRuntime automation: when a LiveChat chat ends, email me the visitor's name, email and page URL, followed by the full transcript.

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

Some chats are worth keeping: a customer describing a bug in detail, a prospect asking about pricing, a promise made by an agent about a refund. LiveChat stores the conversations, but they live inside the tool, and the people who need them, an account manager, an engineer or the owner, do not have a seat or do not think to look. Important details get lost between the chat window and the people who must act on them.

When a chat ends, LiveChat notifies ClickRuntime, which fetches the whole conversation, formats it as a readable transcript with names and timestamps and emails it to you. The email arrives soon after the customer says goodbye, so follow-up work can start while the conversation is still fresh.

Small businesses that handle chats personally and agencies reporting to clients are common users.

What you get out of it

  • Promises made in chat are on record

    When an agent tells a customer a refund is coming, the transcript shows exactly what was promised. That avoids disputes and gives whoever follows up the right instructions. That clarity prevents arguments later.

  • Follow-up gets the full context

    An engineer who receives the transcript sees the customer's own words about a bug, including steps and error messages. That is more reliable than a summary written from memory. That is more reliable than any paraphrase of the conversation.

  • People without a LiveChat seat stay informed

    Owners, account managers and clients can read conversations by email without a license. It shares knowledge across the company at no extra cost. That knowledge reaches the people who actually need it.

  • Disputes and complaints are easier to settle

    When a customer says they were told something different, the emailed transcript settles it quickly. It protects both the customer and the business from misunderstandings. That is often the end of the discussion.

  • Searchable archive in your mailbox

    Email search finds a customer's name or a phrase from a chat instantly. For many small teams that is quicker than navigating the LiveChat archive. That is often faster than opening another tool.

How it works

What happens, step by step

  1. When a LiveChat chat ends, LiveChat tells ClickRuntime straight away.

  2. The automation fetches the full chat, including the visitor's name, email and the last page they were on.

  3. It lays out every message with who said it.

  4. You get one email with the visitor's details and the whole transcript.

Before it runs live

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

What you get

RunsThe moment it happens
Email yourself every finished chatjust nowSucceeded
Email · Chat with Dana LeeVisitor: Dana Lee <dana@acme.example> · Page: https://northwind.example/pricing Dana Lee: Do you offer annual billing?

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
  • Add an AI step, for example to summarize, sort or draft a reply
  • Add another app, for example also send it to Slack
  • Combine it with other LiveChat 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.
finished_chat_transcript_to_email.pyexample
from clickruntime import on_event, credentials, http, notify

@on_event
def handle(event):
    body = event.json
    if body.get("action") != "chat_deactivated":
        return {"skipped": True}
    p = body["payload"]
    chat = http.post("https://api.livechatinc.com/v3.5/agent/action/get_chat",
                     json={"chat_id": p["chat_id"], "thread_id": p["thread_id"]},
                     headers={"Authorization": f"Bearer {credentials.connection('livechat', 'work')}"}).json()
    names = {u["id"]: u.get("name", u["type"]) for u in chat["users"]}
    visitor = next(u for u in chat["users"] if u["type"] == "customer")
    page = (visitor.get("last_visit") or {}).get("last_pages", [{}])[-1].get("url", "-")
    lines = [f"{names.get(e['author_id'], '?')}: {e['text']}" for e in chat["thread"]["events"] if e["type"] == "message"]
    notify.email_me(f"Chat with {visitor.get('name', 'visitor')}",
                    f"Visitor: {visitor.get('name', '-')} <{visitor.get('email', '-')}>\nPage: {page}\n\n" + "\n".join(lines))
    return {"chat_id": p["chat_id"]}

FAQ

Common questions

Will it send emails for very short chats or spam?
It sends one for every chat that ends, including very short ones, unless you add a filter. A common change is to skip chats with fewer than a few messages or with no agent reply, which removes most spam and accidental openings. You can pick which chats are sent by setting a filter.
Does the email show who said what?
Yes. Each line is labeled with the speaker's name, either the customer or the agent, along with a timestamp. Automated greetings and system messages can be shown or hidden, depending on how much detail you want.
Can transcripts go to the customer instead of me?
LiveChat has its own option to send transcripts to customers. If you want ClickRuntime to do it, the customer's email must be known from the chat, and you should check that your privacy policy allows it. Many teams send to themselves only.
What permissions does it need?
chats--all:ro, webhooks.configuration:rw. Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's 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 “Email yourself every finished chat” from your assistant

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