The moment it happens
Send quotes from a Google Doc template when a form comes in
Each quote request fills your Google Doc template with the client's details, is saved as a PDF and emailed to the client from your Gmail.
- Runs
- The moment it happens
- Apps
- Gmail, Google Docs
- AI
- Optional
- Access
- Docs write; Gmail gmail.send
Send this to your assistant
Create a ClickRuntime automation: when a quote request comes in from my form, fill my Google Doc quote template, export it as a PDF and email it to the client from Gmail.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A small landscaping company gets quote requests through its website form. Each one means opening the quote template, copying in the name, address and job details, saving a PDF and writing an email. On a busy spring week that is dozens of quotes, and the ones that go out a day late are the ones that lose to a faster competitor.
With this automation the form does the work. Each request fills the template, a PDF is made and the email goes from your own Gmail address within a minute, with an optional short AI-written cover paragraph based on what the client asked for.
What you get out of it
Quotes go out in a minute, not a day
The client gets a quote while they are still comparing options. Speed is often what wins small jobs.
Your template, your branding
The quote is your own Google Doc with your logo, terms and layout. Changing the wording means editing one document.
No copy and paste mistakes
Names, addresses and prices come straight from the form. Wrong names and stale prices from the last quote stop happening.
Every quote kept as a Doc
Each quote is saved as its own copy in Drive. You can find, edit or resend any of them later.
Works for proposals and letters too
The same flow fills any template: proposals, engagement letters or confirmations. Only the template and placeholders change.
How it works
What happens, step by step
When someone submits your quote request form, ClickRuntime receives their details.
It makes a copy of your Google Doc quote template and fills in the client's name, address and job details.
If you turn it on, AI writes a short cover paragraph based on what the client asked for.
The finished quote is saved as a PDF and emailed to the client from your Gmail address.
Before it runs live
- Connect Google through your own Google app (a one-time, 10-minute setup), so it works with your own Gmail
- Connect Google Docs
- 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
- 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 Gmail and Google Docs steps into one automation
Under the hood
The code that runs this automation
import base64
from email.message import EmailMessage
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_event, credentials, ai, log
TEMPLATE_ID = "your-template-doc-id"
@on_event
def handle(event):
form = event.json or {}
if not form.get("email"):
return {"skipped": "no email"}
creds = Credentials(credentials.connection("google", "work"))
drive = build("drive", "v3", credentials=creds, cache_discovery=False)
doc_id = drive.files().copy(fileId=TEMPLATE_ID, body={"name": f"Quote - {form.get('name', '')}"}).execute()["id"]
try:
form["intro"] = ai.generate(f"Two-sentence friendly intro for a quote. Request: {str(form.get('details', ''))[:800]}", max_output_tokens=120).text
except ai.AIError:
form["intro"] = "Thank you for your request. Please find your quote attached."
reqs = [{"replaceAllText": {"containsText": {"text": "{{" + k + "}}"}, "replaceText": str(v)}} for k, v in form.items()]
build("docs", "v1", credentials=creds, cache_discovery=False).documents().batchUpdate(documentId=doc_id, body={"requests": reqs}).execute()
pdf = drive.files().export(fileId=doc_id, mimeType="application/pdf").execute()
msg = EmailMessage()
msg["To"], msg["Subject"] = form["email"], "Your quote"
msg.set_content(f"Hi {form.get('name', '')},\n\n{form['intro']}\n")
msg.add_attachment(pdf, maintype="application", subtype="pdf", filename="quote.pdf")
build("gmail", "v1", credentials=creds, cache_discovery=False).users().messages().send(
userId="me", body={"raw": base64.urlsafe_b64encode(msg.as_bytes()).decode()}).execute()
log.info("Quote sent", {"doc": doc_id})
return {"doc": doc_id}FAQ
Common questions
How do placeholders work?
Which forms can send requests?
Can I check a quote before it is sent?
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
Get an AI client brief as a Google Doc by email
Submit a client name and receive an email linking to a Google Doc brief on that company, ready before the meeting.
See how it worksDraft RFP answers in a Google Doc when one arrives by email
When an RFP lands in Gmail, every question in it is answered in a draft Google Doc and you get an email with the link.
See how it worksEmail action items from new meeting notes
When a meeting notes doc appears in your folder, attendees get an email with a short summary and their action items.
See how it worksKeep exploring
Set up “Send quotes from a Google Doc template when a form comes in” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.