Article Writer – Telegram to WordPress Automation Workflow (N8N)

Mark Avatar

Telegram Article Writer Bot → WordPress

An n8n workflow that generates SEO-optimized articles using DeepSeek AI and posts them directly to your WordPress site via Telegram.

What It Does

  1. Send /development, /wordpress, /squarespace, or /automation to your Telegram bot
  2. Get 4 unique, AI-generated article title suggestions
  3. Reply with your choice (e.g., automation 2)
  4. DeepSeek writes a complete 800-1200 word article based on that exact title
  5. Article is automatically posted to WordPress as a draft in the correct category
  6. Receive a Telegram confirmation with a direct link to edit in WordPress

Features

  • Smart title generation — 4 fresh, unique titles every time using rotating angle sets (how-to, case study, comparison, tips, etc.)
  • Year-free titles — No outdated “in 2024” suffixes
  • Exact title matching — The article written matches the title you picked, not a generic alternative
  • Automatic WordPress categorization — Looks up your category by name and assigns it correctly
  • Execution deduplication — Prevents overlapping requests from posting stale articles
  • HTML formatting — Articles use proper <h2>, <h3>, <p>, <ul>, <li>, and <strong> tags
  • SEO-optimized content — Includes meta descriptions, focus keywords, short paragraphs, and natural keyword usage

Prerequisites

You’ll need:

  • n8n (self-hosted or cloud)
  • Telegram Bot (create via @BotFather)
  • DeepSeek API key (get from platform.deepseek.com)
  • WordPress site with REST API enabled (WordPress 4.7+)
  • WordPress Application Password (Settings → Users → Your Profile → Application Passwords)

Setup Instructions

1. Import the Workflow

  1. Download workflow-v9-final.json
  2. In n8n, go to WorkflowsImport from File
  3. Select the downloaded file

2. Configure Credentials

You’ll need to set up 3 credentials:

A. Telegram Bot Token

  1. In n8n, go to CredentialsNew Credential
  2. Search for “Telegram”
  3. Paste your bot token from BotFather
  4. Save
  5. Open the Telegram Trigger node and select this credential

B. DeepSeek API

  1. In n8n, go to CredentialsNew Credential
  2. Search for “DeepSeek”
  3. Paste your API key from DeepSeek
  4. Save
  5. Open both DeepSeek Titles Model and DeepSeek Article Model nodes
  6. Select this credential in both

C. WordPress Basic Auth

  1. In WordPress Admin, go to UsersYour Profile
  2. Scroll to Application Passwords
  3. Create a new password (name it “n8n Bot”)
  4. Copy the generated password
  5. In n8n, go to CredentialsNew Credential
  6. Search for “HTTP Basic Auth”
  7. Username: your WordPress admin username
  8. Password: the application password you just created
  9. Save
  10. Open both Get WP Category ID and Post to WordPress nodes
  11. Select this credential in both

3. Create WordPress Categories

Make sure these categories exist in your WordPress site:

  • development
  • wordpress
  • squarespace
  • automation

If they don’t exist:

  1. Go to PostsCategories in WordPress
  2. Create each category (use lowercase names exactly as shown above)

4. Activate the Workflow

  1. Click Active toggle in the top-right corner of n8n
  2. Save the workflow

💬 How to Use

Get article titles:

/development
/wordpress
/squarespace
/automation

You’ll receive 4 title suggestions. Each /command generates fresh, unique titles.

Choose a title:

automation 1
wordpress 3
development 2
squarespace 4

Replace the taxonomy and number with your choice. The bot will:

  • Send a “Writing…” confirmation message
  • Generate a full article (takes 1-2 minutes)
  • Post it to WordPress as a draft
  • Send you a confirmation with the article title, category, post ID, and edit link

Customization

Add More Categories

  1. Create the category in WordPress first
  2. Open the Detect Message Type (Switch) node
  3. In the first rule (“Slash Command”), add a new condition: leftValue: {{ $json.message_text.toLowerCase().trim() }}rightValue: /yourcategoryoperator: equals
  4. In the second rule (“Title Selection”), add 4 new conditions: yourcategory 1yourcategory 2yourcategory 3yourcategory 4
  5. Save

