498 lines
32 KiB
Markdown
498 lines
32 KiB
Markdown
|
|
{
|
|||
|
|
"nodes": [
|
|||
|
|
{
|
|||
|
|
"parameters": {
|
|||
|
|
"websiteUrl": "https://usaleaks.com/",
|
|||
|
|
"userPrompt": "提取页面上列出的每项管道服务的以下信息: - 服务名称 (例如:疏通排水管、管道维修) - 服务描述 - 供应商名称 (管道公司名称) - 供应商评级 (如果可用) - 价格范围 (如果可用) - 联系方式 (电话号码、电子邮件) 以对象数组的 JSON 格式返回数据。"
|
|||
|
|
},
|
|||
|
|
"id": "9e945482-63c5-44fc-9fd2-2c9ae9061753",
|
|||
|
|
"name": "ScrapeGraphAI - Plumbing",
|
|||
|
|
"type": "n8n-nodes-scrapegraphai.scrapegraphAi",
|
|||
|
|
"position": [
|
|||
|
|
160,
|
|||
|
|
320
|
|||
|
|
],
|
|||
|
|
"typeVersion": 1,
|
|||
|
|
"credentials": {
|
|||
|
|
"scrapegraphAIApi": {
|
|||
|
|
"id": "Kvx2Kq3gdZLUbK9m",
|
|||
|
|
"name": "ScrapegraphAI account"
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"parameters": {
|
|||
|
|
"websiteUrl": "1",
|
|||
|
|
"userPrompt": "1"
|
|||
|
|
},
|
|||
|
|
"id": "e2dc86c2-058c-4bb2-b132-f485f7c10d9f",
|
|||
|
|
"name": "ScrapeGraphAI - Electrical",
|
|||
|
|
"type": "n8n-nodes-scrapegraphai.scrapegraphAi",
|
|||
|
|
"position": [
|
|||
|
|
160,
|
|||
|
|
480
|
|||
|
|
],
|
|||
|
|
"typeVersion": 1,
|
|||
|
|
"credentials": {
|
|||
|
|
"scrapegraphAIApi": {
|
|||
|
|
"id": "Kvx2Kq3gdZLUbK9m",
|
|||
|
|
"name": "ScrapegraphAI account"
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"parameters": {
|
|||
|
|
"websiteUrl": "1",
|
|||
|
|
"userPrompt": "1"
|
|||
|
|
},
|
|||
|
|
"id": "3fb81319-243e-4996-a46e-53d5e466a571",
|
|||
|
|
"name": "ScrapeGraphAI - HVAC",
|
|||
|
|
"type": "n8n-nodes-scrapegraphai.scrapegraphAi",
|
|||
|
|
"position": [
|
|||
|
|
160,
|
|||
|
|
640
|
|||
|
|
],
|
|||
|
|
"typeVersion": 1,
|
|||
|
|
"credentials": {
|
|||
|
|
"scrapegraphAIApi": {
|
|||
|
|
"id": "Kvx2Kq3gdZLUbK9m",
|
|||
|
|
"name": "ScrapegraphAI account"
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"parameters": {
|
|||
|
|
"jsCode": "// Cost Analyzer - Process and analyze maintenance costs\nconst allInputs = $input.all();\nconst currentDate = new Date().toISOString().split('T')[0];\nconst analysisResults = [];\n\n// Process each service category\nallInputs.forEach((input, index) => {\n const serviceData = input.json;\n let services = [];\n \n // Extract services from different possible structures\n if (serviceData.result && serviceData.result.services) {\n services = serviceData.result.services;\n } else if (serviceData.result && Array.isArray(serviceData.result)) {\n services = serviceData.result;\n } else if (Array.isArray(serviceData)) {\n services = serviceData;\n }\n \n // Determine service category based on input index\n const categories = ['Plumbing', 'Electrical', 'HVAC'];\n const category = categories[index] || 'General';\n \n services.forEach(service => {\n if (service && service.service_name) {\n // Parse price range to get average cost\n let averageCost = 0;\n let minCost = 0;\n let maxCost = 0;\n \n if (service.price_range) {\n const priceMatch = service.price_range.match(/\\$(\\d+)[-–](\\d+)/);\n if (priceMatch) {\n minCost = parseInt(priceMatch[1]);\n maxCost = parseInt(priceMatch[2]);\n averageCost = (minCost + maxCost) / 2;\n } else {\n const singlePrice = service.price_range.match(/\\$(\\d+)/);\n if (singlePrice) {\n averageCost = parseInt(singlePrice[1]);\n minCost = maxCost = averageCost;\n }\n }\n }\n \n // Determine cost level\n let costLevel = 'Medium';\n if (averageCost < 200) costLevel = 'Low';\n else if (averageCost > 500) costLevel = 'High';\n \n analysisResults.push({\n date_analyzed: currentDate,\n category: category,\n service_name: service.service_name || 'Unknown Service',\n provider_name: service.provider_name || 'Unknown Provider',\n price_range: service.price_range || 'Price not available',\n average_cost: averageCost,\n min_cost: minCost,\n max_cost: maxCost,\n cost_level: costLevel,\n rating: service.rating || 'No rating',\n location: service.location || 'Location not specified',\n phone: service.phone || 'No phone',\n description: service.description || 'No description',\n provider_url: service.provider_url || '#',\n urgency_score: category === 'Plumbing' ? 8 : category === 'Electrical' ? 9 : 6\n });\n }\n });\n});\n\nconsole.log(`Analyzed ${analysisResults.length} services across categories`);\n\nreturn analysisResults.map(result => ({ json: result }));"
|
|||
|
|
},
|
|||
|
|
"id": "55397331-cffb-4e77-b0b0-6ea3d978fa41",
|
|||
|
|
"name": "Cost Analyzer",
|
|||
|
|
"type": "n8n-nodes-base.code",
|
|||
|
|
"position": [
|
|||
|
|
560,
|
|||
|
|
240
|
|||
|
|
],
|
|||
|
|
"notesInFlow": true,
|
|||
|
|
"typeVersion": 2,
|
|||
|
|
"notes": "Analyzes costs and\ncategorizes services\nby price level"
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"parameters": {
|
|||
|
|
"jsCode": "// Service Comparer - Compare services and find best options\nconst services = $input.all().map(item => item.json);\nconst comparisonResults = [];\nconst serviceGroups = {};\n\n// Group services by category and service name\nservices.forEach(service => {\n const key = `${service.category}_${service.service_name}`;\n if (!serviceGroups[key]) {\n serviceGroups[key] = [];\n }\n serviceGroups[key].push(service);\n});\n\n// Compare services within each group\nObject.keys(serviceGroups).forEach(groupKey => {\n const group = serviceGroups[groupKey];\n if (group.length > 1) {\n // Sort by rating and cost\n const sortedByRating = [...group].sort((a, b) => {\n const ratingA = parseFloat(a.rating) || 0;\n const ratingB = parseFloat(b.rating) || 0;\n return ratingB - ratingA;\n });\n \n const sortedByCost = [...group].sort((a, b) => a.average_cost - b.average_cost);\n \n const bestRated = sortedByRating[0];\n const cheapest = sortedByCost[0];\n const mostExpensive = sortedByCost[sortedByCost.length - 1];\n \n // Calculate price variance\n const costs = group.map(s => s.average_cost).filter(c => c > 0);\n const avgGroupCost = costs.length > 0 ? costs.reduce((a, b) => a + b, 0) / costs.length : 0;\n const priceVariance = costs.length > 1 ? Math.max(...costs) - Math.min(...costs) : 0;\n \n comparisonResults.push({\n service_category: group[0].category,\n service_name: group[0].service_name,\n provider_count: group.length,\n average_market_price: Math.round(avgGroupCost),\n price_variance: priceVariance,\n best_rated_provider: {\n name: bestRated.provider_name,\n rating: bestRated.rating,\n price: bestRated.price_range,\n phone: bestRated.phone\n },\n cheapest_provider: {\n name: cheapest.provider_name,\n rating: cheapest.rating,\n price: cheapest.price_range,\n phone: cheapest.phone\n },\n most_expensive_provider: {\n name: mostExpensive.provider_name,\n rating: mostExpensive.rating,\n price: mostExpensive.price_range,\n phone: mostExpensive.phone\n },\n recommendation: bestRated.provider_name === cheapest.provider_name ? \n 'Best Value (High Rating + Low Cost)' : \n parseFloat(bestRated.rating) > 4.5 ? 'Quality Focus' : 'Cost Focus',\n all_providers: group\n });\n } else {\n // Single provider for this service\n const service = group[0];\n comparisonResults.push({\n service_category: service.category,\n service_name: service.service_name,\n provider_count: 1,\n average_market_price: service.average_cost,\n price_variance: 0,\n single_provider: {\n name: service.provider_name,\n rating: service.rating,\n price: service.price_range,\n phone: service.phone\n },\n recommendation: 'Single Option Available',\n all_providers: [service]\n });\n }\n});\n\nconsole.log(`Created comparisons for ${comparisonResults.length} service types`);\n\nreturn comparisonResults.map(result => ({ json: result }));"
|
|||
|
|
},
|
|||
|
|
"id": "d2d167a7-d2e8-4f1f-a1d4-891786933808",
|
|||
|
|
"name": "Service Comparer",
|
|||
|
|
"type": "n8n-nodes-base.code",
|
|||
|
|
"position": [
|
|||
|
|
864,
|
|||
|
|
240
|
|||
|
|
],
|
|||
|
|
"notesInFlow": true,
|
|||
|
|
"typeVersion": 2,
|
|||
|
|
"notes": "Compares providers\nand finds best\noptions by rating\nand cost"
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"parameters": {
|
|||
|
|
"jsCode": "// Budget Planner - Create maintenance budget and scheduling recommendations\nconst comparisons = $input.all().map(item => item.json);\nconst currentDate = new Date();\nconst currentMonth = currentDate.getMonth() + 1;\nconst currentYear = currentDate.getFullYear();\n\n// Define maintenance categories and typical frequencies\nconst maintenanceSchedule = {\n 'HVAC': { frequency: 'biannual', urgency: 'high', typical_cost: 400 },\n 'Plumbing': { frequency: 'annual', urgency: 'medium', typical_cost: 300 },\n 'Electrical': { frequency: 'biannual', urgency: 'high', typical_cost: 350 }\n};\n\n// Create budget recommendations\nconst budgetPlan = {\n planning_date: currentDate.toISOString().split('T')[0],\n budget_year: currentYear,\n quarterly_budgets: [],\n annual_summary: {\n total_estimated_cost: 0,\n high_priority_services: [],\n medium_priority_services: [],\n low_priority_services: []\n },\n service_recommendations: [],\n cost_optimization_tips: []\n};\n\n// Process each service comparison\ncomparisons.forEach(comparison => {\n const category = comparison.service_category;\n const schedule = maintenanceSchedule[category] || { frequency: 'annual', urgency: 'medium', typical_cost: 250 };\n \n // Determine priority based on service type and cost\n let priority = 'Medium';\n if (category === 'Electrical' || category === 'HVAC') priority = 'High';\n if (comparison.average_market_price > 500) priority = 'High';\n if (comparison.average_market_price < 200) priority = 'Low';\n \n const recommendation = {\n service: comparison.service_name,\n category: category,\n priority: priority,\n estimated_annual_cost: comparison.average_market_price,\n recommended_frequency: schedule.frequency,\n best_provider: comparison.best_rated_provider || comparison.single_provider,\n budget_provider: comparison.cheapest_provider || comparison.single_provider,\n next_service_month: schedule.frequency === 'biannual' ? \n [3, 9] : schedule.frequency === 'quarterly' ? [3, 6, 9, 12] : [6],\n cost_savings_potential: comparison.price_variance || 0\n };\n \n budgetPlan.service_recommendations.push(recommendation);\n budgetPlan.annual_summary.total_estimated_cost += comparison.average_market_price;\n \n // Categorize by priority\n if (priority === 'High') {\n budgetPlan.annual_summary.high_priority_services.push(recommendation);\n } else if (priority === 'Medium') {\n budgetPlan.annual_summary.medium_priority_services.push(recommendation);\n } else {\n budgetPlan.annual_summary.low_priority_services.push(recommendation);\n }\n});\n\n// Create quarterly budget breakdown\nfor (let quarter = 1; quarter <= 4; quarter++) {\n const quarterMonths = [(quarter - 1) * 3 + 1, (quarter - 1) * 3 + 2, (quarter - 1) * 3 + 3];\n let quarterBudget = 0;\n const quarterServices = [];\n \n budgetPlan.service_recommendations.forEach(rec => {\n rec.next_service_month.forEach(month => {\n if (quarterMonths.includes(month)) {\n quarterBudget += rec.estimated_annual_cost;\n quarterServices.push({\n service: rec.service,\n month: month,\n cost: rec.estimated_annual_cost,\n provider: rec.best_provider.name\n });\n }\n });\n });\n \n budgetPlan.quarterly_budgets.push({\n quarter: quarter,\n months: quarterMonths,\n total_budget: quarterBudget,\n services: quarterServices\n });\n}\n\n// Add cost optimization tips\nbudgetPlan.cost_optimization_tips = [\n 'Bundle multiple services with the same provider for discounts',\n 'Schedule preventive maintenance to avoid emergency repairs',\n 'Get multiple quotes for expensive services (>$500)',\n 'Consider seasonal pricing - HVAC services may be cheaper in off-season',\n 'Join service contracts for regular maintenance at reduced rates'\n];\n\n// Calculate budget metrics\nbudgetPlan.annual_summary.monthly_average = Math.round(budgetPlan.annual_summary.total_estimated_cost / 12);\nbudgetPlan.annual_summary.high_priority_cost = budgetPlan.annual_summary.
|
|||
|
|
},
|
|||
|
|
"id": "0644848a-4c2f-42b9-84ce-9c3e22cb47c8",
|
|||
|
|
"name": "Budget Planner",
|
|||
|
|
"type": "n8n-nodes-base.code",
|
|||
|
|
"position": [
|
|||
|
|
1168,
|
|||
|
|
240
|
|||
|
|
],
|
|||
|
|
"notesInFlow": true,
|
|||
|
|
"typeVersion": 2,
|
|||
|
|
"notes": "Creates annual\nbudget plan with\nquarterly breakdown\nand recommendations"
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"parameters": {
|
|||
|
|
"jsCode": "// Property Manager Alert - Format comprehensive maintenance report\nconst budgetData = $input.all()[0].json;\nconst currentDate = new Date().toLocaleDateString();\nconst currentTime = new Date().toLocaleTimeString();\n\n// Create formatted alert message\nfunction formatCurrency(amount) {\n return new Intl.NumberFormat('en-US', {\n style: 'currency',\n currency: 'USD',\n minimumFractionDigits: 0\n }).format(amount);\n}\n\nfunction createMaintenanceAlert() {\n const { annual_summary, quarterly_budgets, service_recommendations } = budgetData;\n \n let alertMessage = `🏠 **PROPERTY MAINTENANCE COST ANALYSIS**\\n`;\n alertMessage += `📅 Generated: ${currentDate} at ${currentTime}\\n\\n`;\n \n // Annual Summary\n alertMessage += `💰 **ANNUAL BUDGET SUMMARY**\\n`;\n alertMessage += `• Total Estimated Cost: ${formatCurrency(annual_summary.total_estimated_cost)}\\n`;\n alertMessage += `• Monthly Average: ${formatCurrency(annual_summary.monthly_average)}\\n`;\n alertMessage += `• Potential Savings: ${formatCurrency(annual_summary.potential_savings)}\\n\\n`;\n \n // Priority Breakdown\n alertMessage += `🚨 **SERVICE PRIORITIES**\\n`;\n alertMessage += `• High Priority: ${annual_summary.high_priority_services.length} services (${formatCurrency(annual_summary.high_priority_cost)})\\n`;\n alertMessage += `• Medium Priority: ${annual_summary.medium_priority_services.length} services\\n`;\n alertMessage += `• Low Priority: ${annual_summary.low_priority_services.length} services\\n\\n`;\n \n // Quarterly Breakdown\n alertMessage += `📊 **QUARTERLY BUDGET BREAKDOWN**\\n`;\n quarterly_budgets.forEach(quarter => {\n if (quarter.total_budget > 0) {\n alertMessage += `Q${quarter.quarter}: ${formatCurrency(quarter.total_budget)} (${quarter.services.length} services)\\n`;\n }\n });\n alertMessage += `\\n`;\n \n // Top Service Recommendations\n alertMessage += `🔧 **TOP SERVICE RECOMMENDATIONS**\\n`;\n const topServices = service_recommendations\n .filter(rec => rec.priority === 'High')\n .slice(0, 5);\n \n topServices.forEach((service, index) => {\n alertMessage += `${index + 1}. **${service.service}** (${service.category})\\n`;\n alertMessage += ` • Cost: ${formatCurrency(service.estimated_annual_cost)}\\n`;\n alertMessage += ` • Provider: ${service.best_provider.name}\\n`;\n alertMessage += ` • Rating: ${service.best_provider.rating}\\n`;\n alertMessage += ` • Phone: ${service.best_provider.phone}\\n\\n`;\n });\n \n // Cost Optimization Tips\n alertMessage += `💡 **COST OPTIMIZATION TIPS**\\n`;\n budgetData.cost_optimization_tips.slice(0, 3).forEach((tip, index) => {\n alertMessage += `${index + 1}. ${tip}\\n`;\n });\n \n alertMessage += `\\n━━━━━━━━━━━━━━━━━━━━━━\\n`;\n alertMessage += `📈 **Next Update**: Next week\\n`;\n alertMessage += `🔄 **Data Source**: Multiple contractor websites\\n`;\n \n return alertMessage;\n}\n\n// Create summary for property management system\nfunction createSystemSummary() {\n return {\n alert_type: 'maintenance_cost_analysis',\n severity: 'info',\n property_count: 1, // Adjust based on actual properties\n total_annual_budget: budgetData.annual_summary.total_estimated_cost,\n high_priority_count: budgetData.annual_summary.high_priority_services.length,\n next_quarter_budget: budgetData.quarterly_budgets[0]?.total_budget || 0,\n top_expense_category: budgetData.service_recommendations\n .reduce((max, current) => \n current.estimated_annual_cost > max.estimated_annual_cost ? current : max\n ).category,\n generated_at: new Date().toISOString(),\n recommendations_count: budgetData.service_recommendations.length\n };\n}\n\nconst alertMessage = createMaintenanceAlert();\nconst systemSummary = createSystemSummary();\n\nconsole.log(`Generated property manager alert with ${budgetData.service_recommendations.length} service recommendations`);\n\nreturn [\n {\n json: {\n m
|
|||
|
|
},
|
|||
|
|
"id": "d8323e18-6768-4606-b7ee-57d40ebf263a",
|
|||
|
|
"name": "Property Manager Alert",
|
|||
|
|
"type": "n8n-nodes-base.code",
|
|||
|
|
"position": [
|
|||
|
|
1456,
|
|||
|
|
240
|
|||
|
|
],
|
|||
|
|
"notesInFlow": true,
|
|||
|
|
"typeVersion": 2,
|
|||
|
|
"notes": "Formats comprehensive\nalert for property\nmanager with budget\nanalysis and recommendations"
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"parameters": {
|
|||
|
|
"content": "# 步骤 1: Weekly Schedule Trigger ⏰\n\n每周触发此 workflow,以更新维护成本数据。\n\n## 配置\n- 设置为每周运行(每7天)\n- 可根据需要自定义运行时间\n- 可更改为不同的运行间隔",
|
|||
|
|
"height": 1036,
|
|||
|
|
"width": 400,
|
|||
|
|
"color": 5
|
|||
|
|
},
|
|||
|
|
"id": "3e8f8b72-ece2-40d4-821e-843a41dca58a",
|
|||
|
|
"name": "Sticky Note - Trigger",
|
|||
|
|
"type": "n8n-nodes-base.stickyNote",
|
|||
|
|
"position": [
|
|||
|
|
-384,
|
|||
|
|
-224
|
|||
|
|
],
|
|||
|
|
"typeVersion": 1
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"parameters": {
|
|||
|
|
"content": "# 步骤 2: Multi-Source Scraping 🤖\n\n三个 ScrapeGraphAI 节点抓取不同承包商类别的数据:\n\n- **Plumbing Services**(管道服务):疏通排水管、管道维修等。\n- **Electrical Services**(电气服务):插座安装、布线等。\n- **HVAC Services**(暖通空调服务):AC 维修、供暖维护等。\n\n## 提取内容\n- 服务名称和描述\n- 供应商详情和评级\n- 价格范围和联系方式",
|
|||
|
|
"height": 1040,
|
|||
|
|
"width": 400,
|
|||
|
|
"color": 5
|
|||
|
|
},
|
|||
|
|
"id": "49ce1bdc-f7b9-4f3a-871c-4fc73cf8bff4",
|
|||
|
|
"name": "Sticky Note - Scraping",
|
|||
|
|
"type": "n8n-nodes-base.stickyNote",
|
|||
|
|
"position": [
|
|||
|
|
16,
|
|||
|
|
-224
|
|||
|
|
],
|
|||
|
|
"typeVersion": 1
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"parameters": {
|
|||
|
|
"content": "# 步骤 3: Cost Analysis & Comparison 📊\n\n**Cost Analyzer**:处理抓取的数据,计算平均成本、成本水平和紧急程度得分。\n\n**Service Comparer**:比较每个服务类别中的供应商,以找出:\n- 最佳评级供应商\n- 最具成本效益的选项\n- 价格差异分析\n\n## 输出\n- 分类成本分析\n- 供应商比较\n- 推荐逻辑",
|
|||
|
|
"height": 1040,
|
|||
|
|
"width": 400,
|
|||
|
|
"color": 5
|
|||
|
|
},
|
|||
|
|
"id": "00b370ca-7bc3-4e1c-8ae0-09ccb9c2d818",
|
|||
|
|
"name": "Sticky Note - Analysis",
|
|||
|
|
"type": "n8n-nodes-base.stickyNote",
|
|||
|
|
"position": [
|
|||
|
|
416,
|
|||
|
|
-224
|
|||
|
|
],
|
|||
|
|
"typeVersion": 1
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"parameters": {
|
|||
|
|
"content": "# 步骤 4: Budget Planning & Alerts 💰\n\n**Budget Planner**:创建全面的年度预算,包含:\n- 季度预算明细\n- 服务调度建议\n- 成本优化策略\n- 基于优先级的规划\n\n**Property Manager Alert**:将结果格式化为可操作的警报,包含:\n- 预算摘要\n- 高优先级服务\n- 供应商推荐\n- 成本节约技巧",
|
|||
|
|
"height": 1040,
|
|||
|
|
"width": 832,
|
|||
|
|
"color": 5
|
|||
|
|
},
|
|||
|
|
"id": "062a01f7-37ec-40cb-bb97-ddc4d3771f49",
|
|||
|
|
"name": "Sticky Note - Planning",
|
|||
|
|
"type": "n8n-nodes-base.stickyNote",
|
|||
|
|
"position": [
|
|||
|
|
816,
|
|||
|
|
-224
|
|||
|
|
],
|
|||
|
|
"typeVersion": 1
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"parameters": {
|
|||
|
|
"promptType": "define",
|
|||
|
|
"text": "=翻译以下内容为中文:\n {{ $json.message_text }}",
|
|||
|
|
"options": {}
|
|||
|
|
},
|
|||
|
|
"type": "@n8n/n8n-nodes-langchain.agent",
|
|||
|
|
"typeVersion": 2.2,
|
|||
|
|
"position": [
|
|||
|
|
1712,
|
|||
|
|
240
|
|||
|
|
],
|
|||
|
|
"id": "37a70dd8-460f-41f8-bfa6-10da87cfac51",
|
|||
|
|
"name": "AI Agent"
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"parameters": {
|
|||
|
|
"model": {
|
|||
|
|
"__rl": true,
|
|||
|
|
"value": "qwen-plus",
|
|||
|
|
"mode": "list",
|
|||
|
|
"cachedResultName": "qwen-plus"
|
|||
|
|
},
|
|||
|
|
"options": {}
|
|||
|
|
},
|
|||
|
|
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
|||
|
|
"typeVersion": 1.2,
|
|||
|
|
"position": [
|
|||
|
|
1712,
|
|||
|
|
480
|
|||
|
|
],
|
|||
|
|
"id": "2778e6d0-2323-4b93-b03f-f9a319115977",
|
|||
|
|
"name": "OpenAI Chat Model",
|
|||
|
|
"credentials": {
|
|||
|
|
"openAiApi": {
|
|||
|
|
"id": "rg9eI0cqMkaxv3AK",
|
|||
|
|
"name": "江oneapi"
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"parameters": {
|
|||
|
|
"operation": "toText",
|
|||
|
|
"sourceProperty": "output",
|
|||
|
|
"options": {}
|
|||
|
|
},
|
|||
|
|
"type": "n8n-nodes-base.convertToFile",
|
|||
|
|
"typeVersion": 1.1,
|
|||
|
|
"position": [
|
|||
|
|
2064,
|
|||
|
|
240
|
|||
|
|
],
|
|||
|
|
"id": "7a0dfdc1-241e-4fc7-b6bd-6a32346e012b",
|
|||
|
|
"name": "Convert to File"
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"parameters": {},
|
|||
|
|
"type": "n8n-nodes-base.manualTrigger",
|
|||
|
|
"typeVersion": 1,
|
|||
|
|
"position": [
|
|||
|
|
-160,
|
|||
|
|
320
|
|||
|
|
],
|
|||
|
|
"id": "413a5785-59fd-43be-b934-acd9c314e197",
|
|||
|
|
"name": "When clicking ‘Execute workflow’"
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
"connections": {
|
|||
|
|
"ScrapeGraphAI - Plumbing": {
|
|||
|
|
"main": [
|
|||
|
|
[
|
|||
|
|
{
|
|||
|
|
"node": "Cost Analyzer",
|
|||
|
|
"type": "main",
|
|||
|
|
"index": 0
|
|||
|
|
}
|
|||
|
|
]
|
|||
|
|
]
|
|||
|
|
},
|
|||
|
|
"ScrapeGraphAI - Electrical": {
|
|||
|
|
"main": [
|
|||
|
|
[]
|
|||
|
|
]
|
|||
|
|
},
|
|||
|
|
"ScrapeGraphAI - HVAC": {
|
|||
|
|
"main": [
|
|||
|
|
[]
|
|||
|
|
]
|
|||
|
|
},
|
|||
|
|
"Cost Analyzer": {
|
|||
|
|
"main": [
|
|||
|
|
[
|
|||
|
|
{
|
|||
|
|
"node": "Service Comparer",
|
|||
|
|
"type": "main",
|
|||
|
|
"index": 0
|
|||
|
|
}
|
|||
|
|
]
|
|||
|
|
]
|
|||
|
|
},
|
|||
|
|
"Service Comparer": {
|
|||
|
|
"main": [
|
|||
|
|
[
|
|||
|
|
{
|
|||
|
|
"node": "Budget Planner",
|
|||
|
|
"type": "main",
|
|||
|
|
"index": 0
|
|||
|
|
}
|
|||
|
|
]
|
|||
|
|
]
|
|||
|
|
},
|
|||
|
|
"Budget Planner": {
|
|||
|
|
"main": [
|
|||
|
|
[
|
|||
|
|
{
|
|||
|
|
"node": "Property Manager Alert",
|
|||
|
|
"type": "main",
|
|||
|
|
"index": 0
|
|||
|
|
}
|
|||
|
|
]
|
|||
|
|
]
|
|||
|
|
},
|
|||
|
|
"Property Manager Alert": {
|
|||
|
|
"main": [
|
|||
|
|
[
|
|||
|
|
{
|
|||
|
|
"node": "AI Agent",
|
|||
|
|
"type": "main",
|
|||
|
|
"index": 0
|
|||
|
|
}
|
|||
|
|
]
|
|||
|
|
]
|
|||
|
|
},
|
|||
|
|
"AI Agent": {
|
|||
|
|
"main": [
|
|||
|
|
[
|
|||
|
|
{
|
|||
|
|
"node": "Convert to File",
|
|||
|
|
"type": "main",
|
|||
|
|
"index": 0
|
|||
|
|
}
|
|||
|
|
]
|
|||
|
|
]
|
|||
|
|
},
|
|||
|
|
"OpenAI Chat Model": {
|
|||
|
|
"ai_languageModel": [
|
|||
|
|
[
|
|||
|
|
{
|
|||
|
|
"node": "AI Agent",
|
|||
|
|
"type": "ai_languageModel",
|
|||
|
|
"index": 0
|
|||
|
|
}
|
|||
|
|
]
|
|||
|
|
]
|
|||
|
|
},
|
|||
|
|
"When clicking ‘Execute workflow’": {
|
|||
|
|
"main": [
|
|||
|
|
[
|
|||
|
|
{
|
|||
|
|
"node": "ScrapeGraphAI - Plumbing",
|
|||
|
|
"type": "main",
|
|||
|
|
"index": 0
|
|||
|
|
}
|
|||
|
|
]
|
|||
|
|
]
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
"pinData": {
|
|||
|
|
"ScrapeGraphAI - Plumbing": [
|
|||
|
|
{
|
|||
|
|
"request_id": "08954bc8-3fc8-4760-8754-355b4bcdf886",
|
|||
|
|
"status": "completed",
|
|||
|
|
"website_url": "https://usaleaks.com/",
|
|||
|
|
"user_prompt": "提取页面上列出的每项管道服务的以下信息: - 服务名称 (例如:疏通排水管、管道维修) - 服务描述 - 供应商名称 (管道公司名称) - 供应商评级 (如果可用) - 价格范围 (如果可用) - 联系方式 (电话号码、电子邮件) 以对象数组的 JSON 格式返回数据。",
|
|||
|
|
"result": {
|
|||
|
|
"services": [
|
|||
|
|
{
|
|||
|
|
"service_name": "Plumbing Service",
|
|||
|
|
"service_description": "Residential & Commercial plumbing services",
|
|||
|
|
"vendor_name": "USA Leaks",
|
|||
|
|
"vendor_rating": 4.9,
|
|||
|
|
"price_range": "Not specified",
|
|||
|
|
"contact_info": "(813) 544-7711, (727) 746-5090, [Email Us](https://usaleaks.com/contact-us)"
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"service_name": "Leak Detection",
|
|||
|
|
"service_description": "Expert leak detection services for residential and commercial properties",
|
|||
|
|
"vendor_name": "USA Leaks",
|
|||
|
|
"vendor_rating": 4.9,
|
|||
|
|
"price_range": "Not specified",
|
|||
|
|
"contact_info": "(813) 544-7711, (727) 746-5090, [Email Us](https://usaleaks.com/contact-us)"
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"service_name": "Mold Assessment and Removal",
|
|||
|
|
"service_description": "State licensed & insured mold assessors and remediators",
|
|||
|
|
"vendor_name": "USA Leaks",
|
|||
|
|
"vendor_rating": 4.9,
|
|||
|
|
"price_range": "Not specified",
|
|||
|
|
"contact_info": "(813) 544-7711, (727) 746-5090, [Email Us](https://usaleaks.com/contact-us)"
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"service_name": "Water Line Repairs & Repipes",
|
|||
|
|
"service_description": "Water line repairs and repipes for residential and commercial properties",
|
|||
|
|
"vendor_name": "USA Leaks",
|
|||
|
|
"vendor_rating": 4.9,
|
|||
|
|
"price_range": "Not specified",
|
|||
|
|
"contact_info": "(813) 544-7711, (727) 746-5090, [Email Us](https://usaleaks.com/contact-us)"
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"service_name": "Drain Backups and Clogs",
|
|||
|
|
"service_description": "Drain backup and clog services for residential and commercial properties",
|
|||
|
|
"vendor_name": "USA Leaks",
|
|||
|
|
"vendor_rating": 4.9,
|
|||
|
|
"price_range": "Not specified",
|
|||
|
|
"contact_info": "(813) 544-7711, (727) 746-5090, [Email Us](https://usaleaks.com/contact-us)"
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"service_name": "Water Heater Repairs and Replacements",
|
|||
|
|
"service_description": "Water heater repair and replacement services for residential and commercial properties",
|
|||
|
|
"vendor_name": "USA Leaks",
|
|||
|
|
"vendor_rating": 4.9,
|
|||
|
|
"price_range": "Not specified",
|
|||
|
|
"contact_info": "(813) 544-7711, (727) 746-5090, [Email Us](https://usaleaks.com/contact-us)"
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"service_name": "Natural Gas & Propane Fixtures",
|
|||
|
|
"service_description": "Natural gas and propane fixture services for residential and commercial properties",
|
|||
|
|
"vendor_name": "USA Leaks",
|
|||
|
|
"vendor_rating": 4.9,
|
|||
|
|
"price_range": "Not specified",
|
|||
|
|
"contact_info": "(813) 544-7711, (727) 746-5090, [Email Us](https://usaleaks.com/contact-us)"
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"service_name": "Toilet Repairs and Replacements",
|
|||
|
|
"service_description": "Toilet repair and replacement services for residential and commercial properties",
|
|||
|
|
"vendor_name": "USA Leaks",
|
|||
|
|
"vendor_rating": 4.9,
|
|||
|
|
"price_range": "Not specified",
|
|||
|
|
"contact_info": "(813) 544-7711, (727) 746-5090, [Email Us](https://usaleaks.com/contact-us)"
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"service_name": "Faucets and Shower Valves",
|
|||
|
|
"service_description": "Faucet and shower valve services for residential and commercial properties",
|
|||
|
|
"vendor_name": "USA Leaks",
|
|||
|
|
"vendor_rating": 4.9,
|
|||
|
|
"price_range": "Not specified",
|
|||
|
|
"contact_info": "(813) 544-7711, (727) 746-5090, [Email Us](https://usaleaks.com/contact-us)"
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"service_name": "Sewer Line Repairs and Replacements",
|
|||
|
|
"service_description": "Sewer line repair and replacement services for residential and commercial properties",
|
|||
|
|
"vendor_name": "USA Leaks",
|
|||
|
|
"vendor_rating": 4.9,
|
|||
|
|
"price_range": "Not specified",
|
|||
|
|
"contact_info": "(813) 544-7711, (727) 746-5090, [Email Us](https://usaleaks.com/contact-us)"
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"service_name": "Water Treatment/Softeners",
|
|||
|
|
"service_description": "Water treatment and softener services for residential and commercial properties",
|
|||
|
|
"vendor_name": "USA Leaks",
|
|||
|
|
"vendor_rating": 4.9,
|
|||
|
|
"price_range": "Not specified",
|
|||
|
|
"contact_info": "(813) 544-7711, (727) 746-5090, [Email Us](https://usaleaks.com/contact-us)"
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"service_name": "Shower Pan Replacements",
|
|||
|
|
"service_description": "Shower pan replacement services for residential and commercial properties",
|
|||
|
|
"vendor_name": "USA Leaks",
|
|||
|
|
"vendor_rating": 4.9,
|
|||
|
|
"price_range": "Not specified",
|
|||
|
|
"contact_info": "(813) 544-7711, (727) 746-5090, [Email Us](https://usaleaks.com/contact-us)"
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"service_name": "Any Commercial Plumbing",
|
|||
|
|
"service_description": "Commercial plumbing services for various properties",
|
|||
|
|
"vendor_name": "USA Leaks",
|
|||
|
|
"vendor_rating": 4.9,
|
|||
|
|
"price_range": "Not specified",
|
|||
|
|
"contact_info": "(813) 544-7711, (727) 746-5090, [Email Us](https://usaleaks.com/contact-us)"
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"service_name": "Sewer Camera Diagnostic",
|
|||
|
|
"service_description": "Sewer camera diagnostic services for residential and commercial properties",
|
|||
|
|
"vendor_name": "USA Leaks",
|
|||
|
|
"vendor_rating": 4.9,
|
|||
|
|
"price_range": "Not specified",
|
|||
|
|
"contact_info": "(813) 544-7711, (727) 746-5090, [Email Us](https://usaleaks.com/contact-us)"
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"service_name": "Ultrasonic Slab Leak Detection",
|
|||
|
|
"service_description": "Ultrasonic slab leak detection services for residential and commercial properties",
|
|||
|
|
"vendor_name": "USA Leaks",
|
|||
|
|
"vendor_rating": 4.9,
|
|||
|
|
"price_range": "Not specified",
|
|||
|
|
"contact_info": "(813) 544-7711, (727) 746-5090, [Email Us](https://usaleaks.com/contact-us)"
|
|||
|
|
}
|
|||
|
|
]
|
|||
|
|
},
|
|||
|
|
"error": ""
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
"AI Agent": [
|
|||
|
|
{
|
|||
|
|
"output": "🏠 **物业维护成本分析** \n📅 生成日期:2025年8月15日 上午6:11:22 \n\n💰 **年度预算概览** \n• 总预估费用:$0 \n• 月均费用:$0 \n• 潜在节省费用:$0 \n\n🚨 **服务优先级** \n• 高优先级:0项服务($0) \n• 中优先级:0项服务 \n• 低优先级:15项服务 \n\n📊 **季度预算明细** \n\n🔧 **最优先服务建议** \n💡 **成本优化小贴士** \n1. 同一服务商办理多项服务以获取折扣 \n2. 安排预防性维护,避免紧急维修 \n3. 对于高价服务(超过$500)获取多个报价 \n\n━━━━━━━━━━━━━━━━━━━━━━ \n📈 **下次更新**:下周 \n🔄 **数据来源**:多家承包商网站"
|
|||
|
|
}
|
|||
|
|
]
|
|||
|
|
},
|
|||
|
|
"meta": {
|
|||
|
|
"templateCredsSetupCompleted": true,
|
|||
|
|
"instanceId": "d4bc54c4750443ddb7fb9e6b4c7e38c46f3d96e6d4cbfdf57a74efbc3218b7c8"
|
|||
|
|
}
|
|||
|
|
}
|