Disclosure: LinkDigest, the reading API in this post, is our tool. This article was generated by an AI agent; its claims were checked against the API's documentation, our own test runs, and n8n's documentation and source code.
A common n8n job: every morning, search one topic on Douyin (抖音), for example 牛肉面 探店 ("beef noodle shop visits"), and turn the videos you have not seen before into text in a sheet.
Two things make this harder than it looks:
- Reading. A plain HTTP request to a Douyin video page returns a verification page, not the video. In our measurement it was 72,914 bytes with no visible text. So the reading step needs a service that returns the spoken script as text.
- "Only new". A daily search returns many of yesterday's videos again. You don't want to read and pay for those twice.
The reading is one API call. The "only new" part is n8n's own Remove Duplicates node.
What was run, and what is documented
| Part | Status |
|---|---|
One call that searches, reads and compares (search with digest: true) |
Run on a test account, 2026-11-21. 牛肉面 探店 found 3 Douyin videos, all read in about 4 minutes. Credits: 4 for the search, 2 per video, 1 for the comparison. |
| The wait-and-ask-again loop for a slow read | Run on a test account, 2026-11-08. The first call returned 202; the same call 15 s later returned 200 with 20 transcript segments. Billed once. |
| The daily, new-videos-only workflow below (Remove Duplicates) |
Run twice on n8n 2.48.7 (local, test account, search limit 3), 2026-11-22. Run 1: 3 new videos, read in about 2 minutes (search 4 credits, reads 2; one link had been read before and cost 0). Run 2: the same 3 links came back, Remove Duplicates discarded all 3 and the flow stopped, charging only the search. It has not run on a schedule yet. |
The workflow
Schedule Trigger
→ HTTP Request (search, links only)
→ Split Out (results)
→ Remove Duplicates (Remove Items Processed in Previous Executions)
→ Aggregate (url → one list)
→ HTTP Request (POST /api/v1/digest/batch)
→ Wait 1 min
→ HTTP Request (GET /api/v1/digest/batch/<id>?include=digests)
→ IF status is not "done" → Wait 1 min → back to the GET
→ Google Sheets / Feishu / email
Import it: douyin-daily-new-only.json (n8n → Import from File, then pick your own Header Auth credential in the three HTTP Request nodes). It is the workflow we ran, with limit set back to 10.
Every HTTP Request node uses the same credential: Header Auth with Name Authorization and Value Bearer ld_live_….
1. Search, links only
POST https://linkdigest.dev/api/v1/search
{ "query": "牛肉面 探店", "platform": "douyin", "limit": 10 }
The response has results with each post's url, title and snippet. Nothing is read yet. A search is charged only when it finds something.
2. Split Out
Field to split out: results. Each post is now one n8n item with a url.
3. Remove Duplicates (the key step)
- Operation: Remove Items Processed in Previous Executions
- Keep Items Where: Value Is New
-
Value to Dedupe On:
{{ $json.url }}
Per n8n's docs, this operation compares the current items with items from earlier executions and removes the ones already seen.
- History Size is how many values it keeps. The default is 10,000.
- Scope keeps that history for this node only (the default) or shares it across the workflow.
- Clear Deduplication History wipes it.
A caveat the docs page doesn't spell out: the node remembers a value when the item passes through it. In n8n's source (RemoveDuplicatesV2.node.ts), the Value Is New branch calls checkProcessedAndRecord, which checks and records in one step. So a URL counts as seen even if the read after it fails, and tomorrow's run will filter it out. Two consequences:
- Put Remove Duplicates directly before the read, not earlier in the flow.
- If you want failed reads retried, handle them yourself (see step 6).
If nothing is new, no items leave this node and the nodes after it don't run, so a quiet day costs one search. The held-back links go to the node's second output (Discarded); in our second run all 3 went there.
4. Aggregate
Aggregate the url field into one list. The output is a single item, { "url": ["…", "…"] }.
5. Read only the new ones in one batch
POST https://linkdigest.dev/api/v1/digest/batch
{ "urls": {{ JSON.stringify($json.url) }}, "depth": "script" }
-
depth: "script"returns only the spoken script, which is the cheapest option. Drop it to also get on-screen text and key points. - Add
"synthesis": truefor a comparison page across the videos.
The response gives a batch_id.
6. Wait, then collect
After a 1-minute Wait, call:
GET https://linkdigest.dev/api/v1/digest/batch/{{ $json.batch_id }}?include=digests
-
statusisrunningordone. Until it isdone, loop through an IF node and a 1-minute Wait back to this request. -
digestsis an object keyed by each video's link, not an array. Each value hastranscript(timed segments) andraw_markdown. -
items[]lists every link with its ownstatus(queued,running,done,cachedfor a link read before at 0 credits, orerror) and anerrormessage when it failed.
The items with status error are the ones Remove Duplicates has already recorded. If you care about them, Split Out items, filter on status = error, and append those URLs to a retry sheet that feeds a separate path without the dedupe node.
7. Write it somewhere
Map each value of the digests object (its raw_markdown, or the transcript segments) into Google Sheets, a Feishu table or an email.
The one-call variant (no dedupe)
If reading everything each time is fine, skip steps 2–5: add "digest": true to the search body.
{ "query": "牛肉面 探店", "platform": "douyin", "limit": 3, "digest": true }
The search returns 202 with a batch_id, and the posts it found are already queued as a batch. Collect it with the same GET as in step 6. synthesis.raw_markdown then holds a comparison of the videos: common themes and what each one claims, with quotes checked word for word against the transcripts. This is the variant we ran on 2026-11-21 (3 videos, about 4 minutes).
Links
- The example, with the single-link read and an MCP variant: examples/n8n in our public repo (Chinese)
- n8n Remove Duplicates: docs · source
Top comments (0)