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
- Send
/development,/wordpress,/squarespace, or/automationto your Telegram bot - Get 4 unique, AI-generated article title suggestions
- Reply with your choice (e.g.,
automation 2) - DeepSeek writes a complete 800-1200 word article based on that exact title
- Article is automatically posted to WordPress as a draft in the correct category
- 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
- Download
workflow-v9-final.json - In n8n, go to Workflows → Import from File
- Select the downloaded file
2. Configure Credentials
You’ll need to set up 3 credentials:
A. Telegram Bot Token
- In n8n, go to Credentials → New Credential
- Search for “Telegram”
- Paste your bot token from BotFather
- Save
- Open the Telegram Trigger node and select this credential
B. DeepSeek API
- In n8n, go to Credentials → New Credential
- Search for “DeepSeek”
- Paste your API key from DeepSeek
- Save
- Open both DeepSeek Titles Model and DeepSeek Article Model nodes
- Select this credential in both
C. WordPress Basic Auth
- In WordPress Admin, go to Users → Your Profile
- Scroll to Application Passwords
- Create a new password (name it “n8n Bot”)
- Copy the generated password
- In n8n, go to Credentials → New Credential
- Search for “HTTP Basic Auth”
- Username: your WordPress admin username
- Password: the application password you just created
- Save
- Open both Get WP Category ID and Post to WordPress nodes
- Select this credential in both
3. Create WordPress Categories
Make sure these categories exist in your WordPress site:
developmentwordpresssquarespaceautomation
If they don’t exist:
- Go to Posts → Categories in WordPress
- Create each category (use lowercase names exactly as shown above)
4. Activate the Workflow
- Click Active toggle in the top-right corner of n8n
- 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
- Create the category in WordPress first
- Open the Detect Message Type (Switch) node
- In the first rule (“Slash Command”), add a new condition:
leftValue: {{ $json.message_text.toLowerCase().trim() }}rightValue: /yourcategoryoperator: equals - In the second rule (“Title Selection”), add 4 new conditions:
yourcategory 1yourcategory 2yourcategory 3yourcategory 4 - Save
Change Draft to Auto-Publish
- Open the Post to WordPress node
- Find
"status": "draft" - Change to
"status": "publish" - Save
Adjust Article Length
- Open the DeepSeek Article Model node
- Change
maxTokens(default: 4000)- Lower = shorter articles (e.g., 2000 for ~500 words)
- Higher = longer articles (e.g., 6000 for ~1500 words)
- Save
Adjust Title Creativity
- Open the DeepSeek Titles Model node
- Change
temperature(default: 1.2)- Lower (0.7-1.0) = more conservative, predictable titles
- Higher (1.2-1.5) = more creative, varied titles
- 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
- Build Titles Prompt injects the current date and a rotating set of 4 angles
- DeepSeek Titles Model generates titles at temperature 1.2 for variety
- Format Titles Message parses the 4 titles and saves them to n8n static data keyed by your chat_id
- Send Titles to User displays them in Telegram (dead-end)
Article Generation Flow
- Parse Selection checks for execution lock (prevents duplicates) and validates input
- Build Article Prompt retrieves the exact chosen title from static data and embeds it in the prompt
- DeepSeek Article Model writes the article with
_metafields containing chat_id and taxonomy - Parse Article Output extracts the article JSON and the metadata from inside it
- Get WP Category ID searches WordPress for the category by taxonomy name
- Prepare WP Post Data assembles the final payload
- Post to WordPress creates the draft post via REST API
- Build Final Message releases the execution lock and formats the confirmation
- 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
chainLlmnodes 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:
- n8n — Workflow automation
- DeepSeek — AI text generation
- WordPress REST API — Content management
📄 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



