Your cart is currently empty!
How to Publish Blog Posts to Medium, Dev.to, and Ghost with n8n: A Practical Automation Guide
How to Publish Blog Posts to Medium, Dev.to, and Ghost with n8n: A Practical Automation Guide
Are you tired of manually posting your blog content across multiple platforms? 🚀 Automating the publishing process saves time, reduces errors, and ensures timely content distribution. In this article, we’ll explore exactly how to publish blog posts to Medium, Dev.to, and Ghost with n8n, a powerful open-source workflow automation tool. Marketing teams, content creators, and automation engineers will learn step-by-step how to build reliable, scalable workflows that integrate Gmail, Google Sheets, Slack, HubSpot, and more.
We will walk through end-to-end automation workflows—from triggering on new content creation to posting on your favorite blogging platforms. Additionally, you’ll gain insights on troubleshooting, security best practices, and workflow scaling. Whether you’re a startup CTO or an operations specialist, this guide will empower you to streamline your marketing content pipelines.
Understanding the Need for Blog Post Automation
Publishing blog posts across different platforms can be time-consuming and error-prone. Marketing teams want to maintain consistent messaging and frequency without manual overhead. Technical automation helps solve these challenges by:
- Automatically publishing content from centralized repositories like Google Sheets or CMS systems.
- Notifying team members on Slack about new posts and status updates.
- Connecting lead generation platforms like HubSpot with content publishing to align marketing funnels.
- Ensuring standardized post formatting and metadata.
n8n is an ideal tool for this workflow automation due to its open-source nature, flexible node ecosystem, and ability to connect with over 200 services. Compared to alternatives like Make or Zapier, n8n provides greater customization and control over processes.
Let’s dive into the components of building a robust n8n automation for publishing blogs across Medium, Dev.to, and Ghost.
Workflows Overview: From Blog Content to Multi-Platform Publishing
The automation pipeline typically follows this sequence:
- Trigger: New blog post creation event, e.g. a new row in Google Sheets, a new draft email in Gmail, or a webhook call.
- Data Transformation: Formatting the blog content, converting markdown, or enriching metadata.
- Platform Publishing: Calling APIs of Medium, Dev.to, and Ghost to create new posts.
- Notifications: Informing the marketing team on Slack and/or updating CRM records in HubSpot.
- Logging & Error Handling: Capturing success and failure data, retrying failed posts, and alerting.
This structure ensures a reliable, scalable, and transparent content distribution system across all channels.
Integrating Key Tools and Services
The following services form the backbone of our automation workflow:
- Gmail: To monitor new draft blog posts or receive content submissions.
- Google Sheets: Acts as a content repository or editorial calendar.
- Slack: Used for team alerts about publishing status.
- HubSpot: Synchronizes content actions with marketing campaigns.
- Medium API: For posting content to Medium publications.
- Dev.to API: Publishes blog content to Dev.to profiles.
- Ghost Admin API: Creates new posts on Ghost-powered blogs.
n8n orchestrates these integrations using dedicated nodes and HTTP Request nodes for APIs without pre-built integrations.
Step-by-Step Guide to Building the Automation Workflow
Step 1: Trigger Workflow on New Content Submission 🔔
Choose a trigger based on your content source. For example, if using Google Sheets as an editorial calendar:
- Use the Google Sheets Trigger node configured to activate when a new row (blog post draft) is added.
- Map the columns such as Title, Content (Markdown), Tags, and Status.
Example Google Sheets Trigger configuration:
{
"sheetId": "your-sheet-id",
"watchColumn": "Status",
"watchValue": "Ready to Publish"
}
This ensures the workflow only triggers when a post is marked ready.
Step 2: Format Blog Content and Metadata
Next, use the Function node in n8n to parse and clean content, such as converting markdown to HTML (required by some APIs) or sanitizing text.
items[0].json['content_html'] = require('marked')(items[0].json['content_markdown']);
return items;
Replace marked with your preferred markdown parser installed in n8n.
Step 3: Publish to Medium with Medium API Node
Configure the HTTP Request node for Medium publishing (n8n does not have a native Medium node). Key settings include:
- Method: POST
- URL:
https://api.medium.com/v1/users/{{userId}}/posts - Headers: Authorization Bearer token from your Medium Integration
- Body (JSON): title, contentFormat (‘html’), content, tags, publishStatus (‘public’ or ‘draft’)
Example body JSON:
{
"title": "{{ $json.title }}",
"contentFormat": "html",
"content": "{{ $json.content_html }}",
"tags": {{ $json.tags_array }},
"publishStatus": "public"
}
Step 4: Publish to Dev.to via Dev.to API 📝
Dev.to requires an API token with write access. Configure another HTTP Request node:
- Method: POST
- URL:
https://dev.to/api/articles - Headers:
api-key: YOUR_DEVTO_API_KEY, Content-Type: application/json - Body includes title, published (true/false), body_markdown, tags, and canonical_url if needed.
{
"article": {
"title": "{{ $json.title }}",
"body_markdown": "{{ $json.content_markdown }}",
"published": true,
"tags": {{ $json.tags_array }}
}
}
Step 5: Publish to Ghost Blog via Ghost Admin API
Ghost API requires a JWT token generated with Admin API key. Use an HTTP Request node with:
- Method: POST
- URL:
https://your-ghost-blog.com/ghost/api/v3/admin/posts/ - Headers: Authorization Bearer JWT token, Content-Type application/json
- Body: title, html content, tags, status (‘published’)
{
"posts": [
{
"title": "{{ $json.title }}",
"html": "{{ $json.content_html }}",
"status": "published",
"tags": {{ $json.tags_array }}
}
]
}
Step 6: Notify Team on Slack
Use the Slack node configured with a webhook to send a message:
Message example:
New blog post "{{ $json.title }}" has been published successfully to Medium, Dev.to, and Ghost! 🎉
This increases visibility and reduces delays.
Step 7: Update CRM Records on HubSpot (Optional)
You can add a HubSpot node or HTTP Request to create/update contacts or deals related to the blog post campaign, maintaining marketing funnel sync.
Handling Common Errors and Ensuring Robustness
Error Handling Strategies
- Retries: Implement retry mechanisms with incremental backoff on HTTP Request nodes to handle rate limits or transient errors.
- Idempotency: Store unique identifiers or post IDs in Google Sheets or database to avoid duplicate posts.
- Logging: Use n8n’s built-in execution logs and external logging services (e.g., ELK stack) for traceability.
Addressing Rate Limits and API Quotas
Medium and Dev.to enforce API call limits. To scale, introduce queuing mechanisms or batch posts, and monitor API usage regularly.
Security Considerations 🔒
- Never expose API keys in public workflows. Store credentials securely in n8n’s credential manager.
- Use least privilege OAuth scopes for all integrations.
- Mask sensitive data in logs and notifications.
- Comply with GDPR and other regulations regarding content and PII in blog posts.
Testing and Monitoring Your Automation Workflow
- Use sandbox or staging environments in Medium or Ghost to avoid publishing test content publicly.
- Leverage n8n’s manual execution and debug modes to inspect node data and error messages.
- Set up alerts for workflow failures via email or Slack.
Scaling and Adapting the Workflow
When your marketing volume grows, consider:
- Using n8n’s webhook trigger over polling nodes for lower latency and resource efficiency.
- Modularizing workflows by separating content ingestion, transformation, and publishing phases.
- Implementing concurrency controls and queue nodes to manage API rate limits effectively.
- Version control your workflows and credentials for audit and rollback capabilities.
Automation enables your marketing team to focus on creative tasks while n8n handles the repetitive publishing. If you’re ready to jumpstart your content pipeline, explore the Automation Template Marketplace for ready-made workflows that you can customize instantly.
Comparison Tables
Automation Platforms: n8n vs Make vs Zapier
| Platform | Cost | Pros | Cons |
|---|---|---|---|
| n8n | Free self-hosted; Paid cloud plans start at $20/month | Open source, highly customizable, many nodes, self-host option | Requires setup and some technical knowledge |
| Make (Integromat) | Free tier; Paid plans from $9/month | Visual scenario builder, wide app support, great for non-devs | Limited customization for complex logic |
| Zapier | Free limited tier; Paid plans from $19.99/month | Very user-friendly, thousands of app integrations, reliable | Pricing can be expensive, less flexible for complex workflows |
Webhook vs Polling Trigger Approaches
| Method | Latency | Resource Usage | Reliability |
|---|---|---|---|
| Webhook | Near real-time | Low – event-driven | High if external service supports webhook |
| Polling | Delayed — depends on interval | Higher – repeated requests | Moderate, risk of missed data |
Google Sheets vs Database for Content Storage
| Storage Type | Cost | Ease of Use | Scalability | Security |
|---|---|---|---|---|
| Google Sheets | Free (limits apply) | Very easy, non-technical | Limited with large data sets | Basic Google account security |
| Database (SQL/NoSQL) | Variable; hosting costs | Requires technical setup | Highly scalable | Advanced security controls possible |
If you’re ready to implement these workflows with minimal setup, consider creating your free RestFlow account to start building and deploying your own automations today.
Frequently Asked Questions about Publishing Blog Posts with n8n
What is the primary benefit of using n8n to publish blog posts to Medium, Dev.to, and Ghost?
Using n8n automates the blog publishing process, saving time and reducing errors by enabling organizations to publish simultaneously across multiple platforms with centralized content management and notifications.
Which services can n8n integrate with for marketing automation workflows?
n8n integrates with Gmail, Google Sheets, Slack, HubSpot, and various blogging platform APIs like Medium, Dev.to, and Ghost, allowing end-to-end marketing content automation.
How do I manage API rate limits and errors in n8n workflows?
Implement retry and backoff strategies on HTTP Request nodes, use idempotency tokens to prevent duplicates, monitor logs for failures, and scale workflows with throttling or queuing to handle rate limits effectively.
Is it safe to store API credentials in n8n for these integrations?
Yes, n8n’s credential manager securely stores API keys and tokens with encrypted storage and restricts access to workflow nodes, but always follow best practices like using least privilege tokens and never exposing keys publicly.
Can I customize the blog content formatting and metadata in the automation?
Absolutely. Using Function nodes and data transformation steps in n8n, you can customize markdown-to-HTML conversion, amend tags, add canonical URLs, and set publishing statuses before distribution.
Conclusion: Transform Your Blog Publishing with Automation
Publishing blog content seamlessly to Medium, Dev.to, and Ghost via n8n automation transforms your marketing productivity. By integrating tools such as Gmail, Google Sheets, Slack, and HubSpot, you build a resilient, scalable system that ensures consistent content distribution with minimal manual effort.
Start with simple triggers and gradually add intelligence through error handling, security measures, and scaling techniques. Unlock the full potential of automation by leveraging pre-built workflow templates and user-friendly automation platforms.
Take the next step today and revolutionize your content pipeline.