Every 15 minutes
Turn 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.
- 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 a press release arrives (in the body, a PDF or a Word file), rewrite it as a publish-ready article, save it as a Doc in my Drive and email me the link.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
An editor at a regional trade site receives a dozen press releases a day. Most are worth a short news item, but each needs rewriting from promotional language into a neutral story with a headline, which takes twenty minutes she does not have.
Getting a first draft in a Google Doc for each release means she spends her time checking facts and choosing which stories to run, not retyping the same structure.
What you get out of it
More stories with the same team
Starting from a draft instead of a blank page lets a small newsroom cover releases it would otherwise skip.
Consistent house style
Each draft follows the same structure and tone you describe, so articles read the same whoever edits them.
Drafts ready to edit together
Saving as a Google Doc means colleagues can comment and edit in the same file before it goes to your publishing tool.
Nothing slips through the inbox
Every release gets a draft, so a useful story is not lost under the next fifty emails.
How it works
What happens, step by step
Every few minutes ClickRuntime checks your Gmail for new press release emails.
It reads the release from the email body or from an attached PDF or Word file, and skips emails it has already handled.
AI rewrites the release as a news article with a headline in the style you described.
The article is saved as a Google Doc in your Drive folder and you get an email with the link.
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
from googleapiclient.discovery import build
from google.oauth2.credentials import Credentials
from clickruntime import on_trigger, credentials, notify, ai, report_fetched, http
FOLDER = "articles-folder-id"
STYLE = "Neutral news style, 300 words, headline first, no superlatives."
@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='label:press-releases -label:drafted').execute().get("messages", [])
report_fetched(len(msgs))
if not msgs:
return {"summary": "No new releases"}
for m in msgs:
snippet = gmail.messages().get(userId="me", id=m["id"]).execute()["snippet"]
body = gmail.messages().get(userId="me", id=m["id"], format="full").execute()["payload"]
text = snippet if not body.get("parts") else str(body["parts"][0].get("body", {}).get("data", snippet))
article = ai.generate(f"{STYLE}\nRewrite as an article:\n{text[:8000]}", max_output_tokens=900).text
doc = http.post("https://www.googleapis.com/upload/drive/v3/files?uploadType=multipart", headers={"Authorization": f"Bearer {creds.token}"},
files={"metadata": (None, f'{{"name": "{article.splitlines()[0][:80]}", "mimeType": "application/vnd.google-apps.document", "parents": ["{FOLDER}"]}}', "application/json"),
"file": ("a.txt", article, "text/plain")}).json()
notify.email_me("New article draft", f"https://docs.google.com/document/d/{doc['id']}/edit")
return {"drafted": len(msgs)}FAQ
Common questions
How does it recognise a press release?
Does it check facts in the release?
Can I set the length and tone?
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 worksTranscribe 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.
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 worksKeep exploring
Set up “Turn emailed press releases into draft articles in Drive” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.