📱 Social Media Content Generator
🎯 Mục tiêu bài học
Sau bài học này, bạn sẽ:
✅ Xây dựng multi-platform content generator
✅ Tạo platform-specific templates cho Twitter, LinkedIn, Facebook, Instagram
✅ Build content calendar automation với scheduling
✅ Implement A/B testing và engagement tracking
Một topic, multiple platforms. Build workflow tạo content phù hợp cho từng platform tự động.
🔍 Multi-Platform Strategy
Checkpoint
Mỗi platform yêu cầu style content khác nhau như thế nào?
📋 Platform-Specific Templates
1// Code node: Platform configurations2const platforms = {3 twitter: {4 maxLength: 280,5 style: "concise, punchy, use hashtags",6 format: "Short statement or question. Include 2-3 hashtags. Add emoji.",7 example: "Just discovered how AI can automate 80% of email tasks... in 5 minutes. Thread below. #AI #Automation #n8n"8 },9 linkedin: {10 maxLength: 3000,11 style: "professional, thought-leadership, storytelling",12 format: "Hook line, story/insight, key takeaway, CTA, hashtags",13 example: "I spent 3 hours on emails yesterday. Today? 15 minutes.\n\nHere is what changed..."14 },15 facebook: {16 maxLength: 2000, 17 style: "conversational, engaging, community-focused",18 format: "Relatable opener, value content, question for engagement",19 example: "Anyone else drowning in emails? I found a solution that changed everything..."20 },21 instagram: {22 maxLength: 2200,23 style: "visual, inspirational, emoji-rich",24 format: "Catchy first line, value points, CTA, 20-30 hashtags in comment",25 example: "Stop wasting time on repetitive tasks. Start automating with AI."26 }27};2829return Object.entries(platforms).map(([name, config]) => ({30 json: { platform: name, ...config, topic: $json.topic, content: $json.sourceContent }31}));Checkpoint
Twitter và LinkedIn có những khác biệt gì về format và style?
⚡ Content Generation Workflow
1// OpenAI prompt (inside Loop node)2const generatePrompt = `3Create a ${$json.platform} post about: "${$json.topic}"45Platform rules:6- Max length: ${$json.maxLength} characters7- Style: ${$json.style}8- Format: ${$json.format}910Source content for reference:11${$json.content}1213Requirements:141. Optimized for ${$json.platform} algorithm152. Include clear CTA163. Engaging first line (hook)174. Natural, not robotic1819Return JSON:20{21 "post": "the post content",22 "hashtags": ["tag1", "tag2"],23 "bestTimeToPost": "suggested posting time",24 "imagePrompt": "DALL-E prompt for accompanying image"25}`;Checkpoint
AI prompt cho content generation bao gồm những yếu tố nào?
📊 Content Calendar Automation
1// Code node: Generate posting schedule2const posts = $input.all();3const schedule = [];45const postingTimes = {6 twitter: ["09:00", "12:30", "17:00"],7 linkedin: ["08:00", "12:00"],8 facebook: ["10:00", "15:00", "19:00"],9 instagram: ["11:00", "14:00", "18:00"]10};1112posts.forEach(post => {13 const platform = post.json.platform;14 const times = postingTimes[platform];15 const time = times[0]; // First optimal time16 17 schedule.push({18 platform,19 content: post.json.post,20 scheduledTime: time,21 hashtags: post.json.hashtags,22 status: "scheduled"23 });24});2526return schedule.map(s => ({ json: s }));Checkpoint
Thời gian posting tối ưu cho mỗi platform là gì?
🧠 A/B Testing Content
1// Generate 2 variations per platform2const abPrompt = `3Create 2 different versions of a ${$json.platform} post about "${$json.topic}".45Version A: ${$json.approachA || "direct, benefit-focused"}6Version B: ${$json.approachB || "storytelling, problem-solution"}78Return JSON:9{10 "versionA": { "post": "...", "hook": "..." },11 "versionB": { "post": "...", "hook": "..." }12}`;Checkpoint
A/B testing giúp ích gì cho social media content strategy?
📈 Engagement Tracking
1// Webhook: Receive engagement data2// Track which AI-generated posts perform best3const engagement = {4 postId: $json.postId,5 platform: $json.platform,6 likes: $json.likes,7 comments: $json.comments,8 shares: $json.shares,9 engagementRate: ($json.likes + $json.comments + $json.shares) / $json.impressions10};1112// Save to Google Sheets for analysis13return engagement;- Hook: Dòng đầu tiên quan trọng nhất - 80% người chỉ đọc dòng đầu
- Platform-native: Mỗi platform có culture riêng, đừng copy-paste
- Hashtags: LinkedIn 3-5, Instagram 20-30, Twitter 2-3
- CTA: Luôn có call-to-action rõ ràng
Checkpoint
Engagement rate được tính như thế nào?
📝 Bài Tập Thực Hành
- Build multi-platform generator từ 1 blog post
- Create content calendar automation với scheduling
- Implement A/B testing cho post variations
- Track engagement metrics qua Google Sheets
Checkpoint
Bạn đã hoàn thành multi-platform generator chưa? Platform nào hiệu quả nhất?
🚀 Bài tiếp theo
Translation Workflows — Xây dựng hệ thống dịch đa ngôn ngữ tự động với AI.
