Turn new WordPress posts into narrated MP3s in Google Drive

By General Input

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.

Integrations

  • WordPress
  • Azure AI Speech
  • Google Drive
  • Slack

Type

Deterministic Code

Categories

  • Marketing

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.

Related prompts

Explore more prompts
Call overdue Xero customers with an AI collections agentWin back LiveChat visitors whose chats went unansweredChat quality review board for LiveChat support leadsWin back no-show and cancelled appointments every morningLive Loop returns analytics with product-level drill-downNewsletter pre-flight and approval board for Mailjet sendsTurn a prospect spreadsheet into personalized sequence enrollmentsMailjet email delivery lookup console for support teamsCatch feature flags that never got switched on in productionKajabi customer support console for member access fixes