Skip to content

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.

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

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

  1. Your quiz sends each result to your automation's link.

  2. ClickRuntime checks whether the score is 80% or higher.

  3. It copies your certificate template, fills in the name and date, and saves a PDF in your Certificates folder.

  4. It emails the certificate to the learner from your Gmail address.

  5. 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

RunsThe moment it happens
Create a PDF certificate in Drive for everyone who passesjust nowSucceeded
Gmail · SentYour certificate – Congratulations Alex Rivera! Your certificate is attached.

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 Google Drive and Google Slides 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.
generate_and_email_certificates_from_a_slides_template.pyexample
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?
Any form or quiz tool that can send the result to your automation's link, including Google Forms via a small script, Typeform or Tally.
What placeholders does the template need?
{{name}} and {{date}}, plus {{course}} or {{score}} if you want them.
Which address sends the email?
Your connected Gmail address.
What permissions does it need?
Drive read+write; Slides write. 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 “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.