Every 15 minutes
Turn documents in a folder into WordPress posts
Drop a document into your Drive folder and it becomes a WordPress post, announced in your Discord channel.
- Runs
- Every 15 minutes
- Apps
- Discord, WordPress
- AI
- Yes, uses the built-in AI allowance
- Access
- WordPress write; bot Send Messages
Send this to your assistant
Create a ClickRuntime automation: when I drop a document in my Drive folder, extract the text, write a blog post from it with AI, publish it to WordPress and announce it in Discord.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A nonprofit produces reports, meeting notes and press releases as documents, but its website blog is months behind because turning each one into a readable post takes an afternoon nobody has. The material exists; it just never reaches the people who would read it.
Dropping the document into a folder and having a post drafted, published and announced lets the website keep up with the work the team is already doing.
What you get out of it
Your blog keeps pace with your work
Every report or update that already exists can become a post. The site stops lagging months behind what the team has done.
No rewriting from scratch
The post is written from the document's own content. You start from something publishable instead of a blank page.
The community hears about it
Each post is announced in Discord with a link. Readers who follow you there see new content without visiting the site.
Nothing is published twice
Documents already turned into posts are remembered. Moving or renaming files in the folder does not create duplicates.
How it works
What happens, step by step
Every 15 minutes, ClickRuntime checks your Google Drive folder for new documents.
Documents it has already turned into posts are skipped.
The text is read from each new document, and AI writes a blog post with a title from it.
The post is created on your WordPress site and a link is posted in your Discord channel.
Before it runs live
- Connect Discord
- Connect WordPress
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 Discord and WordPress steps into one automation
Under the hood
The code that runs this automation
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, credentials, http, state, ai, report_fetched
FOLDER_ID = "your-drive-folder-id"
WP_URL = "https://yoursite.example.com"
CHANNEL_ID = "your-discord-channel-id"
SCHEMA = {"type": "object", "properties": {"title": {"type": "string"}, "html": {"type": "string"}}}
@on_trigger
def run(event):
drive = build("drive", "v3", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
done = set(state.get("done") or [])
files = [f for f in drive.files().list(q=f"'{FOLDER_ID}' in parents and mimeType = 'application/vnd.google-apps.document' and trashed = false",
fields="files(id,name)").execute().get("files", []) if f["id"] not in done]
report_fetched(len(files))
if not files:
return {"summary": "Nothing new"}
wp_auth = ("your-wp-username", credentials.secret("WORDPRESS_APP_PASSWORD"))
for f in files:
text = drive.files().export(fileId=f["id"], mimeType="text/plain").execute().decode()[:20000]
post = ai.generate(["Write a clear blog post in HTML with a title, based on this document.", text],
max_output_tokens=2000, json_schema=SCHEMA).json
wp = http.post(f"{WP_URL}/wp-json/wp/v2/posts", auth=wp_auth, json={"title": post["title"], "content": post["html"], "status": "publish"}).json()
http.post(f"https://discord.com/api/v10/channels/{CHANNEL_ID}/messages", headers={"Authorization": f"Bot {credentials.secret('DISCORD_BOT_TOKEN')}"},
json={"content": f"New post: **{post['title']}**\n{wp['link']}"})
done.add(f["id"])
state.set("done", sorted(done))
return {"summary": f"{len(files)} posts published"}FAQ
Common questions
Are posts published straight away or saved as drafts?
Which document types work?
What does the WordPress account need?
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
Publish feed articles to WordPress and announce them in Discord
New articles from your feeds are rewritten in your voice, published on your WordPress site and announced in Discord.
See how it worksPublish a daily blog post to WordPress and share the link in Discord
Each day a post is written for the next keyword on your list, published on your WordPress site, and its link is posted in your Discord channel.
See how it worksLabel new emails automatically
New mail is sorted into labels like Inquiry, Invoice and Newsletter within minutes of arriving.
See how it worksKeep exploring
Set up “Turn documents in a folder into WordPress posts” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.