n8n + AI: The Automation Stack I Use to Run My Business
I run multiple online businesses (e-commerce, digital products, SaaS) and I automate almost everything with n8n + AI. Here's my exact stack and the workflows that save me 20+ hours per week.
Why n8n Over Zapier/Make
- Self-hosted: Runs on my VPS, no per-execution pricing
- Code nodes: When visual flows aren't enough, write JavaScript
- AI integrations: Native LangChain nodes, HTTP requests to any AI API
- Free: Community edition handles everything I need
My Top 5 Workflows
1. Daily AI Social Media Posts
Trigger: Schedule (every day at 15:00)
Flow:
Schedule → Select Product → Gemini AI (generate tweet) → Format → Twitter API → Telegram Notify
The AI rotates through my 19 products, generating unique tweets that reference trending topics. No two tweets are the same.
Key node: The Code node selects a product based on day-of-year modulo, excluding recently posted products:
const dayOfYear = Math.floor(
(Date.now() - new Date(new Date().getFullYear(),0,0)) / 86400000
);
const productIndex = dayOfYear % products.length;
return products[productIndex];
2. Customer Lead Processing
Trigger: Webhook (product page contact form)
Flow:
Webhook → Validate → Google Sheets (log) → Telegram Notify → Email Response
Every lead from my product pages gets logged, I get notified on Telegram within seconds, and the customer gets an automated response.
3. GitHub Trending → Product Correlation
Trigger: Schedule (daily at 16:00)
Flow:
Schedule → Read GitHub Trending Data → Match to Products → Gemini AI (trend tweet) → Twitter → Telegram
This workflow reads trending GitHub repositories, matches them to my products by category, and generates tweets connecting the trend to a relevant product.
4. Weekly Blog Generator
Trigger: Schedule (Fridays at 10:00)
Flow:
Schedule → Select Topic → Gemini AI (generate article) → Format Markdown → Deploy to Site → Telegram
AI generates SEO-optimized blog posts that link to my products. Each post is 1500-2000 words with code examples.
5. Newsletter Subscriber Management
Trigger: Webhook (newsletter signup form)
Flow:
Webhook → Validate Email → Save to Database → Send Welcome → Telegram Notify
Simple but critical. Every newsletter subscriber is validated, saved, and I get notified.
The AI Integration Pattern
My most common pattern for AI-powered workflows:
Trigger → Prepare Context → AI API Call → Parse Response → Action → Notify
The "Prepare Context" step is crucial. Instead of sending raw data to the AI, I build a structured prompt:
// Code node: Build AI prompt
const product = $input.first().json;
const prompt = `Write a compelling tweet about ${product.name}.
Product: ${product.name}
Price: $${product.price}
Description: ${product.description}
Target audience: ${product.tags.join(', ')}
Requirements:
- Max 250 characters (leave room for link)
- Include one key benefit
- Natural, not salesy
- Add 3-5 relevant hashtags
Return ONLY the tweet text.`;
return [{json: {prompt}}];
Then the HTTP Request node sends to Gemini API:
// URL: https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent
// Body:
{
"contents": [{
"parts": [{"text": "{{ $json.prompt }}"}]
}]
}
Cost Breakdown
| Service | Monthly Cost |
|---|---|
| VPS (n8n + all apps) | $12 |
| Gemini API | Free tier (sufficient) |
| Twitter API | Free tier |
| Google Sheets | Free |
| Total | ~$12/month |
Compare to Zapier ($50-100/month for similar volume) or hiring a VA ($500+/month).
Getting Started
I've packaged my workflow templates and setup guides:
- n8n Workflow Pack ($99/$299): 15+ production workflows with documentation - BilgeStore n8n Workflows
- Blog post: Step-by-step n8n + AI guide - Read here
Tips for n8n + AI Beginners
- Start with the HTTP Request node. Don't overcomplicate with LangChain nodes initially.
- Always add error handling. AI APIs fail. Have fallback responses.
- Log everything. Google Sheets is free and searchable.
- Test with manual triggers before switching to schedules.
- Keep prompts in Code nodes, not inline. Easier to debug and iterate.
What automations are you running? I'd love to hear about your n8n setups in the comments.
Top comments (0)