Change Draft to Auto-Publish

  1. Open the Post to WordPress node
  2. Find "status": "draft"
  3. Change to "status": "publish"
  4. Save

Adjust Article Length

  1. Open the DeepSeek Article Model node
  2. Change maxTokens (default: 4000)
    • Lower = shorter articles (e.g., 2000 for ~500 words)
    • Higher = longer articles (e.g., 6000 for ~1500 words)
  3. Save

Adjust Title Creativity

  1. Open the DeepSeek Titles Model node
  2. Change temperature (default: 1.2)
    • Lower (0.7-1.0) = more conservative, predictable titles
    • Higher (1.2-1.5) = more creative, varied titles
  3. Save

Troubleshooting

“chat_id is empty” error

  • Make sure you’re sending the message to the bot directly in Telegram (not in a group)
  • Check that the Telegram Trigger credential is set

Titles keep showing “===META===” text

  • This should be cleaned automatically now
  • If it persists, open Format Titles Message node and verify the regex is present

Wrong category assigned

  • Verify the category name in WordPress matches exactly (lowercase)
  • The workflow searches for categories by name
  • If no match is found, it defaults to category ID 1 (Uncategorized)

Execution stuck / no response

  • Check n8n execution logs for errors
  • The workflow has a 5-minute lock per user to prevent duplicates
  • If an execution errors, the lock auto-expires after 5 minutes

Article title doesn’t match what I chose

  • This was fixed in v9 — make sure you’re using the latest version
  • The workflow now stores titles in static data and retrieves the exact one you picked

“This node is not currently installed” error (DeepSeek nodes)

  • Make sure you have the LangChain package installed in n8n
  • Self-hosted: Update to n8n version 1.0+ which includes LangChain nodes
  • Cloud: Should work automatically

Workflow Architecture

Telegram Trigger
    ↓
Extract Message Info (Set)
    ↓
Detect Message Type (Switch)
    ├─→ Slash Command → Build Titles Prompt → DeepSeek → Format & Send
    ├─→ Title Selection → Parse → Build Article Prompt → DeepSeek → Parse → WordPress → Confirm
    └─→ Invalid Input → Send Error

Key architectural principle:
- Telegram nodes are ALWAYS dead-ends (they don't pass data forward)
- Data flows only through Set/Code/HTTP nodes
- Send Writing Notice runs in parallel, not in series

How It Works Internally

Title Generation Flow

  1. Build Titles Prompt injects the current date and a rotating set of 4 angles
  2. DeepSeek Titles Model generates titles at temperature 1.2 for variety
  3. Format Titles Message parses the 4 titles and saves them to n8n static data keyed by your chat_id
  4. Send Titles to User displays them in Telegram (dead-end)

Article Generation Flow

  1. Parse Selection checks for execution lock (prevents duplicates) and validates input
  2. Build Article Prompt retrieves the exact chosen title from static data and embeds it in the prompt
  3. DeepSeek Article Model writes the article with _meta fields containing chat_id and taxonomy
  4. Parse Article Output extracts the article JSON and the metadata from inside it
  5. Get WP Category ID searches WordPress for the category by taxonomy name
  6. Prepare WP Post Data assembles the final payload
  7. Post to WordPress creates the draft post via REST API
  8. Build Final Message releases the execution lock and formats the confirmation
  9. Send Final Confirmation sends the success message (dead-end)

Why It’s Built This Way

  • Metadata smuggling: chat_id and taxonomy are embedded in AI prompts and extracted from responses because chainLlm nodes wipe all input fields
  • Static data for titles: Allows the chosen title to survive across nodes and executions
  • Execution locks: Prevents overlapping executions from the same user posting stale articles
  • Parallel Telegram notifications: “Writing…” message fires immediately while article generation runs

Credits

Built using:

📄 License

This workflow is provided as-is for personal and commercial use. Feel free to modify, share, and improve it.

🤝 Contributing

Found a bug or have an improvement? Open an issue or submit a pull request!


Version: v9
Last Updated: February 2026
Compatibility: n8n 1.0+, WordPress 4.7+, DeepSeek API

Enjoying this article?

Subscribe to get new posts delivered straight to your inbox. No spam, unsubscribe anytime.

No spam. Unsubscribe anytime.

You may also like

See All Posts →