Step 1: One-Click Importable n8n Workflow JSON (Zero Custom Plugins Needed)
This standard 4-node n8n workflow runs cleanly on any n8n Cloud or self-hosted instance using built-in core nodes. Copy the JSON below, press Ctrl+V / Cmd+V directly onto an empty n8n canvas, replace YOUR_EDGEDATA_API_KEY and YOUR_SLACK_WEBHOOK_URL, and activate the schedule.
Schedule Trigger
Runs daily at 08:00 UTC across your target US/GB/MY keywords.
EdgeData HTTP POST
Calls /v1/tiktok-shop/products/search with X-API-Key & mode="summary".
Top-10 Velocity Filter
JavaScript Code node ranks products by sold velocity & flags rating drops.
Slack Alert Webhook
Posts a formatted daily digest directly into your merchandising channel.
{
"name": "EdgeData TikTok Shop Daily Trend Digest",
"nodes": [
{
"parameters": {
"rule": {
"interval": [{ "field": "hours", "hoursInterval": 24 }]
}
},
"id": "schedule-trigger-1",
"name": "Daily Schedule",
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.2,
"position": [220, 300]
},
{
"parameters": {
"method": "POST",
"url": "https://api.upp3.com/v1/tiktok-shop/products/search",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{ "name": "X-API-Key", "value": "YOUR_EDGEDATA_API_KEY" },
{ "name": "Content-Type", "value": "application/json" }
]
},
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={\"query\": \"led face mask\", \"region\": \"US\", \"mode\": \"summary\"}"
},
"id": "edgedata-search-2",
"name": "EdgeData TikTok Shop Search",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [460, 300]
},
{
"parameters": {
"jsCode": "const payload = $input.first().json;\nconst items = payload.data?.products || payload.products || payload.summary?.top_products || [];\nconst top10 = [...items]\n .sort((a, b) => (Number(b.sold_count || 0) - Number(a.sold_count || 0)))\n .slice(0, 10);\nconst lines = top10.map((p, idx) => {\n const title = (p.title || p.name || 'Untitled').slice(0, 64);\n const price = p.price_formatted || p.price || 'N/A';\n const sold = p.sold_count ?? 'n/a';\n const rating = p.rating ?? 'n/a';\n return `${idx + 1}. *${title}* | Price: ${price} | Sold: ${sold} | Rating: ${rating}`;\n});\nreturn [{ json: { text: `*TikTok Shop US Daily Top 10 — led face mask*\\n` + (lines.join('\\n') || 'No matching items found.') } }];"
},
"id": "rank-top10-3",
"name": "Filter Top 10 Velocity",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [700, 300]
},
{
"parameters": {
"method": "POST",
"url": "https://hooks.slack.com/services/YOUR_SLACK_WEBHOOK_URL",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={{ JSON.stringify({ text: $json.text }) }}"
},
"id": "slack-webhook-4",
"name": "Post Slack Trend Digest",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [940, 300]
}
],
"connections": {
"Daily Schedule": {
"main": [[{ "node": "EdgeData TikTok Shop Search", "type": "main", "index": 0 }]]
},
"EdgeData TikTok Shop Search": {
"main": [[{ "node": "Filter Top 10 Velocity", "type": "main", "index": 0 }]]
},
"Filter Top 10 Velocity": {
"main": [[{ "node": "Post Slack Trend Digest", "type": "main", "index": 0 }]]
}
},
"active": false,
"settings": { "executionOrder": "v1" }
}
n8n-nodes-edgedata Node Settings
If you run the official EdgeData Community Node (n8n-nodes-edgedata v1.0.0 from /ecosystem), swap Node 2 for the native EdgeData node with Credential Type EdgeData Direct API (X-API-Key), Resource TikTok Shop, Operation Search Products (or Stream Products / Get Product Reviews), Region US / GB / MY, and Response Mode summary.
{
"node": "EdgeData (n8n-nodes-edgedata)",
"credential": "edgeDataApi (Direct X-API-Key)",
"parameters": {
"resource": "tiktokShop",
"operation": "searchProducts",
"query": "led face mask",
"region": "US",
"mode": "summary"
},
"followUpAlertNode": {
"resource": "tiktokShop",
"operation": "getProductReviews",
"productId": "={{ $json.product_id }}",
"region": "US",
"sort": "most_recent",
"filter": "1_star",
"mode": "summary"
}
}
Step 2: Validate Niche Keywords Live in Claude or Cursor via MCP First
Before locking keywords into a daily n8n cron job, use EdgeData’s Hosted MCP tools (tiktok_shop_search_products, tiktok_shop_stream_products, and tiktok_shop_get_product_reviews) directly in Claude Desktop or Cursor to verify which queries have real sales velocity and surface negative review red flags.
Use the EdgeData MCP server with mode="summary" to validate TikTok Shop demand for "led face mask" before I deploy my n8n pipeline: 1. Call `tiktok_shop_search_products` with `query="led face mask"`, `region="US"`, `mode="summary"`. 2. Call `tiktok_shop_stream_products` with `keywords=["led face mask"]`, `region="US"`, `max_items=10`, `mode="summary"` to pull enriched `sold_count`, `est_gmv`, `stock_total`, and `aigc_summary` metrics. 3. Take the top-selling `product_id` and call `tiktok_shop_get_product_reviews` with `region="US"`, `sort="most_recent"`, `filter="1_star"`, `mode="summary"`. Summarize: - Top 5 fastest-selling SKUs with price, estimated GMV, and remaining stock velocity. - Top 3 negative-review quality risks (battery failure, strap comfort, shipping damage) that my n8n alert rule should monitor daily. - Recommend 2 secondary keywords worth tracking in `GB` and `MY`.
Step 3: mode="summary" Saves ~82% Payload & LLM Tokens
TikTok Shop catalog and review payloads contain deeply nested media URLs, creator tags, and localization arrays. Setting mode="summary" shrinks both n8n execution storage overhead and downstream AI summarization token spend by ~82% without losing pricing, sold_count, est_gmv, or review sentiment fields.
| TikTok Shop Endpoint / MCP Tool | mode="raw" (Full JSON) |
mode="summary" (Compact) |
Reduction |
|---|---|---|---|
/v1/tiktok-shop/products/searchtiktok_shop_search_products |
~7,800 tokens (~31 KB) | ~1,350 tokens (~5.4 KB) | −83% |
/v1/tiktok-shop/products/detail |
~5,400 tokens (~21 KB) | ~980 tokens (~3.9 KB) | −82% |
/v1/tiktok-shop/products/reviewstiktok_shop_get_product_reviews |
~7,800 tokens (~31 KB) | ~1,450 tokens (~5.8 KB) | −81% |
| Combined Daily Trend + Review Check | ~21,000 tokens | ~3,780 tokens | ~82.0% Saved |
Step 4: Production Code (cURL, Python & TypeScript) + NDJSON Stream
Prefer running this pipeline outside n8n (e.g., AWS Lambda, Cloudflare Workers, or a Python cron container)? Copy any of the production snippets below—including search, detail, 1-star review alerts, and the NDJSON batch stream (/v1/tiktok-shop/products/stream).
export EDGEDATA_API_KEY="YOUR_EDGEDATA_API_KEY"
# 1. Search trending TikTok Shop US products in compact summary mode
curl -sS -X POST "https://api.upp3.com/v1/tiktok-shop/products/search" \
-H "Content-Type: application/json" \
-H "X-API-Key: ${EDGEDATA_API_KEY}" \
-d '{
"query": "led face mask",
"region": "US",
"mode": "summary"
}'
# 2. Fetch structured product detail by numeric product_id
curl -sS -X POST "https://api.upp3.com/v1/tiktok-shop/products/detail" \
-H "Content-Type: application/json" \
-H "X-API-Key: ${EDGEDATA_API_KEY}" \
-d '{
"product_id": "1729400000000000000",
"region": "US",
"mode": "summary"
}'
# 3. Monitor most-recent 1-star reviews (0-PII GDPR-safe by default)
curl -sS -X POST "https://api.upp3.com/v1/tiktok-shop/products/reviews" \
-H "Content-Type: application/json" \
-H "X-API-Key: ${EDGEDATA_API_KEY}" \
-d '{
"product_id": "1729400000000000000",
"region": "US",
"sort": "most_recent",
"filter": "1_star",
"mode": "summary"
}'
# 4. Bulk NDJSON stream with est_gmv, sold_count & stock_total
curl -sS -N -X POST "https://api.upp3.com/v1/tiktok-shop/products/stream" \
-H "Content-Type: application/json" \
-H "X-API-Key: ${EDGEDATA_API_KEY}" \
-d '{
"region": "US",
"keywords": ["led face mask"],
"max_items": 15
}'
import os
import json
import httpx
API_KEY = os.environ["EDGEDATA_API_KEY"]
HEADERS = {"X-API-Key": API_KEY, "Content-Type": "application/json"}
def run_tiktok_trend_check(query: str, region: str = "US") -> dict:
with httpx.Client(base_url="https://api.upp3.com", headers=HEADERS, timeout=60.0) as client:
search_res = client.post(
"/v1/tiktok-shop/products/search",
json={"query": query, "region": region, "mode": "summary"},
)
search_res.raise_for_status()
search_data = search_res.json()
streamed_items = []
with client.stream(
"POST",
"/v1/tiktok-shop/products/stream",
json={"region": region, "keywords": [query], "max_items": 10},
) as stream_res:
stream_res.raise_for_status()
for line in stream_res.iter_lines():
if line.strip():
streamed_items.append(json.loads(line))
return {"search": search_data, "stream_events": streamed_items[:10]}
# Equivalent with the EdgeData Python SDK (pip install edgedata):
# from edgedata import EdgeDataClient
# with EdgeDataClient(api_key=API_KEY) as client:
# hits = client.tiktok_shop.search_products(query="led face mask", region="US", mode="summary")
if __name__ == "__main__":
result = run_tiktok_trend_check("led face mask", region="US")
print(json.dumps(result, indent=2)[:2000])
const API_KEY = process.env.EDGEDATA_API_KEY;
if (!API_KEY) throw new Error("Set EDGEDATA_API_KEY in your environment");
async function searchTikTokTrends(query: string, region: "US" | "GB" | "MY" = "US") {
const res = await fetch("https://api.upp3.com/v1/tiktok-shop/products/search", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": API_KEY,
},
body: JSON.stringify({ query, region, mode: "summary" }),
});
if (!res.ok) {
throw new Error(`TikTok Shop search failed (${res.status}): ${await res.text()}`);
}
return res.json();
}
async function inspectNegativeReviews(productId: string, region: "US" | "GB" | "MY" = "US") {
const res = await fetch("https://api.upp3.com/v1/tiktok-shop/products/reviews", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": API_KEY,
},
body: JSON.stringify({
product_id: productId,
region,
sort: "most_recent",
filter: "1_star",
mode: "summary",
}),
});
if (!res.ok) {
throw new Error(`TikTok Shop reviews failed (${res.status}): ${await res.text()}`);
}
return res.json();
}
searchTikTokTrends("led face mask", "US")
.then((data) => console.log(JSON.stringify(data, null, 2)))
.catch(console.error);
Claim Your Free 100-Credit Key for n8n & MCP
Generate an instant X-API-Key below (no credit card required) and paste it directly into Node 2 of your imported n8n workflow.