Abstract Background
n8n-workflows
May 20, 2026
5 min read

Building an n8n Workflow for Content Automation

How to automate your social media posting and blog publishing using n8n and a few open APIs.

Manual content distribution takes time. You write a blog post, log into your content management system to publish it, and then open social media platforms to share the link. n8n allows you to link these actions together. This post explains how to build a workflow that automatically takes draft content, publishes it to a blog, and sends out corresponding social media updates.

Prerequisites

You need a working instance of n8n. You can run this locally using Docker or use the hosted cloud version. You also need API access to your chosen blog platform and your social media accounts. You will need to generate API keys or set up OAuth credentials for each service before building the workflow.

Step 1: Configuring the Trigger

Every workflow needs a starting point. For content automation, a webhook is a reliable trigger. You configure a webhook node in n8n to listen for incoming HTTP requests. When you finish writing a post in your text editor or Notion database, you can send a JSON payload containing the title, body, and tags to this webhook URL.

A standard payload might look like this:

JSON
{
  "title": "My New Blog Post",
  "content": "This is the full text of the article.",
  "summary": "Check out my latest thoughts on workflow automation.",
  "tags": ["automation", "n8n", "productivity"]
}

Step 2: Processing the Data

Once n8n receives the payload, the data requires formatting. Different platforms require distinct text structures. You can use a Code node to write a short JavaScript snippet to route the content. One path prepares the full text and HTML tags for the blog. The other path takes the summary field to prepare the social media updates.

Step 3: Publishing the Blog Post

Next, add a node for your blog platform. n8n provides a dedicated node for WordPress. You map the formatted text to the content field and the title to the title field. You set the node operation to create a post and set the status to Published. The output of this node returns the live URL of your new blog post.

Step 4: Distributing to Social Media

You take the live URL generated from the previous step and pass it to your social media nodes. You can connect a LinkedIn node and an X node in parallel. These nodes take the short summary you created earlier, attach the live link from the blog node, and post the final text to your timelines.

Conclusion

Testing is important before running this workflow in a production environment. You should send test payloads and verify the formatting on each platform by setting the initial outputs to draft mode. Once configured correctly, this automation handles the repetitive tasks of content distribution.