What This Workflow Does
This workflow checks a WordPress blog homepage for new posts, gets each post’s title and content, and then posts that content automatically to Medium. It saves hours of manual copying and stops mistakes like missing images or links.
The workflow fetches the blog page, finds post titles and links, loads each post’s full content, extracts key parts like the title and introduction, and publishes these as new posts on Medium.
Tools and Services Used
- WordPress Blog URL: Public blog page for fetching posts.
- n8n Automation Platform: Runs the workflow with various nodes like HTTP Request, HTML extractors, and Medium node.
- Medium API: Posts content directly to Medium using API credentials.
Input → Process → Output Explained
Input
- The blog homepage URL, for example, https://mailsafi.com/blog/
- Medium API credentials set up inside n8n for posting.
Processing Steps
- Fetch the main blog page HTML.
- Extract all post titles and their links using CSS selectors.
- Split the list to get individual posts.
- Limit the number of posts to process at once.
- Loop over each post URL one by one.
- Fetch the full HTML content of each post.
- Extract detailed parts: post title, intro paragraph, and full content in HTML.
- Create a new Medium post with this data, including tags and public status.
Output
New Medium posts appear matching the WordPress blog posts, published automatically.
Who Should Use This Workflow
This workflow fits users who want to share WordPress blog posts on Medium without manually copying content.
Good for people who publish regularly and want to save time or avoid manual errors.
Beginner Step-by-Step: How to Use This Workflow in Production
Importing the Workflow
- Click the Download button on this page to save the workflow file.
- Inside the n8n editor, choose “Import from File” and select the downloaded workflow.
Setup Credentials and Settings
- Go to the Medium node and add your Medium API Key as credentials.
- Update any IDs, emails, or URLs if needed, especially the WordPress blog homepage URL.
- Check any code or expressions for URLs or paths and update as per your blog if needed.
Testing and Activating
- Run the workflow manually to test that posts get extracted and published correctly.
- Look at the output and logs for errors or missing content.
- If all looks good, activate the workflow to run either manually or add a Cron trigger for regular scheduling.
For anyone hosting n8n themselves, see self-host n8n for helpful setup resources.
Customizations and Enhancements
- You can add a Cron trigger to run this workflow regularly without manual start.
- Filter posts by date if you want to process only recent posts.
- Modify Medium tags in the Medium node to match your topic better.
- Use additional CSS selectors to extract images or author info for richer posts.
Troubleshooting Common Issues
- If the HTML extraction does not return content, check and update CSS selectors in the HTML nodes.
- Medium publishing may fail if API credentials are wrong or expired; refresh credentials in n8n.
- If too many posts slow down or timeout the workflow, limit batch size or add delays.
Pre-Production Checklist
- Make sure the WordPress blog page is publicly reachable.
- Verify the CSS selectors match the current blog HTML.
- Test Medium API credentials with a manual post.
- Run the workflow with a few posts first to confirm success.
Deployment
After testing, activate the workflow in n8n.
Add a Cron trigger node if you want the posts to be published regularly or automatically.
Watch the workflow runs and logs to spot any issues early.
Summary of Benefits and Outcome
✓ Saves many hours of manual work.
✓ Stops errors like missing images or broken links.
✓ Automatically posts WordPress blog content to Medium.
→ You get fresh Medium posts each time new WordPress posts appear.
