Monitor WeChat official accounts in n8n and alert a Feishu group
To send a Feishu group one digest of new WeChat official-account articles, build an n8n workflow that calls wechat_mp.v2.fetch_account_articles for each verified username on your roster, records each article in a Data Table and posts only articles added since the previous check to a Feishu custom bot. For example, an editorial team follows a dozen official accounts and wants one digest per check. The first run only records a baseline for each account and sends no alert. Run a historical backfill as a separate task.
n8n setup · What to do when WeChat limits a request
Build one run in n8n
- Start with Manual Trigger and put one verified
usernamein Edit Fields. Later, read the roster as one item per account. Record each account’s scan outcome so that a failed account can be retried on its own. - Add HTTP Request, POST to
https://api.beatapi.io/v1/social-data/call, and select a Header Auth credential withAuthorization: Bearer <BEATAPI_API_KEY>. Enter the JSON body below in Expression mode; the first request leavesoffsetempty.
- Before splitting the results into article items, check that the response has
status: succeeded, noerrorand adata.articlesarray.- An empty
data.articlesarray means the request returned no articles. - If the call fails or the response shape differs, log the request ID, stop at that account and leave the account’s scan progress unchanged.
- To page, pass
data.next_offsetback for the same account and content type. Stop atis_end: 1, a missing or repeated cursor, or the page limit. If the page limit is reached before the previous boundary, mark the account’s coverage incomplete.
- An empty
- In Data Table, create the columns
article_key,title,urlanddelivery_state.- Build
article_keyfromdata.biz_usernameand the article’sapp_msg_idandidx, and deduplicate each page byarticle_key. Hold articles with an incomplete key for review. - On the first run, write every article as
baseline. On later runs, insert only new keys aspending. - If you use Upsert, make sure Upsert does not change existing
sentrows back topending. - If runs can overlap, run the workflow serially or use a store that enforces a unique
article_key.
- Build
Check which articles should trigger an alert
Keep a separate scan boundary for each account, such as the set of recent article keys from the account’s last complete scan:
- Start each run on page one.
- Page forward until you reach the page that contains the previous boundary, and process every article on that page.
- If you see only a pinned article or a repeat from another page, keep paging until the configured boundary.
- If the cursor fails or the page limit runs out before the boundary, keep the old boundary. Articles already found can still be saved; the next scan from page one deduplicates by
article_key.
Store “how far each account was scanned” separately from “which articles reached the group”. For example, Tuesday’s two new articles belong to batch MP-002 and the Feishu send times out. On Wednesday, even if the scan finds nothing new, check whether batch MP-002 reached the group before retrying. If Tuesday’s scan also missed the previous boundary for one account, rescan that account on its own.
Send one digest to the Feishu group
- Add a custom bot in the target Feishu group’s settings and store the bot’s webhook in protected configuration.
- Meet the group’s keyword, signature or IP requirements for the bot. For a signed bot, generate a fresh
timestampandsignfor each request as Feishu’s documentation describes. - Add a second HTTP Request that POSTs the JSON message to the webhook. Include the account, article title, link and batch ID, so the digest can be traced back.
Before going live, test the digest step:
- Send one saved record to a test group.
- Change the batch’s
pendingrows tosentonly after Feishu returnscode: 0. - Before sending, save the batch ID and the batch’s article keys, so reconciliation and any retry use the same batch.
- If delivery times out or saving the status fails, look up the batch ID in the group to confirm delivery before retrying.
- Skip delivery when no articles are
pending. A batch with unconfirmed delivery still needs reconciliation, even when the latest scan finds no new articles. - After one successful sample and one repeat run, switch to Schedule Trigger, set the workflow timezone and publish the workflow.
To fetch the text of selected articles, continue with the single-article n8n workflow.
Budget for the list pages actually requested per account, plus detail requests and retries, at BeatAPI pricing. Then check three results: a replayed run sends no extra digest, one failed account can be retried on its own, and each digest link opens the matching article.

