Find new WeChat articles and import selected links into ima
To add an article link you already have, call the ima Skill’s import_urls operation with the target knowledge base. To follow ten WeChat accounts each week, find new articles with BeatAPI’s wechat_mp.v2.fetch_account_articles, select the articles relevant to the project, then send the selected links to ima with import_urls. Test the flow with one article in a test folder of your research library first.
Build the import queue
- Start with a verified Official Account
username. - Send a POST to
https://api.beatapi.io/v1/social-data/callwithAuthorization: Bearer <BEATAPI_API_KEY>from the scheduler’s credentials andContent-Type: application/json. Establish a baseline on the first run. If you need older articles, set a separate date range for the backfill.
- In a successful response, take each article URL, title,
app_msg_idandidxfromdata.articles. Deduplicate by account and article key. The incremental collection guide explains how to bound paging. - Record
article_key,article_url,destination,statusand the BeatAPI request ID for each queue entry. Skip entries already imported to the same destination. If one link goes into two libraries, track each destination as a separate entry.
Import into the chosen library
- Choose a test knowledge base in ima. Import one webpage URL in the ima client and check that the item reached the right knowledge base.
- For automation, install the official Skill from the ima integration page and configure the Skill’s Client ID and API Key as the installed version instructs. Store the ima credentials separately from the BeatAPI key.
- Use the Skill to find the knowledge base by name and verify the knowledge base ID. For a subfolder, look up the folder ID as well.
- Call the installed Skill’s
import_urlsoperation with the inputs below. Start with one URL, then send batches within the Skill’s stated limits. To import into the root, omitfolder_id.
Verify each import
- Mark each URL that returns
ret_code: 0and amedia_idas accepted. - Find the matching item in the destination folder and check the original link and the readable content. Record each successful item against the item’s article key.
- Retry failed URLs one at a time.
- After a timeout, search the destination folder for the same link before you send the link again.
- If the entry exists but the content cannot be read yet, keep the entry pending.
For example, suppose you find three articles and an editor selects two. The first article returns a media_id and opens in the destination folder, so mark the first article imported. The request for the second article times out, so look for the second article’s original link in the destination folder: verify the content if the item is there, or retry the same URL if the item is still absent. Leave the third article in the candidate list. On the next run, resume from the candidate list and skip the first article, which is already imported. If the team also needs the first article in a second library, queue a new entry for the second library with the same source URL and article key.
Before scheduling, check the flow with one working article and one replay of the same input. Checking one page for each of 10 accounts every week takes 40 list requests over four weeks. If you only send links to ima, BeatAPI usage is the list pages actually requested. To keep an independent local copy of the text, read the selected article text as well. Check the price of both BeatAPI call types on the pricing page, and account for ima usage under ima’s own rules.
Official ima integration page · Tencent Cloud’s ima Skill setup

