Skip to content

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.

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

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

  1. Every 15 minutes, ClickRuntime checks your Google Drive folder for new documents.

  2. Documents it has already turned into posts are skipped.

  3. The text is read from each new document, and AI writes a blog post with a title from it.

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

RunsEvery 15 minutes
Turn documents in a folder into WordPress poststoday, 9:00Succeeded
Discord · #announcementsNew post: What the Contoso river cleanup achieved this spring https://yoursite.example.com/river-cleanup-spring

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
  • 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

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.
turn_uploaded_documents_into_posts.pyexample
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?
You choose. Many people start with drafts so they can check the post in WordPress before it goes live, then switch to publishing directly.
Which document types work?
Google Docs and plain text files, whose text can be read directly. For PDFs, saving them as a Google Doc first gives the best results.
What does the WordPress account need?
An application password for a user with permission to create posts. Author or Editor roles are enough.
What permissions does it need?
WordPress write; bot Send Messages. Nothing else in your accounts is used.
Does it need AI?
Yes. It uses ClickRuntime's built-in AI, so you don't need an OpenAI or Anthropic key. Every plan includes a monthly AI allowance.
How many runs does it use?
One run each time it checks. Checks that find nothing new and stop right away aren't counted.
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 “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.