Mi flujo de trabajo 2
Este es unMarket Research, AI Summarizationflujo de automatización del dominio deautomatización que contiene 12 nodos.Utiliza principalmente nodos como Code, ScheduleTrigger, ScrapegraphAi. Herramienta de monitoreo de contenido de influencers de Instagram con análisis y seguimiento de ROI utilizando ScrapeGraphAI
- •No hay requisitos previos especiales, puede importar y usarlo directamente
Nodos utilizados (12)
{
"id": "VhEwspDqzu7ssFVE",
"meta": {
"instanceId": "f4b0efaa33080e7774e0d9285c40c7abcd2c6f7cf1a8b901fa7106170dd4cda3",
"templateCredsSetupCompleted": true
},
"name": "My workflow 2",
"tags": [
{
"id": "DxXGubfBzRKh6L8T",
"name": "Revenue Optimization",
"createdAt": "2025-07-25T16:24:30.370Z",
"updatedAt": "2025-07-25T16:24:30.370Z"
},
{
"id": "IxkcJ2IpYIxivoHV",
"name": "Content Strategy",
"createdAt": "2025-07-25T12:57:37.677Z",
"updatedAt": "2025-07-25T12:57:37.677Z"
},
{
"id": "PAKIJ2Mm9EvRcR3u",
"name": "Trend Monitoring",
"createdAt": "2025-07-25T12:57:37.670Z",
"updatedAt": "2025-07-25T12:57:37.670Z"
},
{
"id": "YtfXmaZk44MYedPO",
"name": "Dynamic Pricing",
"createdAt": "2025-07-25T16:24:30.369Z",
"updatedAt": "2025-07-25T16:24:30.369Z"
},
{
"id": "wJ30mjhtrposO8Qt",
"name": "Simple RAG",
"createdAt": "2025-07-28T12:55:14.424Z",
"updatedAt": "2025-07-28T12:55:14.424Z"
}
],
"nodes": [
{
"id": "78600a1a-24f3-4383-a46c-cfedfdb8dc5d",
"name": "Activador de Programación Diaria",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
-768,
128
],
"parameters": {
"rule": {
"interval": [
{
"field": "cronExpression",
"expression": "0 9 * * *"
}
]
}
},
"typeVersion": 1.2
},
{
"id": "3cbdaef1-0878-4dac-8bb1-c5d075d68b79",
"name": "ScrapeGraphAI - Perfiles de Influencers",
"type": "n8n-nodes-scrapegraphai.scrapegraphAi",
"position": [
-400,
288
],
"parameters": {
"userPrompt": "Extract influencer profile data and recent posts. Use this schema: { \"profile\": { \"username\": \"@influencer\", \"followers\": \"100K\", \"following\": \"500\", \"posts_count\": \"1,234\", \"bio\": \"Lifestyle blogger\", \"verified\": true }, \"recent_posts\": [{ \"post_url\": \"https://instagram.com/p/...\", \"caption\": \"Post caption text\", \"likes\": \"5,000\", \"comments\": \"150\", \"date\": \"2024-01-15\", \"hashtags\": [\"#lifestyle\", \"#brand\"], \"mentions\": [\"@brandname\"] }] }",
"websiteUrl": "https://www.instagram.com/{{ $json.influencer_username }}"
},
"typeVersion": 1
},
{
"id": "1554c1d6-cd26-4cfe-8272-ac02d9041701",
"name": "Analizador de Contenido",
"type": "n8n-nodes-base.code",
"position": [
-64,
240
],
"parameters": {
"jsCode": "// Content Analyzer - Analyzes post content for engagement and quality\nconst inputData = $input.all()[0].json;\nconst profile = inputData.result.profile || {};\nconst posts = inputData.result.recent_posts || [];\n\nfunction analyzeContent(posts) {\n return posts.map(post => {\n const likes = parseInt(post.likes?.replace(/[^0-9]/g, '') || '0');\n const comments = parseInt(post.comments?.replace(/[^0-9]/g, '') || '0');\n const engagementRate = likes > 0 ? ((likes + comments) / likes * 100).toFixed(2) : 0;\n \n // Content quality scoring based on caption length, hashtags, mentions\n const captionScore = post.caption ? Math.min(post.caption.length / 100, 10) : 0;\n const hashtagScore = post.hashtags ? Math.min(post.hashtags.length * 2, 10) : 0;\n const mentionScore = post.mentions ? post.mentions.length * 5 : 0;\n const qualityScore = (captionScore + hashtagScore + mentionScore) / 3;\n \n return {\n ...post,\n engagement_rate: `${engagementRate}%`,\n content_quality_score: qualityScore.toFixed(1),\n performance_tier: engagementRate > 5 ? 'High' : engagementRate > 2 ? 'Medium' : 'Low'\n };\n });\n}\n\nconst analyzedPosts = analyzeContent(posts);\nconst avgEngagement = analyzedPosts.length > 0 ? \n (analyzedPosts.reduce((sum, post) => sum + parseFloat(post.engagement_rate), 0) / analyzedPosts.length).toFixed(2) : 0;\n\nreturn [{\n json: {\n profile,\n analyzed_posts: analyzedPosts,\n analytics: {\n total_posts: posts.length,\n average_engagement: `${avgEngagement}%`,\n high_performing_posts: analyzedPosts.filter(p => p.performance_tier === 'High').length,\n analysis_date: new Date().toISOString()\n }\n }\n}];"
},
"typeVersion": 2
},
{
"id": "e006e58a-fd2d-4b93-a8c7-51d0e490fb6f",
"name": "Detector de Menciones de Marca",
"type": "n8n-nodes-base.code",
"position": [
288,
256
],
"parameters": {
"jsCode": "// Brand Mention Detector - Identifies brand mentions and sponsored content\nconst inputData = $input.all()[0].json;\nconst posts = inputData.analyzed_posts || [];\nconst profile = inputData.profile || {};\n\n// Define brand keywords to monitor\nconst brandKeywords = [\n 'nike', 'adidas', 'coca-cola', 'pepsi', 'apple', 'samsung',\n 'sponsored', '#ad', '#sponsored', '#partnership', '#collab'\n];\n\nfunction detectBrandMentions(posts) {\n return posts.map(post => {\n const caption = (post.caption || '').toLowerCase();\n const hashtags = (post.hashtags || []).map(tag => tag.toLowerCase());\n const mentions = post.mentions || [];\n \n // Detect brand mentions in caption\n const brandMentionsInCaption = brandKeywords.filter(brand => \n caption.includes(brand.toLowerCase())\n );\n \n // Detect sponsored content indicators\n const sponsoredIndicators = ['#ad', '#sponsored', '#partnership', '#collab'];\n const isSponsored = sponsoredIndicators.some(indicator => \n caption.includes(indicator) || hashtags.includes(indicator)\n );\n \n // Extract mentioned brands from @ mentions\n const mentionedBrands = mentions.filter(mention => \n brandKeywords.some(brand => mention.toLowerCase().includes(brand))\n );\n \n return {\n ...post,\n brand_mentions: brandMentionsInCaption,\n mentioned_brands: mentionedBrands,\n is_sponsored_content: isSponsored,\n brand_mention_count: brandMentionsInCaption.length + mentionedBrands.length\n };\n });\n}\n\nconst postsWithBrands = detectBrandMentions(posts);\nconst sponsoredPosts = postsWithBrands.filter(post => post.is_sponsored_content);\nconst totalBrandMentions = postsWithBrands.reduce((sum, post) => sum + post.brand_mention_count, 0);\n\nreturn [{\n json: {\n profile,\n analyzed_posts: postsWithBrands,\n brand_analytics: {\n total_brand_mentions: totalBrandMentions,\n sponsored_posts_count: sponsoredPosts.length,\n sponsored_content_ratio: posts.length > 0 ? (sponsoredPosts.length / posts.length * 100).toFixed(1) + '%' : '0%',\n top_mentioned_brands: [...new Set(postsWithBrands.flatMap(post => post.brand_mentions))],\n detection_date: new Date().toISOString()\n }\n }\n}];"
},
"typeVersion": 2
},
{
"id": "307a73f8-1c13-407b-971b-59b7de61bd59",
"name": "Rastreador de Rendimiento de Campaña",
"type": "n8n-nodes-base.code",
"position": [
640,
240
],
"parameters": {
"jsCode": "// Campaign Performance Tracker - Tracks campaign metrics and KPIs\nconst inputData = $input.all()[0].json;\nconst posts = inputData.analyzed_posts || [];\nconst profile = inputData.profile || {};\nconst brandAnalytics = inputData.brand_analytics || {};\n\nfunction trackCampaignPerformance(posts, profile) {\n const sponsoredPosts = posts.filter(post => post.is_sponsored_content);\n \n // Calculate campaign metrics\n const totalReach = parseInt(profile.followers?.replace(/[^0-9]/g, '') || '0');\n const totalEngagement = posts.reduce((sum, post) => {\n const likes = parseInt(post.likes?.replace(/[^0-9]/g, '') || '0');\n const comments = parseInt(post.comments?.replace(/[^0-9]/g, '') || '0');\n return sum + likes + comments;\n }, 0);\n \n const sponsoredEngagement = sponsoredPosts.reduce((sum, post) => {\n const likes = parseInt(post.likes?.replace(/[^0-9]/g, '') || '0');\n const comments = parseInt(post.comments?.replace(/[^0-9]/g, '') || '0');\n return sum + likes + comments;\n }, 0);\n \n // Performance metrics\n const avgEngagementPerPost = posts.length > 0 ? (totalEngagement / posts.length).toFixed(0) : 0;\n const sponsoredAvgEngagement = sponsoredPosts.length > 0 ? (sponsoredEngagement / sponsoredPosts.length).toFixed(0) : 0;\n const engagementRate = totalReach > 0 ? (totalEngagement / totalReach * 100).toFixed(2) : 0;\n \n // Campaign performance score (0-100)\n const performanceScore = Math.min(\n (parseFloat(engagementRate) * 10) + \n (sponsoredPosts.length * 5) + \n (brandAnalytics.total_brand_mentions * 2), \n 100\n ).toFixed(1);\n \n return {\n campaign_metrics: {\n total_posts: posts.length,\n sponsored_posts: sponsoredPosts.length,\n total_reach: totalReach.toLocaleString(),\n total_engagement: totalEngagement.toLocaleString(),\n avg_engagement_per_post: avgEngagementPerPost,\n sponsored_avg_engagement: sponsoredAvgEngagement,\n overall_engagement_rate: `${engagementRate}%`,\n campaign_performance_score: performanceScore\n },\n top_performing_campaigns: sponsoredPosts\n .sort((a, b) => parseInt(b.likes) - parseInt(a.likes))\n .slice(0, 3)\n .map(post => ({\n post_url: post.post_url,\n brand_mentions: post.brand_mentions,\n engagement: `${post.likes} likes, ${post.comments} comments`,\n performance_tier: post.performance_tier\n }))\n };\n}\n\nconst campaignData = trackCampaignPerformance(posts, profile);\n\nreturn [{\n json: {\n profile,\n analyzed_posts: posts,\n brand_analytics: brandAnalytics,\n ...campaignData,\n tracking_date: new Date().toISOString()\n }\n}];"
},
"typeVersion": 2
},
{
"id": "20dd7a96-c6cb-4924-ba7e-2a8d7f0f1b99",
"name": "Calculadora de ROI de Marketing",
"type": "n8n-nodes-base.code",
"position": [
976,
208
],
"parameters": {
"jsCode": "// Marketing ROI Calculator - Calculates return on investment for campaigns\nconst inputData = $input.all()[0].json;\nconst campaignMetrics = inputData.campaign_metrics || {};\nconst profile = inputData.profile || {};\nconst sponsoredPosts = inputData.analyzed_posts?.filter(post => post.is_sponsored_content) || [];\n\n// Estimated costs and values (these would typically come from your campaign data)\nconst estimatedCosts = {\n cost_per_sponsored_post: 500, // Average cost per sponsored post\n campaign_management_cost: 200, // Monthly management cost\n content_creation_cost: 100 // Per post content creation\n};\n\nfunction calculateROI(metrics, posts, costs) {\n // Calculate total investment\n const totalSponsoredPosts = parseInt(metrics.sponsored_posts || 0);\n const contentCosts = totalSponsoredPosts * costs.cost_per_sponsored_post;\n const managementCosts = costs.campaign_management_cost;\n const creationCosts = totalSponsoredPosts * costs.content_creation_cost;\n const totalInvestment = contentCosts + managementCosts + creationCosts;\n \n // Calculate estimated value/return\n const totalEngagement = parseInt(metrics.total_engagement?.replace(/[^0-9]/g, '') || '0');\n const reach = parseInt(metrics.total_reach?.replace(/[^0-9]/g, '') || '0');\n \n // Estimated value calculations\n const valuePerEngagement = 0.05; // $0.05 per engagement\n const valuePerReach = 0.001; // $0.001 per reach\n const engagementValue = totalEngagement * valuePerEngagement;\n const reachValue = reach * valuePerReach;\n const totalEstimatedValue = engagementValue + reachValue;\n \n // ROI calculation\n const roi = totalInvestment > 0 ? ((totalEstimatedValue - totalInvestment) / totalInvestment * 100).toFixed(1) : 0;\n const costPerEngagement = totalEngagement > 0 ? (totalInvestment / totalEngagement).toFixed(2) : 0;\n const costPerReach = reach > 0 ? (totalInvestment / reach * 1000).toFixed(2) : 0; // CPM\n \n return {\n roi_analysis: {\n total_investment: `$${totalInvestment.toLocaleString()}`,\n estimated_value: `$${totalEstimatedValue.toLocaleString()}`,\n roi_percentage: `${roi}%`,\n cost_per_engagement: `$${costPerEngagement}`,\n cost_per_thousand_reach: `$${costPerReach}`,\n investment_efficiency: roi > 0 ? 'Positive' : 'Needs Optimization',\n payback_period: roi > 0 ? 'Immediate' : 'Extended'\n },\n cost_breakdown: {\n sponsored_content_costs: `$${contentCosts.toLocaleString()}`,\n campaign_management_costs: `$${managementCosts.toLocaleString()}`,\n content_creation_costs: `$${creationCosts.toLocaleString()}`,\n total_costs: `$${totalInvestment.toLocaleString()}`\n },\n recommendations: [\n roi > 50 ? \"Excellent ROI - Scale up campaigns\" : \n roi > 0 ? \"Positive ROI - Continue with optimizations\" : \n \"Negative ROI - Review targeting and content strategy\",\n totalSponsoredPosts > 0 ? `Focus on top-performing content types` : \"Increase sponsored content volume\",\n parseFloat(costPerEngagement) > 1 ? \"Optimize for lower cost per engagement\" : \"Good cost efficiency\"\n ]\n };\n}\n\nconst roiData = calculateROI(campaignMetrics, sponsoredPosts, estimatedCosts);\n\n// Create final report\nconst finalReport = {\n influencer_profile: {\n username: profile.username,\n followers: profile.followers,\n verification_status: profile.verified ? 'Verified' : 'Not Verified'\n },\n campaign_summary: campaignMetrics,\n ...roiData,\n report_generated: new Date().toISOString(),\n next_review_date: new Date(Date.now() + 7 * 24 * 60 * 60 * 1000).toISOString() // 7 days from now\n};\n\nreturn [{\n json: finalReport\n}];"
},
"typeVersion": 2
},
{
"id": "29cc090f-82f1-4160-bbdf-72175bdcea72",
"name": "Información del Activador",
"type": "n8n-nodes-base.stickyNote",
"position": [
-880,
-336
],
"parameters": {
"color": 4,
"width": 350,
"height": 784,
"content": "# Step 1: Daily Schedule Trigger ⏰\n\nAutomatically runs the workflow every day at 9:00 AM to monitor influencer campaigns.\n\n## Configuration Options\n- **Frequency**: Daily at 9:00 AM\n- **Timezone**: UTC (adjust as needed)\n- **Weekends**: Included (can be modified)\n\n## Use Cases\n- Daily campaign monitoring\n- Regular performance tracking\n- Automated reporting schedule"
},
"typeVersion": 1
},
{
"id": "a1b3ad21-861e-4005-bee2-235853c1ddb5",
"name": "Información del Scraper",
"type": "n8n-nodes-base.stickyNote",
"position": [
-528,
-336
],
"parameters": {
"color": 5,
"width": 350,
"height": 784,
"content": "# Step 2: ScrapeGraphAI - Influencer Profiles 🤖\n\nScrapes influencer social media profiles to extract key data and recent posts.\n\n## What it extracts\n- Profile statistics (followers, posts)\n- Recent post content and engagement\n- Bio information and verification status\n- Post captions, hashtags, and mentions\n\n## Supported Platforms\n- Instagram profiles\n- TikTok accounts\n- YouTube channels"
},
"typeVersion": 1
},
{
"id": "ebeea18f-631c-42ee-bdf4-a377fa7a93e8",
"name": "Información del Analizador",
"type": "n8n-nodes-base.stickyNote",
"position": [
-176,
-336
],
"parameters": {
"color": 6,
"width": 350,
"height": 784,
"content": "# Step 3: Content Analyzer 📊\n\nAnalyzes scraped content for engagement metrics and quality scoring.\n\n## Analysis Features\n- **Engagement Rate**: Likes + comments ratio\n- **Content Quality Score**: Based on caption, hashtags\n- **Performance Tiers**: High/Medium/Low classification\n- **Average Metrics**: Across all posts\n\n## Output\n- Detailed post analytics\n- Performance benchmarks\n- Content recommendations"
},
"typeVersion": 1
},
{
"id": "012494c9-de52-4dbb-b083-63e8944ffc09",
"name": "Información del Detector de Marca",
"type": "n8n-nodes-base.stickyNote",
"position": [
176,
-336
],
"parameters": {
"color": 7,
"width": 350,
"height": 784,
"content": "# Step 4: Brand Mention Detector 🏷️\n\nIdentifies brand mentions and sponsored content across influencer posts.\n\n## Detection Capabilities\n- **Brand Keywords**: Nike, Adidas, Apple, etc.\n- **Sponsored Indicators**: #ad, #sponsored, #partnership\n- **@ Mentions**: Brand account mentions\n- **Hashtag Analysis**: Brand-related tags\n\n## Metrics Tracked\n- Total brand mentions\n- Sponsored content ratio\n- Top mentioned brands"
},
"typeVersion": 1
},
{
"id": "850a0774-631b-42a6-95cd-67d970ac3f54",
"name": "Información del Rastreador de Rendimiento",
"type": "n8n-nodes-base.stickyNote",
"position": [
528,
-336
],
"parameters": {
"width": 350,
"height": 784,
"content": "# Step 5: Campaign Performance Tracker 📈\n\nTracks and analyzes overall campaign performance metrics.\n\n## Key Metrics\n- **Reach**: Total follower count\n- **Engagement**: Total likes + comments\n- **Campaign Score**: 0-100 performance rating\n- **Top Campaigns**: Best performing sponsored posts\n\n## Performance Analysis\n- Sponsored vs organic content comparison\n- Engagement rate calculations\n- Campaign effectiveness scoring"
},
"typeVersion": 1
},
{
"id": "cd8888cf-691a-43ae-8642-6b405d91b6ab",
"name": "Información de la Calculadora de ROI",
"type": "n8n-nodes-base.stickyNote",
"position": [
880,
-336
],
"parameters": {
"color": 2,
"width": 350,
"height": 784,
"content": "# Step 6: Marketing ROI Calculator 💰\n\nCalculates return on investment for influencer marketing campaigns.\n\n## ROI Calculations\n- **Total Investment**: Content + management + creation costs\n- **Estimated Value**: Based on engagement and reach\n- **ROI Percentage**: (Value - Investment) / Investment\n- **Cost Efficiency**: Cost per engagement/reach\n\n## Business Intelligence\n- Investment recommendations\n- Performance optimization suggestions\n- Campaign scaling insights"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "99ba7a8d-2728-4a46-a766-a6aa6abf738c",
"connections": {
"1554c1d6-cd26-4cfe-8272-ac02d9041701": {
"main": [
[
{
"node": "e006e58a-fd2d-4b93-a8c7-51d0e490fb6f",
"type": "main",
"index": 0
}
]
]
},
"e006e58a-fd2d-4b93-a8c7-51d0e490fb6f": {
"main": [
[
{
"node": "307a73f8-1c13-407b-971b-59b7de61bd59",
"type": "main",
"index": 0
}
]
]
},
"78600a1a-24f3-4383-a46c-cfedfdb8dc5d": {
"main": [
[
{
"node": "3cbdaef1-0878-4dac-8bb1-c5d075d68b79",
"type": "main",
"index": 0
}
]
]
},
"307a73f8-1c13-407b-971b-59b7de61bd59": {
"main": [
[
{
"node": "20dd7a96-c6cb-4924-ba7e-2a8d7f0f1b99",
"type": "main",
"index": 0
}
]
]
},
"3cbdaef1-0878-4dac-8bb1-c5d075d68b79": {
"main": [
[
{
"node": "1554c1d6-cd26-4cfe-8272-ac02d9041701",
"type": "main",
"index": 0
}
]
]
}
}
}¿Cómo usar este flujo de trabajo?
Copie el código de configuración JSON de arriba, cree un nuevo flujo de trabajo en su instancia de n8n y seleccione "Importar desde JSON", pegue la configuración y luego modifique la configuración de credenciales según sea necesario.
¿En qué escenarios es adecuado este flujo de trabajo?
Intermedio - Investigación de mercado, Resumen de IA
¿Es de pago?
Este flujo de trabajo es completamente gratuito, puede importarlo y usarlo directamente. Sin embargo, tenga en cuenta que los servicios de terceros utilizados en el flujo de trabajo (como la API de OpenAI) pueden requerir un pago por su cuenta.
Flujos de trabajo relacionados recomendados
vinci-king-01
@vinci-king-01Compartir este flujo de trabajo