Automate WordPress Article Audio Creation with Eleven Labs & n8n
This workflow automates converting WordPress articles into audio summaries using Eleven Labs’ text-to-speech and OpenAI’s summarization. Save hours by generating engaging audio content for your site effortlessly.
Meet Amy, a content manager for a busy WordPress blog focused on tech news. She publishes well-researched articles daily but struggles to reach a wider audience, especially those who prefer listening over reading. Amy tries manually creating audio versions of her articles, but it takes hours to transcribe, edit, and convert text into clear speech. This tedious task not only slows down her publishing but also causes delays and lost audience engagement opportunities. Amy needs a seamless way to convert her articles into audio summaries automatically, saving her precious time while expanding her content’s accessibility.
What This Automation Does
This n8n workflow transforms a WordPress article into an audio summary using advanced AI and text-to-speech technology. Here’s exactly what happens when you run it:
Retrieves a specific WordPress article by post ID using the WordPress node.
Summarizes or transcribes the article content with OpenAI’s GPT model via the LangChain integration, allowing customization of output style.
Converts the generated text summary into natural speech by sending it as a request to Eleven Labs’ Text-to-Speech API through an HTTP Request node.
Uploads the generated MP3 audio file back to your WordPress media library using the WordPress HTTP API endpoints.
Embeds the audio player into the original WordPress post content so visitors can listen directly on your website.
Saves hours of manual transcription, audio editing, and publishing by automating the entire flow.
This workflow not only streamlines creating audio content but also boosts your blog’s accessibility and engagement with minimal manual effort.
Prerequisites ⚙️
n8n account to run and edit your workflows.
WordPress website with REST API access enabled and valid credentials configured in n8n.
OpenAI API key for the GPT-4o-mini model used in LangChain nodes.
Eleven Labs API key for text-to-speech conversion.
Basic familiarity with n8n nodes and workflows.
Step-by-Step Guide to Replicate This Automation
Step 1: Manual Trigger Setup
Go to n8n Editor. Click the + button → Add a new node → Search Manual Trigger. Leave default settings since the workflow starts manually. This allows you to test on demand.
Outcome: You will have a trigger node to initiate the entire process by clicking “Execute Workflow.”
Common Mistake: Forgetting to add the trigger node will prevent starting the workflow manually.
Step 2: Add a Set Node for Site URL
Click + button → Search Set node. Add one assignment field named site_url with your WordPress base URL (example: https://mydomain.com/), exactly as configured in your WordPress site.
Outcome: Provides a reusable variable for API endpoints in later nodes.
Tip: Ensure no trailing slash if your WordPress REST URL does not expect one, to avoid errors.
Step 3: Retrieve WordPress Article with Post ID
Add a WordPress node. Select Get operation and enter the postId parameter. For example, 1032 is the article ID to process.
Connect the previous Set node to this one.
Credential Setup: Select your WordPress API credentials configured in n8n.
Expected Result: The node fetches the full post content in JSON format.
Common Issue: Invalid post ID or incorrect credentials will cause a fetch failure.
Step 4: Generate Summarized Text Using OpenAI GPT via LangChain
Add the LangChain LLM node configured with OpenAI GPT-4o-mini model. Set:
text: ={{ $json.content }}
Add a prompt message like: “Summarize or transcribe this article, depending on the workflow setting.”
Connect output from the WordPress retrieval node.
What Happens Here: This uses LangChain to call OpenAI GPT to create a brief, readable summary or transcription.
Common Mistake: Forgetting to input the article content into the prompt will return an empty or unrelated summary.
Step 5: Generate Speech Audio Using Eleven Labs API
Insert an HTTP Request node. Configure it:
Method: POST
URL:https://api.elevenlabs.io/v1/text-to-speech/voice_id (replace voice_id with your actual voice ID from Eleven Labs)
Authentication: Use custom HTTP header for API key.
Headers: Add Content-Disposition header with attachment filename using the article slug and “.mp3” extension.
Content-Type set to binary data.
Use WordPress API credentials for authentication.
Input data field set to binary MP3 from the previous node.
Outcome: The MP3 uploads into the WordPress media library.
Common Mistake: Forgetting to set Content-Disposition header or uploading non-binary data will cause WordPress server errors.
Step 7: Update WordPress Post to Embed Audio Player
Use another WordPress node with operation update. Set postId dynamically from the original article node output.
Update the post content to append WordPress audio block HTML referencing the uploaded media URL, plus the original article content afterwards.
Example content field snippet:
🗣️ Listen to the summary or transcription. 👆 {{ original article content }}
Effect: Adds an embedded audio player so visitors can listen to the article summary right on the page.
Common Issue: Improper dynamic ID or URL will result in an empty or broken audio player.
Step 8: Test the Entire Workflow
Click the Manual Trigger node, then hit Execute Workflow to run through all steps.
Inspect each node’s output for errors or unexpected results.
Tip: Use sticky notes present in the workflow as a handy reference for customizing prompts and API details.
Customizations ✏️
Change summarization prompt: In the “Generate Summary or Transcription” LangChain node, modify the prompt message to request a different style, such as more detailed benefits or a formal transcription.
Switch voice in Eleven Labs API: In the HTTP Request node for Eleven Labs, replace the voice_id URL segment to use another voice suited for your audience.
Adjust audio quality: Modify the output_format parameter to different bitrates or formats (e.g., wav_48000_256) based on your needs.
Handle longer articles: Add chunking logic before the LangChain summary node to process large articles in segments.
Embed additional metadata: Update the WordPress post with custom captions or additional blocks alongside the audio player.
Troubleshooting 🔧
Problem: “401 Unauthorized” from Eleven Labs API
Cause: Invalid or missing API key in custom auth headers.
Solution: Go to your n8n Credentials → HTTP Custom Auth → Check “xi-api-key” header includes your valid Eleven Labs API key.
Problem: WordPress post update fails
Cause: Incorrect ID mapping or permission issues on WordPress.
Solution: Verify correct post ID references in the “Update WordPress Post” node and ensure API user has write access.
Problem: LangChain summary returns irrelevant content
Cause: Incorrect prompt or empty input to the OpenAI model.
Solution: Check that you are passing full article HTML or plain text content properly as input, adjust prompt accordingly.
Pre-Production Checklist ✅
Verify WordPress REST API credentials and access permissions.
Confirm Eleven Labs API key is active and voice ID is correct.
Test OpenAI API key using LangChain node with sample text.
Run a manual test trigger to monitor all nodes for successful execution.
Backup your WordPress database before running in production to avoid content overwrite issues.
Deployment Guide
Once tested, activate the workflow by keeping the manual trigger (or replace with a time trigger for scheduled runs).
Monitor the workflow executions from the n8n dashboard for errors or API rate limits.
Ensure logging is enabled to audit uploads and updates on your WordPress site.
FAQs
Can I use other text-to-speech services instead of Eleven Labs? Yes, but you will need to replace the HTTP Request node with the appropriate API call and adjust authentication accordingly.
Does this workflow consume costly API credits? Yes, both OpenAI and Eleven Labs API usage incur costs based on your plan. Monitor usage to control expenses.
Is my WordPress data secure? Yes, as long as your API credentials are safely stored in n8n and you use HTTPS endpoints, your data remains protected.
Can this handle large volumes of articles? For bulk processing, consider adding pagination and batching mechanisms in your workflow.
Conclusion
By following this tutorial, you have built a powerful workflow that automatically converts your WordPress articles into engaging audio summaries using OpenAI and Eleven Labs APIs. Amy can now save hours each week by instantly generating audio content that enhances accessibility and user engagement on her blog.
This approach improves content reach and caters perfectly to auditory learners, podcast fans, and busy visitors on the go. Next steps might include automating social media alerts about new audio posts or integrating multiple voice languages for diverse audience needs.
Keep exploring n8n automation possibilities to make your content work smarter, not harder!