Monthly
Get your monthly report deck by email with the latest numbers
On the 1st of each month, your Slides report template is filled with last month's figures from Google Analytics and the PDF is emailed to you.
- Runs
- Monthly
- Apps
- Gmail, Google Slides
- AI
- Optional
- Access
- Slides/Drive edit; gmail.send
Send this to your assistant
Create a ClickRuntime automation: on the 1st of each month, update a copy of my Slides report template with last month's Google Analytics metrics and email me the PDF from Gmail.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A marketing lead rebuilds the same monthly report deck every month: export figures from Google Analytics, paste them into slides, export a PDF, send it round. It's an hour of copy and paste that adds nothing.
Filling a copy of the template with last month's numbers and emailing the PDF on the 1st means the report is ready before the monthly meeting, every time.
What you get out of it
The report is ready on the 1st
No more scrambling the morning of the monthly meeting.
The same format every month
Months are easy to compare because the layout never changes.
No copy and paste errors
Figures go straight from the source into the slides.
Optional commentary
If AI is available, a short note on what changed is added.
How it works
What happens, step by step
On the 1st of each month, ClickRuntime fetches last month's totals from Google Analytics.
If AI is available, it writes a one-sentence comment on the figures.
It copies your Slides report template and fills in the numbers.
It exports the deck as a PDF and emails it to you 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 Slides
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
- Run it at a different time, more or less often, or only on weekdays
- 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 Slides steps into one automation
Under the hood
The code that runs this automation
import base64
from datetime import date, timedelta
from email.message import EmailMessage
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, credentials, http, ai
TEMPLATE_ID, GA_PROPERTY, ME = "report-template-id", "123456789", "me@northwind.com"
@on_trigger
def run(event):
end = date.today().replace(day=1) - timedelta(days=1)
names = ["totalUsers", "sessions", "conversions", "totalRevenue"]
ga = http.post(f"https://analyticsdata.googleapis.com/v1beta/properties/{GA_PROPERTY}:runReport", headers={"Authorization": "Bearer " + credentials.connection("google", "work")},
json={"dateRanges": [{"startDate": str(end.replace(day=1)), "endDate": str(end)}], "metrics": [{"name": n} for n in names]}).json()
v = dict(zip(["users", "sessions", "conversions", "revenue"], (m["value"] for m in ga["rows"][0]["metricValues"])))
try:
v["comment"] = ai.generate(f"One sentence on these monthly website figures: {v}", max_output_tokens=60).text
except ai.AIError:
v["comment"] = ""
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"Report {end:%B %Y}"}).execute()["id"]
slides.batchUpdate(presentationId=deck, body={"requests": [{"replaceAllText": {"containsText": {"text": "{{" + k + "}}"}, "replaceText": str(x)}}
for k, x in {**v, "month": f"{end:%B %Y}"}.items()]}).execute()
msg = EmailMessage()
msg["To"], msg["Subject"] = ME, f"Monthly report – {end:%B %Y}"
msg.set_content(f"Deck: https://docs.google.com/presentation/d/{deck}\n{v['comment']}")
msg.add_attachment(drive.files().export(fileId=deck, mimeType="application/pdf").execute(), maintype="application", subtype="pdf", filename=f"Report {end:%B %Y}.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()
return vFAQ
Common questions
Which metrics are included?
What does the template need?
Can it send to the whole team?
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
Email a tailored proposal deck to a client after a sales call
After a call, a proposal is written from your notes, built in your Slides template, turned into a PDF and emailed to the client from your Gmail.
See how it worksEmail a personalised certificate to everyone who passes
Everyone who scores 80% or more gets a PDF certificate with their name, made from your Slides template and emailed from your Gmail.
See how it worksGet alerts about security issues that affect you
When a serious vulnerability is published for software you use, your security channel hears about it the same hour.
See how it worksKeep exploring
Set up “Get your monthly report deck by email with the latest numbers” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.