The moment it happens
Create a contract PDF from each form entry
Each form submission becomes a filled-in contract from your template, saved as a PDF in Drive.
- Runs
- The moment it happens
- Apps
- Google Drive
- AI
- Not needed
- Access
- read+write (drive, plus documents scope for the text replacement)
Send this to your assistant
Create a ClickRuntime automation: give me a link my form can send to. Copy my Contract template doc, replace {{name}}, {{date}} and {{amount}}, save it as a PDF in Contracts and email me the link.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A small consultancy sends a service agreement to every new customer. The process is: copy the Google Docs template, find each placeholder, type the customer's company name, address, start date and monthly fee, check it twice because a wrong fee in a contract is expensive, export a PDF and attach it to an email. On a busy day it takes ten minutes per contract, and the customer is waiting for it.
The moment someone submits your form, ClickRuntime copies your template, replaces every placeholder such as the company name, address and fee with the submitted values, and exports the result as a PDF into Drive. It then emails the link, so the customer or your team receives a finished contract without anyone opening the document.
The same approach covers quotes, offer letters, NDAs, certificates, rental agreements and permission slips.
What you get out of it
Contracts go out while interest is high
A customer who signs up in the morning gets a document within moments, not after lunch. Quick turnaround closes more deals because there is less time for second thoughts or another vendor's quote.
Values come from the form, not memory
A fee or date typed once by the customer is the one that appears in the contract. That removes the transcription mistakes that lead to disputes, credit notes and awkward corrections after the paper is signed.
One approved template stays in force
Legal wording lives in a single Docs template. When you improve a clause, every future contract uses the new text, and nobody is accidentally sending a version from last year saved on a desktop.
A PDF copy filed automatically
Each generated PDF is stored in Drive next to the other client files, so finding what was actually sent is a search away. That helps when a customer later says they never received those terms.
Staff time for the actual conversation
Ten minutes of find-and-replace per document adds up to hours every week. Removing it lets the person who used to prepare paperwork spend that time on calls with the customers instead.
How it works
What happens, step by step
When someone submits your form, ClickRuntime receives their answers straight away.
It makes a copy of your contract template in Google Docs and fills in the blanks with the form answers.
The finished contract is saved as a PDF in your Contracts folder in Google Drive.
You get an email with a link to the PDF.
Before it runs live
- Connect Google Drive
- 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 Google Drive steps into one automation
Under the hood
The code that runs this automation
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from googleapiclient.http import MediaInMemoryUpload
from clickruntime import on_event, credentials, notify
TEMPLATE_ID, CONTRACTS = "contract-template-doc-id", "contracts-folder-id"
@on_event
def handle(event):
form = event.json or {}
creds = Credentials(credentials.connection("google", "work"))
drive = build("drive", "v3", credentials=creds, cache_discovery=False)
docs = build("docs", "v1", credentials=creds, cache_discovery=False)
copy = drive.files().copy(fileId=TEMPLATE_ID, body={"name": f"Contract – {form['name']}"}).execute()
docs.documents().batchUpdate(documentId=copy["id"], body={"requests": [
{"replaceAllText": {"containsText": {"text": "{{" + key + "}}", "matchCase": True}, "replaceText": str(form[key])}}
for key in ("name", "date", "amount")]}).execute()
pdf = drive.files().export(fileId=copy["id"], mimeType="application/pdf").execute()
saved = drive.files().create(body={"name": f"Contract – {form['name']}.pdf", "parents": [CONTRACTS]},
media_body=MediaInMemoryUpload(pdf, "application/pdf"), fields="id,webViewLink").execute()
drive.files().delete(fileId=copy["id"]).execute()
notify.email_me(f"Contract ready: {form['name']}", saved["webViewLink"])
return {"pdf": saved["id"]}FAQ
Common questions
How are placeholders written in the template?
Can the same document be filled with more than one form?
Does the customer sign it electronically?
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
Set up a shared folder for each new client
Each new client gets a folder with your standard subfolders, shared with them.
See how it worksSave files to Drive from any tool
Any tool that can send a file URL to your link gets that file saved into your Drive folder.
See how it worksBack up your data to Drive every night
Each night your data is saved to a dated Drive folder, and backups older than 30 days go to trash.
See how it worksKeep exploring
Set up “Create a contract PDF from each form entry” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.