Build a Dify workflow that cites Xiaohongshu and WeChat sources
For a recurring editorial brief, use two HTTP Request nodes in a Dify workflow: one calls xiaohongshu.app_v2.search_notes to search Xiaohongshu notes, and the other calls wechat_mp.v2.fetch_account_articles to list articles from one WeChat official account. If a Dify Agent should choose the platform from the question, connect BeatAPI as an MCP server instead. For a first run, search for “coffee machine descaling” and pick a tutorial from a verified account.
Dify model setup · Read and verify an assistant’s sources
Configure the fixed HTTP workflow
- In the Workflow start node, add two string inputs:
keyword(the Xiaohongshu search term) andaccount_username(a verified WeChat account identifier). - Add two HTTP Request nodes that POST to
https://api.beatapi.io/v1/social-data/call. - Select Bearer authentication, store the BeatAPI key as a Secret environment variable, and reference the key through the variable picker.
- Set the body type to JSON, paste the matching body below, and replace each placeholder with the matching Dify variable.
Use If-Else to check the HTTP status. In a Code node, parse the response body if the body arrived as text, then check status, error and request_id. Xiaohongshu candidates are under data.data.items[].note. WeChat titles, links and summaries are under data.articles[]. Connect the status, the request ID and the candidates to Output. Keep a successful empty list as an empty list, and route failures to a separate output. Send only the selected links to the WeChat reader or the Xiaohongshu detail workflow when needed.
Check each source’s response separately before passing the results to the brief. To keep partial results in the same run, configure error handling on both HTTP nodes: when one source fails, return a failure status for the failed source and pass the other source’s candidates through. Keep the source, the input, the status, the candidates and the request ID together, so you can retry the exact keyword or account that failed.
What should the first debug run return?
An LLM prompt can ask: “Suggest up to two topics. For each one, include the source identifier and something the editor should verify. Label any material that consists of a title or summary.” Before handing off the brief, open one source and verify the corresponding statement. One keyword page plus one account page takes two data requests; every selected detail takes an additional request.
Use MCP if the Agent should select the tool
Under Tools → MCP → Add MCP Server, enter https://beatapi.io/mcp and choose Streamable HTTP. If your connection settings support custom authentication headers, pass Authorization: Bearer <BEATAPI_API_KEY> through protected configuration. If your Dify version offers no compatible authentication, use the HTTP workflow above.
- Check that
capabilities_search,capabilities_inspectandcapabilities_runappear, then attach the three tools to the Agent or use them as separate tool nodes in order. - Search for the Xiaohongshu keyword-search capability or the WeChat account-list capability.
- Inspect the returned reference and the required inputs.
- Run the capability for one target.
In the execution log, match the input, the request ID and the returned records to the workflow output. Label WeChat list previews as summaries. See BeatAPI pricing.

