Every 15 minutes
Transcribe emailed audio and save summaries to Drive
Voice notes and recordings sent to your inbox become a transcript and summary in Drive, with the summary emailed to you.
- Runs
- Every 15 minutes
- Apps
- Gmail, Google Drive
- AI
- Yes, uses the built-in AI allowance
- Access
- Gmail gmail.modify; Drive write
Send this to your assistant
Create a ClickRuntime automation: when an email with an audio attachment arrives, transcribe it, write a summary, save both to my Drive 'Transcripts' folder and email me the summary.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A consultant records client calls on her phone and emails the files to herself. They pile up in her inbox, and when she needs to recall what a client agreed, she has to listen to forty minutes of audio to find one sentence.
Turning each recording into a searchable transcript and a short summary means the key points are in writing the same day and the full text is there when details matter.
What you get out of it
Find what was said in seconds
Transcripts in Drive can be searched like any document, so a figure or promise from a call is a quick search away.
Follow-ups written while fresh
The summary arrives soon after the recording, which makes it easy to send a recap or action list to the client the same day.
Recordings kept in one place
Every transcript sits in one Drive folder instead of scattered across email threads and phone storage.
Works with any recorder
Any app or device that can email an audio file works, so there is nothing new to install on your phone.
How it works
What happens, step by step
Every few minutes ClickRuntime checks your Gmail for new emails with an audio attachment.
It skips any email it has already handled.
The audio is transcribed, and AI writes a short summary with the main points and any action items.
The transcript and summary are saved to your Transcripts folder in Google Drive, and the summary is emailed to you.
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 Drive
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 Drive steps into one automation
Under the hood
The code that runs this automation
import base64
from googleapiclient.discovery import build
from google.oauth2.credentials import Credentials
from clickruntime import on_trigger, credentials, notify, ai, report_fetched, http
FOLDER = "transcripts-folder-id"
@on_trigger
def run(event):
creds = Credentials(credentials.connection("google", "work"))
gmail = build("gmail", "v1", credentials=creds, cache_discovery=False).users()
msgs = gmail.messages().list(userId="me", q="has:attachment filename:(mp3 OR m4a OR wav) -label:transcribed newer_than:1d").execute().get("messages", [])
report_fetched(len(msgs))
if not msgs:
return {"summary": "No new audio"}
for m in msgs:
part = next(p for p in gmail.messages().get(userId="me", id=m["id"]).execute()["payload"]["parts"] if p.get("filename"))
data = gmail.messages().attachments().get(userId="me", messageId=m["id"], id=part["body"]["attachmentId"]).execute()["data"]
text = http.post("https://api.openai.com/v1/audio/transcriptions", headers={"Authorization": f"Bearer {credentials.secret('OPENAI_API_KEY')}"},
files={"file": (part["filename"], base64.urlsafe_b64decode(data))}, data={"model": "whisper-1"}).json()["text"]
summary = ai.generate(f"Summarise with action items:\n{text[:20000]}", max_output_tokens=400).text
http.post("https://www.googleapis.com/upload/drive/v3/files?uploadType=multipart", headers={"Authorization": f"Bearer {creds.token}"},
files={"metadata": (None, f'{{"name": "{part["filename"]}.txt", "parents": ["{FOLDER}"]}}', "application/json"),
"file": ("t.txt", f"SUMMARY\n{summary}\n\nTRANSCRIPT\n{text}", "text/plain")})
notify.email_me(f"Summary: {part['filename']}", summary)
return {"transcribed": len(msgs)}FAQ
Common questions
Which audio formats are supported?
Can it tell speakers apart?
Does it only look at emails from me?
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
Save invoice PDFs from Gmail to Drive, named by supplier and amount
Invoice and receipt PDFs in your inbox are saved to Drive as date_supplier_amount files, and the email is labelled as filed.
See how it worksFile emailed CVs in Drive with a short candidate review
Every CV sent to your jobs inbox is saved to your Candidates folder and you get an email with a short review against the role.
See how it worksTurn emailed press releases into draft articles in Drive
Press releases that reach your inbox come back as publish-ready article drafts in Google Docs, with the link emailed to you.
See how it worksKeep exploring
Set up “Transcribe emailed audio and save summaries to Drive” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.