Skip to content
Development

n8n Article Automation with AI and a Keyword List

Learn how to automate article creation using the n8n tool and artificial intelligence.

n8n Article Automation with AI and a Keyword List

At VitaminaWeb, we use automation to optimize critical processes, such as creating and publishing content. One of the workflows implemented with the n8n tool integrates different services and tools to turn keywords into SEO-optimized articles, which are automatically published on our blog.

Here is a detailed explanation of how this workflow works technically:


1. Automatic Scheduling

The workflow starts with a scheduled trigger in n8n, set to run daily at 8 a.m. This configuration ensures the process starts without manual intervention, maintaining consistency.

Tool used: Schedule Trigger


2. Keyword Lookup

The second step connects the workflow to VitaminaWeb's MySQL database. A query searches for a keyword marked as "pending" in the keyword management table. If no keyword is available, the workflow ends.

Tool used: MySQL Node


3. Recent Reference Lookup

If a keyword is found, another node in the workflow looks up recently published blog posts, again using the MySQL database. A random link is retrieved to include at the end of the article, strengthening the connections between published content.


4. AI-Powered Content Generation

With the keyword and reference link in hand, the workflow uses its OpenAI integration to generate a complete article. The prompt provided to the AI defines the structure of the text, which includes:

  • A title optimized for the keyword.
  • An introduction and body.
  • A meta description.
  • A conclusion with internal links.

Tool used: OpenAI Node


5. Custom Image Generation

After the text is created, the workflow generates an image that fits the article's context using the DALL-E integration. The image-generation prompt is dynamic and based on the article's content.

Tool used: OpenAI Node (DALL-E)


6. Upload and Publication

The generated image is downloaded and uploaded to WordPress as media, while the article text is saved as a draft. Tools such as Yoast SEO are used to optimize metadata, including titles and descriptions.

Technical steps:

  1. Upload the image via the WordPress API.
  2. Update the post with metadata, including the featured image.
  3. Publish the article as a draft or directly to the blog, depending on the configuration.

Tool used: HTTP Request Node to interact with the WordPress API.


7. Email Notification

The workflow ends by sending the team a notification with information about the newly published content, including its title and access link.

Tool used: SendInBlue Node


8. Database Status Update

To maintain control, the status of the keyword used is updated to "created," along with the ID of the post generated in WordPress.


Results

This workflow eliminates manual tasks, reduces errors, and boosts productivity. It also promotes consistency and content quality, ensuring that every article follows SEO best practices.

If you’re also looking for greater efficiency in content creation, automation is the way to go. Want to know how we implement solutions like this? Let’s talk!

Read also: n8n and Systems Integration: Empowering Marketing and Technology