Automating Article Creation from Slack to Dev.to with n8n + AI
Let’s start with a case study.
I received this challenge from an Upwork job posting, and I decided to learn by actually building it.
The workflow is simple but powerful:
- Take prompts from Slack (#prompt channel)
- Run them through an AI model
- Generate article text
- Send to Slack for review, if approved →
- Publish the article to Dev.to
Step 1: Create the Workflow
First, create a new workflow and add your first step.
Choose On App Event and select the Slack trigger.
Step 2: Set Up Slack Credentials
You’ll need two things:
- Access Token
- Signature Secret
Go to the Slack App Dashboard and:
- Create a new app → From Scratch
- Name it (e.g.
n8n Trigger
) and select your workspace - Fill your Slack credentials back in the Slack Trigger node
Get Access Token
Add scope so that n8n can access Slack:
Install the Bot User OAuth Token in your workspace and grant access to the required channel:
Get Signature Secret
Enable Event Subscriptions and add the n8n Webhook URL to the request URL:
Finally, choose the channel and add your app:
Step 3: Test the First Node
Once configured, you’ll see your first node ready:
Test it to ensure Slack messages are being captured:
Step 4: Add AI Node
Next, let’s transform Slack prompts into articles.
- Add a Basic LLM Chain node
- Create your article prompt
- Use Slack message as the article topic
- Connect it with your AI model (I used Groq in this case)
Step 5: Slack Approval Flow
Add a Slack Action Node to send the AI output for approval.
Fill the parameters like this:
In Slack, it will look like this:
Step 6: Add IF Node
To handle approval/rejection, add an IF Node:
Set the condition:
Step 7: Prepare Dev.to API
To publish on Dev.to, use their REST API:
Endpoint:
https://dev.to/api/articles
Request Sample:
{
"article": {
"title": "string",
"body_markdown": "string",
"published": false,
"series": "string",
"main_image": "string",
"canonical_url": "string",
"description": "string",
"tags": "string",
"organization_id": 0
}
}
Before sending, fix the JSON payload using an Edit Fields (Set) Node:
Step 8: Publish to Dev.to
Finally, add an HTTP Request Node to send the article to Dev.to.
- Go to Dev.to Settings → Extensions
- Generate a new API Key
- Add the key in your HTTP Request headers
Final Thoughts
🎉 That’s it! You’ve now built a fully automated pipeline that:
- Captures prompts from Slack
- Generates articles with AI
- Routes them for approval
- Publishes directly to Dev.to
Top comments (0)