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.
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
Your website form sends each new submission to your automation's private link.
Submissions without a valid email address are ignored.
The lead gets a welcome email sent from your Gmail.
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
Build your own
Need it to work differently?
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
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?
What does the welcome email say?
Which details appear in the Discord message?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Post failure and alert emails to a Discord channel
Alert emails from your services show up in your team's Discord channel within minutes, with the subject and a short preview.
See how it worksGet email and Discord alerts when a site goes down or a domain frees up
Your sites and wished-for domains are checked every 30 minutes, and you get an email and a Discord message the moment one changes.
See how it worksLabel your Gmail by type and post important emails to Discord
New emails are sorted into your Gmail labels such as Invoice, Order and Support, and urgent or support emails are posted to your Discord #inbox channel.
See how it worksKeep exploring
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.