{
  "meta": {
    "templateId": "universal-device-assistant-v1",
    "templateCreatedDate": "2024-01-15T00:00:00.000Z"
  },
  "name": "Universal Digital Device Support Assistant",
  "tags": [],
  "nodes": [
    {
      "id": "3a4f96f5-e0a5-46a5-b604-9c8a7b45e8a1",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -900,
        -420
      ],
      "parameters": {
        "width": 383.5309107901297,
        "height": 320.7616136919316,
        "content": "## \ud83c\udfaf UNIVERSAL DEVICE SUPPORT ASSISTANT\n\nThis workflow creates an AI-powered support system for ANY device:\n\u2022 Kitchen appliances\n\u2022 Electronics\n\u2022 Smart home devices\n\u2022 Power tools\n\u2022 Medical equipment\n\n### \ud83d\udcca Performance:\n\u2022 Response time: <3 seconds\n\u2022 Accuracy: 95%+\n\u2022 Languages: Unlimited\n\n### \ud83d\udd27 Setup:\n1. Add API credentials\n2. Upload device manuals\n3. Activate workflow\n4. Share webhook URL"
      },
      "typeVersion": 1
    },
    {
      "id": "configuration-note",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -900,
        100
      ],
      "parameters": {
        "width": 350,
        "height": 350,
        "content": "## \u2699\ufe0f CONFIGURATION CHECKLIST\n\n- [ ] OpenAI API Key added\n- [ ] Pinecone API Key added\n- [ ] Webhook path configured\n- [ ] CORS headers enabled\n- [ ] Memory window set\n- [ ] Chunk size optimized\n- [ ] Test manual uploaded\n- [ ] Response tested\n\n\ud83d\udca1 **Tips:**\n\u2022 Use chunk size 1000 for manuals\n\u2022 Enable CORS for web apps\n\u2022 Test with simple queries first"
      },
      "typeVersion": 1
    },
    {
      "id": "example-queries",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -400,
        -500
      ],
      "parameters": {
        "width": 320,
        "height": 280,
        "content": "## \ud83d\udcac EXAMPLE USER QUERIES\n\n**Test these to verify setup:**\n\n\u2022 'My dishwasher shows error E24'\n\u2022 'How do I set up my smart thermostat?'\n\u2022 'Coffee machine not heating'\n\u2022 'Router red light blinking'\n\u2022 'TV remote not working'\n\u2022 'Washing machine making noise'\n\u2022 'Printer paper jam'\n\u2022 'Vacuum cleaner lost suction'"
      },
      "typeVersion": 1
    },
    {
      "id": "troubleshooting",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        400,
        -400
      ],
      "parameters": {
        "width": 300,
        "height": 300,
        "content": "## \ud83d\udd0d TROUBLESHOOTING\n\n**\u274c No response:**\n\u2192 Check API keys\n\u2192 Verify webhook is active\n\u2192 Check execution logs\n\n**\u274c Poor answers:**\n\u2192 Upload more detailed manuals\n\u2192 Adjust chunk size\n\u2192 Improve system prompt\n\n**\u274c Slow response:**\n\u2192 Reduce token limit\n\u2192 Optimize vector search\n\u2192 Use caching"
      },
      "typeVersion": 1
    },
    {
      "id": "extension-ideas",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        400,
        100
      ],
      "parameters": {
        "width": 300,
        "height": 320,
        "content": "## \ud83d\ude80 EXTENSION IDEAS\n\n\u2022 Add image recognition for visual guides\n\u2022 Connect to IoT devices for real-time data\n\u2022 Integrate with ticketing systems\n\u2022 Add multi-language support\n\u2022 Create mobile app\n\u2022 Add voice interface\n\u2022 Connect to manufacturer APIs\n\u2022 Add warranty tracking\n\u2022 Create maintenance reminders\n\u2022 Build analytics dashboard"
      },
      "typeVersion": 1
    },
    {
      "id": "webhook-entry",
      "name": "Webhook - User Query",
      "type": "n8n-nodes-base.webhook",
      "notes": "Receives user queries about any household device",
      "position": [
        -680,
        -260
      ],
      "parameters": {
        "path": "device-assistant",
        "options": {
          "responseHeaders": {
            "entries": [
              {
                "name": "Access-Control-Allow-Origin",
                "value": "*"
              }
            ]
          }
        },
        "httpMethod": "POST",
        "responseMode": "responseNode"
      },
      "typeVersion": 1.1
    },
    {
      "id": "ai-agent",
      "name": "AI Agent - Device Expert",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "notes": "Processes queries using LLM and knowledge base",
      "position": [
        -280,
        -260
      ],
      "parameters": {
        "options": {
          "systemMessage": "You are a Universal Digital Device Support Assistant - an intelligent AI helper for any household or technical device.\n\n## Your Role\n- Technical expert for all types of devices (household appliances, electronics, smart home, etc.)\n- Specialist in setup, configuration, and troubleshooting\n- Patient explainer using official manuals and documentation\n\n## Your Knowledge Base\nYou have access to device manuals through the vector database. Use this information for accurate, step-by-step guidance.\n\n## Communication Style\n- Friendly and patient\n- Technically accurate yet understandable\n- Structured responses with clear steps\n- Always reference manual sections when available\n\n## Key Functions\n- Initial setup and installation\n- Configuration and optimization\n- Troubleshooting common issues\n- Maintenance recommendations\n- Safety guidelines\n\n## Example Devices\n- Kitchen appliances (ovens, dishwashers, coffee machines)\n- Home entertainment (TVs, sound systems)\n- Smart home devices (thermostats, security cameras)\n- Computer peripherals (printers, routers)\n- Power tools and garden equipment\n\n## Response Format\nProvide:\n1. Clear identification of the device/issue\n2. Step-by-step instructions\n3. Safety warnings if applicable\n4. Tips for optimal use\n5. When to contact professional support\n\nAlways use information from the knowledge base when available."
        }
      },
      "typeVersion": 1.9
    },
    {
      "id": "webhook-response",
      "name": "Send Response",
      "type": "n8n-nodes-base.respondToWebhook",
      "notes": "Returns formatted response to user",
      "position": [
        320,
        -260
      ],
      "parameters": {
        "options": {
          "responseCode": 200,
          "responseHeaders": {
            "entries": [
              {
                "name": "Content-Type",
                "value": "application/json"
              }
            ]
          }
        },
        "respondWith": "json",
        "responseBody": "={{ JSON.stringify({\n  response: $json.output || \"I couldn't generate a response. Please try rephrasing your question.\",\n  sessionId: $json.sessionId || \"default\",\n  device: $json.device || \"unknown\",\n  timestamp: new Date().toISOString(),\n  confidence: $json.confidence || 0.8\n}) }}"
      },
      "typeVersion": 1.1
    },
    {
      "id": "llm-model",
      "name": "LLM Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "notes": "Configure with your preferred LLM (OpenAI, Anthropic, local models, etc.)",
      "position": [
        -420,
        -60
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4-mini"
        },
        "options": {
          "maxTokens": 2000,
          "temperature": 0.3
        }
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "conversation-memory",
      "name": "Conversation Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "notes": "Maintains context throughout the conversation",
      "position": [
        -240,
        -60
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "vector-database",
      "name": "Manual Knowledge Base",
      "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
      "notes": "Vector database containing device manuals. Can be replaced with Qdrant, Weaviate, or other vector stores",
      "position": [
        -100,
        -60
      ],
      "parameters": {
        "mode": "retrieve-as-tool",
        "options": {
          "topK": 5
        },
        "toolName": "Device_Manual_Database",
        "pineconeIndex": {
          "__rl": true,
          "mode": "list",
          "value": "device-manuals"
        },
        "toolDescription": "Comprehensive database of device manuals including setup instructions, troubleshooting guides, technical specifications, and maintenance procedures for various household and technical devices."
      },
      "credentials": {
        "pineconeApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "embeddings-model",
      "name": "Embeddings Model",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "notes": "Creates embeddings for semantic search. Can use any embedding model",
      "position": [
        -60,
        100
      ],
      "parameters": {
        "model": "text-embedding-ada-002",
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "manual-upload",
      "name": "Manual Upload Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "notes": "Use this to upload new device manuals to the knowledge base",
      "position": [
        -600,
        300
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "prepare-manual-data",
      "name": "Prepare Manual Data",
      "type": "n8n-nodes-base.set",
      "notes": "Format manual text and metadata for upload",
      "position": [
        -380,
        300
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "device-info",
              "name": "deviceType",
              "type": "string",
              "value": "Example: Smart Thermostat"
            },
            {
              "id": "manual-text",
              "name": "text",
              "type": "string",
              "value": "=PASTE YOUR DEVICE MANUAL TEXT HERE\n\nExample content:\n\nChapter 1: Installation\n- Step 1: Remove device from packaging\n- Step 2: Check included components\n- Step 3: Install batteries or connect power\n\nChapter 2: Initial Setup\n- Connect to WiFi network\n- Download companion app\n- Follow in-app instructions\n\nChapter 3: Troubleshooting\n- Device not responding: Check power connection\n- Connection issues: Verify WiFi password\n- Reset procedure: Hold button for 10 seconds\n\nReplace this with your actual device manual content!"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "upload-to-vectordb",
      "name": "Upload to Vector Database",
      "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
      "notes": "Stores manual content in vector database for retrieval",
      "position": [
        -120,
        300
      ],
      "parameters": {
        "mode": "insert",
        "options": {},
        "pineconeIndex": {
          "__rl": true,
          "mode": "list",
          "value": "device-manuals"
        }
      },
      "credentials": {
        "pineconeApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "document-loader",
      "name": "Document Loader",
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "notes": "Processes various document formats (PDF, TXT, DOCX)",
      "position": [
        -20,
        520
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "text-splitter",
      "name": "Text Splitter",
      "type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
      "notes": "Splits large documents into searchable chunks",
      "position": [
        60,
        700
      ],
      "parameters": {
        "options": {},
        "chunkSize": 1000,
        "chunkOverlap": 200
      },
      "typeVersion": 1
    },
    {
      "id": "upload-embeddings",
      "name": "Upload Embeddings",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "notes": "Creates embeddings for manual upload",
      "position": [
        -200,
        560
      ],
      "parameters": {
        "model": "text-embedding-ada-002",
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    }
  ],
  "settings": {
    "executionOrder": "v1"
  },
  "staticData": null,
  "connections": {
    "LLM Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent - Device Expert",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Text Splitter": {
      "ai_textSplitter": [
        [
          {
            "node": "Document Loader",
            "type": "ai_textSplitter",
            "index": 0
          }
        ]
      ]
    },
    "Document Loader": {
      "ai_document": [
        [
          {
            "node": "Upload to Vector Database",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings Model": {
      "ai_embedding": [
        [
          {
            "node": "Manual Knowledge Base",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Upload Embeddings": {
      "ai_embedding": [
        [
          {
            "node": "Upload to Vector Database",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Conversation Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent - Device Expert",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Manual Data": {
      "main": [
        [
          {
            "node": "Upload to Vector Database",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook - User Query": {
      "main": [
        [
          {
            "node": "AI Agent - Device Expert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Manual Knowledge Base": {
      "ai_tool": [
        [
          {
            "node": "AI Agent - Device Expert",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Manual Upload Trigger": {
      "main": [
        [
          {
            "node": "Prepare Manual Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent - Device Expert": {
      "main": [
        [
          {
            "node": "Send Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}