Skip to content

The moment it happens

Welcome new form leads by email and alert Discord

Each new lead from your form gets a welcome email from your Gmail, and your team gets a Discord message with the details.

Runs
The moment it happens
Apps
Discord, Gmail
AI
Not needed
Access
Gmail send; Discord send

Send this to your assistant

Create a ClickRuntime automation: when my form posts a lead to this link, send them a welcome email from my Gmail and post the lead to #sales on Discord.

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

A small software team runs its sales conversations on Discord and collects leads through a website form. Form submissions land in an inbox nobody checks often, so a prospect who asked for a demo hears nothing for a day, and by then they have booked with someone else.

Sending a welcome email right away and posting the lead in Discord means the prospect hears back within a minute and the team can follow up while interest is high.

What you get out of it

  • Leads hear back right away

    The welcome email arrives seconds after the form is submitted. A fast response sets the tone for the rest of the conversation.

  • The team sees leads where they work

    A Discord message in #sales puts each lead in front of the people who will follow up. No one has to check a separate inbox.

  • Emails come from your address

    The welcome is sent from your Gmail, so replies go straight to you. It reads like a personal note, not an automated receipt.

  • Bad submissions are filtered out

    Entries without a valid email address are skipped. Spam and test submissions do not trigger emails or clutter the channel.

How it works

What happens, step by step

  1. Your website form sends each new submission to your automation's private link.

  2. Submissions without a valid email address are ignored.

  3. The lead gets a welcome email sent from your Gmail.

  4. A message with the lead's details is posted in your #sales Discord channel.

Before it runs live

  • Connect Discord
  • Connect Google through your own Google app (a one-time, 10-minute setup), so it works with your own Gmail
  • Paste your automation's link into the other app's webhook settings

What you get

RunsThe moment it happens
Welcome new form leads by email and alert Discordjust nowSucceeded
Discord · #salesNew lead: Priya Shah (priya@contoso.example). Company: Contoso. "Looking for a demo for a team of 12."

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 Discord and Gmail 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.
new_form_leads_by_email_and_discord.pyexample
import base64, re
from email.mime.text import MIMEText
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_event, credentials, http

CHANNEL_ID = "your-discord-channel-id"

@on_event
def handle(event):
    lead = event.json or {}
    email, name = (lead.get("email") or "").strip(), lead.get("name", "there")
    if not re.match(r"[^@\s]+@[^@\s]+\.[^@\s]+$", email):
        return {"skipped": "invalid email"}
    msg = MIMEText(f"Hi {name.split()[0]},\n\nThanks for getting in touch. We'll reply within one working day.\n")
    msg["To"], msg["Subject"] = email, "Thanks for reaching out"
    gmail = build("gmail", "v1", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
    gmail.users().messages().send(userId="me", body={"raw": base64.urlsafe_b64encode(msg.as_bytes()).decode()}).execute()
    text = f"New lead: **{name}** ({email})\nCompany: {lead.get('company', '-')}\n{(lead.get('message') or '')[:500]}"
    http.post(f"https://discord.com/api/v10/channels/{CHANNEL_ID}/messages",
              headers={"Authorization": f"Bot {credentials.secret('DISCORD_BOT_TOKEN')}"}, json={"content": text})
    return {"lead": email}

FAQ

Common questions

Which form tools can I use?
Any form tool that can send a webhook on submission. You paste your automation's link into the form's webhook settings.
What does the welcome email say?
A short message you write once, with the lead's first name filled in. It can include a booking link or next steps.
Which details appear in the Discord message?
The lead's name, email, company and message, or whichever form fields you choose. Long messages are trimmed so the post stays readable.
What permissions does it need?
Gmail send; Discord send. 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 “Welcome new form leads by email and alert Discord” from your assistant

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