The moment it happens
Create a PDF certificate in Drive for everyone who passes
Everyone who scores 80% or more on your quiz gets a certificate made from your Slides template, saved as a PDF in Drive and emailed to them.
- Runs
- The moment it happens
- Apps
- Google Drive, Google Slides
- AI
- Not needed
- Access
- Drive read+write; Slides write
Send this to your assistant
Create a ClickRuntime automation: when someone scores 80% or more on my quiz, fill my certificate template with their name and date, save the PDF in my Certificates folder in Drive and email it to them.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
Course creators and trainers promise a certificate on completion, then spend Sunday evenings editing a template name by name and emailing PDFs. Learners wait days for something they've earned.
Making the certificate the moment someone passes, keeping a copy in Drive and sending it straight away, rewards learners while they're still proud of the result.
What you get out of it
Instant recognition
Learners get their certificate minutes after passing.
A record in Drive
Every certificate is saved as a PDF in one folder.
Consistent design
Each one comes from your own template.
No manual editing
Names and dates are filled in for you.
How it works
What happens, step by step
Your quiz sends each result to your automation's link.
ClickRuntime checks whether the score is 80% or higher.
It copies your certificate template, fills in the name and date, and saves a PDF in your Certificates folder.
It emails the certificate to the learner from your Gmail address.
Each result is handled once, even if the quiz sends it again.
Before it runs live
- Connect Google Drive
- Connect Google Slides
- 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 and Google Slides steps into one automation
Under the hood
The code that runs this automation
import base64, io
from datetime import date
from email.message import EmailMessage
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from googleapiclient.http import MediaIoBaseUpload
from clickruntime import on_event, credentials, http, state
TEMPLATE_ID, FOLDER = "certificate-template-id", "certificates-folder-id"
@on_event
def handle(event):
r = event.json or {}
if float(r.get("score", 0)) < 80 or state.get(f"sent:{r['email']}"):
return {"skipped": True}
drive, slides = build("drive", "v3", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False), build("slides", "v1", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False).presentations()
deck = drive.files().copy(fileId=TEMPLATE_ID, body={"name": f"Certificate – {r['name']}"}).execute()["id"]
slides.batchUpdate(presentationId=deck, body={"requests": [{"replaceAllText": {"containsText": {"text": "{{" + k + "}}"}, "replaceText": v}}
for k, v in {"name": r["name"], "date": f"{date.today():%d %B %Y}"}.items()]}).execute()
pdf = drive.files().export(fileId=deck, mimeType="application/pdf").execute()
drive.files().create(body={"name": f"Certificate – {r['name']}.pdf", "parents": [FOLDER]}, media_body=MediaIoBaseUpload(io.BytesIO(pdf), mimetype="application/pdf")).execute()
drive.files().delete(fileId=deck).execute()
msg = EmailMessage()
msg["To"], msg["Subject"] = r["email"], "Your certificate"
msg.set_content(f"Congratulations {r['name']}! Your certificate is attached.")
msg.add_attachment(pdf, maintype="application", subtype="pdf", filename="certificate.pdf")
build("gmail", "v1", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False).users().messages().send(userId="me", body={"raw": base64.urlsafe_b64encode(msg.as_bytes()).decode()}).execute()
state.set(f"sent:{r['email']}", True)
return {"sent": r["email"]}FAQ
Common questions
Which quiz tools work?
What placeholders does the template need?
Which address sends the email?
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
Turn call notes into a proposal deck in the client's Drive folder
Submit your notes after a sales call and a proposal deck is written, built from your Slides template, saved with a PDF in the client's Drive folder, and the link is emailed to you.
See how it worksMake a personalised pitch deck for each prospect in a CSV
Drop a prospect list in Drive and each prospect gets their own copy of your pitch deck with their name, company and pain point filled in.
See how it worksCombine images in a Drive folder into one PDF
Images you add to your Drive 'To PDF' folder are placed one per page and saved as a single PDF in the same folder.
See how it worksKeep exploring
Set up “Create a PDF certificate in Drive for everyone who passes” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.