Skip to content

On a schedule

Add FAQ sections to your WordPress pages, with copies in Drive

Each week, pages without an FAQ get five questions and answers written from their content, and a copy of each FAQ is kept in a Google Drive document.

Runs
On a schedule
Apps
Google Drive, WordPress
AI
Yes, uses the built-in AI allowance
Access
WordPress write; Drive write

Send this to your assistant

Create a ClickRuntime automation: every week, for each WordPress page without an FAQ, write 5 FAQs from its content, save them in a Drive doc and add them to the page.

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 dental practice's website has a page for every treatment, and patients keep phoning with the same questions about cost, recovery and how many visits it takes. FAQ sections would help, and the practice manager wants a copy of everything added to the site kept somewhere the dentists can review it.

This automation adds them a batch at a time. Each week it lists the site's pages, skips any already done, AI writes five FAQs from each page's content, a copy is saved as a Google Doc in a shared folder, and the FAQ is added to the end of the page.

What you get out of it

  • Answers before patients call

    Common questions answered on the page mean fewer calls to reception and better-prepared patients.

  • A reviewable copy of every change

    Each FAQ is saved in Drive, where clinicians or managers can read and comment. Anything that needs correcting is easy to spot.

  • Covers the whole site over time

    A weekly batch works through every page without a big one-off project.

  • Written from your own pages

    FAQs are based only on what each page already says, so they stay consistent with your existing information.

How it works

What happens, step by step

  1. Every week, ClickRuntime lists the pages on your WordPress site and skips the ones it has already given an FAQ.

  2. For each page in the batch, AI writes five questions and answers from the page's own content.

  3. A copy of each FAQ is saved as a Google Doc in your Drive folder.

  4. The FAQ section is added to the end of the page, and the page is remembered as done.

Before it runs live

  • Connect Google Drive
  • Connect WordPress

What you get

RunsOn a schedule
Add FAQ sections to your WordPress pages, with copies in Drivetoday, 9:00Succeeded
Google Drive · FAQ draftsFAQ: Teeth Whitening - How long do results last? Most patients see results for 6 to 12 months...

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

  • 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 Google Drive 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.
add_ai_faq_sections_to_wordpress_pages.pyexample
import re
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, credentials, http, state, ai

FOLDER_ID = "your-drive-folder-id"
SKIP = {"contact", "privacy-policy"}
WP = "https://blog.example.com/wp-json/wp/v2"

def wp(method, path, **kw):
    r = http.request(method, f"{WP}/{path}", auth=(credentials.secret("WP_USER"), credentials.secret("WP_APP_PASSWORD")), **kw)
    r.raise_for_status()
    return r.json()

@on_trigger
def run(event):
    done = set(state.get("done") or [])
    pages = [p for p in wp("GET", "pages", params={"per_page": 100, "context": "edit"}) if p["id"] not in done and p["slug"] not in SKIP][:5]
    creds = Credentials(credentials.connection("google", "work"))
    docs, drive = build("docs", "v1", credentials=creds, cache_discovery=False), build("drive", "v3", credentials=creds, cache_discovery=False)
    for p in pages:
        text = re.sub("<[^>]+>", " ", p["content"]["raw"])[:4000]
        faq_html = ai.generate(f"Write 5 FAQs answered by this page as HTML (h3 question, p answer):\n{text}", max_output_tokens=900).text
        doc_id = docs.documents().create(body={"title": f"FAQ: {p['title']['raw']}"}).execute()["documentId"]
        docs.documents().batchUpdate(documentId=doc_id, body={"requests": [{"insertText": {"location": {"index": 1}, "text": re.sub("<[^>]+>", "\n", faq_html)}}]}).execute()
        drive.files().update(fileId=doc_id, addParents=FOLDER_ID, fields="id").execute()
        wp("POST", f"pages/{p['id']}", json={"content": p["content"]["raw"] + "\n<h2>Frequently asked questions</h2>\n" + faq_html})
        done.add(p["id"])
    state.set("done", list(done))
    return {"pages": len(pages)}

FAQ

Common questions

How many pages does it do each week?
Five by default, so the changes stay easy to review. You can raise the number.
Will it change my existing content?
No. The FAQ section is added after the existing content of the page.
Can I skip certain pages?
Yes. List pages to leave out, such as your contact or privacy pages.
What permissions does it need?
WordPress write; Drive write. 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 runs (on a schedule). Checks that find nothing to do 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 “Add FAQ sections to your WordPress pages, with copies in Drive” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.