8
n8n 中文网amn8n.com

Whatsapp 深度研究

中级

这是一个Personal Productivity, AI Chatbot领域的自动化工作流,包含 10 个节点。主要使用 Twilio, Webhook, Perplexity, ChainLlm, LmChatAnthropic 等节点。 使用 Twilio、Perplexity 和 Claude 的 WhatsApp 研究助手

前置要求
  • HTTP Webhook 端点(n8n 会自动生成)
  • Anthropic API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "KxLD27K9btIxsRZo",
  "meta": {
    "instanceId": "e57d916222032d19fc69f0f34e059f722d4f608515cab84ee2db9eaaa4240714",
    "templateCredsSetupCompleted": true
  },
  "name": "Whatsapp 深度研究",
  "tags": [],
  "nodes": [
    {
      "id": "f3a0dc1a-f64b-4f2e-945a-2cfdfe607e45",
      "name": "获取 Whatsapp 请求",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -528,
        0
      ],
      "webhookId": "51a2d8c0-138a-49fb-95a7-3eb342b46f4b",
      "parameters": {
        "path": "fetch-whatsapp-request",
        "options": {},
        "httpMethod": "POST"
      },
      "typeVersion": 2
    },
    {
      "id": "51fc09d1-55e2-4198-977b-79066559d246",
      "name": "执行深度研究",
      "type": "n8n-nodes-base.perplexity",
      "position": [
        -224,
        0
      ],
      "parameters": {
        "model": "sonar-pro",
        "options": {},
        "messages": {
          "message": [
            {
              "content": "=You are a specialized AI Research Analyst. Your task is to perform a deep, comprehensive, and objective research analysis on the user-provided topic using your advanced sonar search capabilities. The final output must be a well-structured report formatted in Markdown, suitable for delivery via an API.\n\n**User Query:**\n\"{{ $json.body.Body }}\"\n\n**Required Output Structure:**\n\n1.  **Title:** A clear and concise title for the research report.\n2.  **Overview (1-2 paragraphs):** A high-level executive summary of the topic. This should give the user the most important information at a glance.\n3.  **Key Points (Bulleted List):** A list of 3-5 of the most critical facts, findings, or aspects of the topic.\n4.  **Detailed Analysis:** A more in-depth exploration of the topic. Break this section down with subheadings (using bold text) as needed. Cover background, current status, different perspectives, and relevant data.\n5.  **Conclusion:** A brief concluding paragraph that summarizes the main takeaways or future outlook.\n6.  **Sources:** A numbered list of the primary sources used for this analysis.\n\n**Guidelines:**\n-   **Tone:** Maintain a neutral, objective, and factual tone.\n-   **Accuracy:** Prioritize information from reputable sources. Synthesize findings from multiple sources to provide a balanced view.\n-   **Formatting:** Strictly adhere to the Markdown structure specified above. Use `*bold*` for headings and bullet points (`-` or `*`) for lists.\n-   **Clarity:** Write in clear, concise language. Avoid overly technical jargon where possible, or explain it if necessary.\n-   **Completeness:** The generated report should be a self-contained document based solely on the provided user query. Do not ask follow-up questions."
            }
          ]
        },
        "simplify": true,
        "requestOptions": {}
      },
      "credentials": {
        "perplexityApi": {
          "id": "6FACql65sGWXE02k",
          "name": "Perplexity account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "783daa3b-db9e-4a8c-b0e1-60679ee293cf",
      "name": "为 Whatsapp 优化生成输出",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        112,
        0
      ],
      "parameters": {
        "text": "=You are an expert content editor who transforms raw text into perfectly formatted summaries for WhatsApp. Your task is to take the provided research report and polish it into a message that is readable, engaging, and renders correctly on WhatsApp.\n\n**Raw Research Report:**\n{{ $json.message }}\n\n**Your Instructions:**\n\n1.  **Preserve Core Content:** Do not change the facts, data, or the meaning of the original text. Your job is to edit for style and formatting only.\n\n2.  **Add Emojis:**\n    * Add a single, relevant emoji at the beginning of the Title.\n    * Add relevant emojis to the main section headers and to each bullet point in the \"Key Points\" list.\n\n3.  **Strict Formatting Rules for WhatsApp:**\n    * **Bolding:** Apply bold formatting by enclosing headers in **single asterisks**. For example: `*Overview:*`. Do NOT use double asterisks.\n    * **Bullet Points:** Use a standard hyphen (`-`) followed by a single space for each bullet point.\n    * **Spacing:** Ensure there is a **double line break** (press Enter twice) between each major section to create clean visual separation.\n    * **Citations:** Preserve the numerical inline citations like `[1]`, `[2]`, etc., exactly as they are.\n\n4.  **Character Limit:** The entire final output MUST be less than 1600 characters to comply with WhatsApp's message limit. Be concise.\n\n5.  **No Preamble:** Your output must begin *directly* with the report's title. Do not include any introductory phrases like \"Here is the polished version:\".\n\n**Example of Desired Final Output Format:**\n\n*Example:*\n🤖 *Title:* Example Report\n📜 *Overview:*\nThis is a summary of the topic. It is clear and concise.\n\n🎯 *Key Points:*\n- ✅ This is the first key point.\n- ⚙️ This is the second key point.\n\n---\n\nProduce the final, polished WhatsApp-ready report now, strictly following all the rules and the format shown in the example.\n\n**Remember whatsapp allows only 1600 characters to send via message so your output must be less than or equal to that.**",
        "batching": {},
        "promptType": "define"
      },
      "typeVersion": 1.7
    },
    {
      "id": "e613cdb5-7ba4-4519-b15e-a0174fdb55d6",
      "name": "在 Whatsapp 中发送输出",
      "type": "n8n-nodes-base.twilio",
      "position": [
        640,
        0
      ],
      "parameters": {
        "to": "={{ $('Fetch Whatsapp Request').item.json.body.From.replace('whatsapp:', '') }}",
        "from": "={{ $('Fetch Whatsapp Request').item.json.body.To.replace('whatsapp:', '') }}",
        "message": "={{ $json.text }}",
        "options": {},
        "toWhatsapp": true
      },
      "credentials": {
        "twilioApi": {
          "id": "Dm0RKlu8zVyZcEWb",
          "name": "Twilio account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "ede2a3ae-6dc9-486e-999f-dcb9737fd79b",
      "name": "Claude Sonnet 4",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "position": [
        112,
        208
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "claude-sonnet-4-20250514",
          "cachedResultName": "Claude 4 Sonnet"
        },
        "options": {}
      },
      "credentials": {
        "anthropicApi": {
          "id": "YBCLbX9tu5fuK8V3",
          "name": "Anthropic account Work"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "3c93f1c8-e00e-4791-b10f-02f9c0d82630",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -624,
        -224
      ],
      "parameters": {
        "width": 288,
        "height": 560,
        "content": "### 📲 WhatsApp 网关"
      },
      "typeVersion": 1
    },
    {
      "id": "198ba40c-5f71-4cef-a69e-fb621829281d",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -320,
        -224
      ],
      "parameters": {
        "color": 7,
        "width": 288,
        "height": 560,
        "content": "### 🧠 AI 研究引擎"
      },
      "typeVersion": 1
    },
    {
      "id": "eada649f-b85c-4696-a670-eeafb6ac2773",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -16,
        -224
      ],
      "parameters": {
        "color": 3,
        "width": 528,
        "height": 560,
        "content": "### 🎨 内容造型师"
      },
      "typeVersion": 1
    },
    {
      "id": "097b9242-ce57-48a2-9be5-f3e59298b634",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        528,
        -224
      ],
      "parameters": {
        "color": 6,
        "width": 320,
        "height": 560,
        "content": "### 🚀 WhatsApp 发送"
      },
      "typeVersion": 1
    },
    {
      "id": "c5462997-d89d-4ae6-9d62-d5bca26bd02f",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1008,
        -224
      ],
      "parameters": {
        "color": 5,
        "width": 368,
        "height": 560,
        "content": "## ⭐ 工作流摘要"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "ffca0cbc-b83b-4419-910d-4c05e17be6bf",
  "connections": {
    "Claude Sonnet 4": {
      "ai_languageModel": [
        [
          {
            "node": "Refine Generated Output for Whatsapp",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Perform Deep Research": {
      "main": [
        [
          {
            "node": "Refine Generated Output for Whatsapp",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Whatsapp Request": {
      "main": [
        [
          {
            "node": "Perform Deep Research",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Refine Generated Output for Whatsapp": {
      "main": [
        [
          {
            "node": "Send Output in Whatsapp",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

中级 - 个人效率, AI 聊天机器人

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
中级
节点数量10
分类2
节点类型6
难度说明

适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流

作者
Harsh Maniya

Harsh Maniya

@harshmaniya1

Crafting Intelligent AI Solutions | AI Engineer building the next generation of intelligent workflows on n8n. Automating the complex, one node at a time.

外部链接
在 n8n.io 查看

分享此工作流