Turn new WordPress posts into narrated MP3s in Google Drive

Every morning at 8am, narrate each freshly published WordPress article with an Azure neural voice, save the MP3 to Google Drive, and share the link in Slack.

Deterministic Code
WordPressAzure AI SpeechGoogle DriveSlackMarketingContent GenerationNotifications & Alerts
PromptCreate

Build a deterministic code workflow that publishes every new WordPress blog post as a narrated MP3 in Google Drive and announces it in Slack. This is a fixed pipeline, not an agent — same voice, same folder, same channel, same narration template on every run.

Trigger: cron, once a day at 8:00 in the workspace's local timezone. Persist the previous run's timestamp so each run only processes posts published since then.

Step 1 — Fetch new posts. Call WordPress "List Posts" with status set to publish and the after filter set to the previous run's timestamp. Paginate until there are no more results. For each post, capture id, slug, title (post.title.rendered), link (post URL), and content (post.content.rendered).

Step 2 — Prepare narration input. For each post, strip HTML tags and shortcodes from the rendered content, decode HTML entities, and wrap the plain text in a single SSML document. The SSML must use one configurable Azure neural voice (default en-US-JennyNeural, but expose the voice name as a workflow input so it can be swapped). Add a short intro line with the article title and a short outro sign-off, both from a configurable template.

Step 3 — Kick off narration. Call Azure AI Speech "Create Batch Synthesis" with the SSML payload, the chosen voice, an outputFormat of audio-24khz-160kbitrate-mono-mp3, and a client-generated synthesisId derived from the post slug. Batch synthesis is required here because full articles routinely exceed the 10-minute real-time TTS cap.

Step 4 — Wait for the audio. Poll Azure AI Speech "Get Batch Synthesis" for that synthesisId every 30 seconds. Continue while status is NotStarted or Running. Fail the run for that post if status is Failed. When status is Succeeded, read the MP3 audio URL from the outputs and download the bytes.

Step 5 — Save to Drive. Call Google Drive "Upload File (Multipart)" to store the MP3 in an audio-articles folder (configurable folder id). Name the file with the post slug (for example my-post-slug.mp3) and use audio/mpeg as the mime type. Capture the resulting file id and web view link.

Step 6 — Announce in Slack. Call Slack "Send a Message" to a configurable marketing channel with the article title as the headline, the WordPress post URL, and the Google Drive share link. Keep the format consistent for every post.

Determinism: use the same voice, the same SSML template, the same Drive folder, and the same Slack channel for every post — none of these should be inferred by an LLM at runtime. Expose voice name, SSML intro/outro template, Google Drive folder id, and Slack channel as workflow inputs so they can be edited without touching code. On failure of any single post, log the error and move on to the next post so one bad article does not block the rest.

Additional information

What does this prompt do?
  • Each morning we find every WordPress post you published since the last run and read it aloud with a natural-sounding neural voice.
  • Long-form articles are handled end to end, so a 30-minute read becomes a full-length MP3 instead of a truncated clip.
  • Every finished audio file is saved to a shared Google Drive folder, named after the post so it is easy to find.
  • Your marketing channel gets a clean Slack announcement with the article title, the post link, and the Google Drive share link.
What do I need to use this?
  • A WordPress site with publishing access and an application password.
  • An Azure AI Speech account with a resource key you can use for text-to-speech.
  • A Google Drive folder where you want the audio articles saved.
  • A Slack workspace and the channel where you want each new episode announced.
How can I customize it?
  • Change the run time (8am daily by default) or schedule multiple runs a day for high-volume blogs.
  • Swap the narrator by choosing any Azure neural voice, or use different voices per author or category.
  • Point the audio at a different Google Drive folder, or send the announcement to a different Slack channel.

Frequently asked questions

What if a post is too long for standard text-to-speech?
We use Azure's batch narration flow, which is designed for long-form content. Articles that would normally exceed the 10-minute real-time limit are narrated end to end without being cut off.
Will old posts get re-narrated every day?
No. Each run only picks up posts published since the previous run, so you never get duplicate MP3s for the same article.
Can I use a different voice for different authors or categories?
Yes. The narrator is a simple setting on the workflow, so you can branch on the post author or category and pick a different Azure neural voice for each.
Where do the MP3s live long-term?
In whichever Google Drive folder you choose. You control retention, sharing permissions, and who on your team can download them.
Can I add a standard intro or outro to every episode?
Yes. The narration template is editable, so you can wrap each article in a consistent intro line, sponsor note, or sign-off.

Give your blog a voice, without the studio time.

Connect WordPress, Azure Speech, Google Drive, and Slack once, and every new article ships as a ready-to-share MP3.