This workflow corresponds to n8n.io template #16043 — we link there as the canonical source.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"id": "MEwUonbITNmVzFMi",
"name": "Collect Kuaishou video comments with JustOneAPI - real response adjusted",
"tags": [],
"nodes": [
{
"id": "78db5fda-53d4-4f76-bcbe-4f94b2b3a9c1",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
2048,
448
],
"parameters": {
"width": 480,
"height": 528,
"content": "## Collect Kuaishou video comments with JustOneAPI - real response adjusted\n\n### How it works\n\n1. Manual trigger starts the workflow.\n2. Prepare API and research fields for the request.\n3. Fetch Kuaishou video comments via HTTP request.\n4. Output raw comment results and build a video comment collection.\n5. Output the final video comment collection.\n\n### Setup steps\n\n- - [ ] Configure the Manual Trigger node to start the workflow.\n- [ ] Set the API endpoint and required fields in the Prepare API and Research Fields node.\n- [ ] Ensure the Fetch Kuaishou Video Comments node has the correct HTTP request configuration.\n- [ ] Verify the Build Video Comment Collection node has the necessary code to process the comments.\n\n### Customization\n\nThe Build Video Comment Collection node can be customized to modify how comments are processed and formatted."
},
"typeVersion": 1
},
{
"id": "5e87a7f9-19b7-4e59-a656-3a03e7262569",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
2608,
448
],
"parameters": {
"color": 7,
"height": 112,
"content": "## Workflow Trigger\n\nInitiates the workflow execution."
},
"typeVersion": 1
},
{
"id": "3f7e49ee-3ed8-4e70-8e59-3fa14c9771ec",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
2992,
448
],
"parameters": {
"color": 7,
"width": 304,
"height": 112,
"content": "## Prepare API Request\n\nConfigures the API request parameters and fields."
},
"typeVersion": 1
},
{
"id": "fc43dfdb-d6f0-4466-9ccc-0813abc2f1c0",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
3456,
448
],
"parameters": {
"color": 7,
"width": 288,
"height": 112,
"content": "## Fetch Comments\n\nMakes the HTTP request to fetch Kuaishou video comments."
},
"typeVersion": 1
},
{
"id": "bc6255af-8374-419c-affe-e00725076ea5",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
3776,
800
],
"parameters": {
"color": 7,
"width": 288,
"height": 112,
"content": "## Output Raw Results\n\nOutputs the raw results from the API request."
},
"typeVersion": 1
},
{
"id": "ddb51482-9385-4eb6-842a-138a740ffef6",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
3920,
448
],
"parameters": {
"color": 7,
"width": 304,
"height": 112,
"content": "## Process Comments\n\nProcesses and formats the fetched comments into a collection."
},
"typeVersion": 1
},
{
"id": "16fd357e-59df-4325-80cb-45ba93079ed8",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
4240,
448
],
"parameters": {
"color": 7,
"height": 112,
"content": "## Output Collection\n\nOutputs the final processed video comment collection."
},
"typeVersion": 1
},
{
"id": "d62d0d23-ea5d-49e2-bab5-a5f2d4b2e045",
"name": "Start Workflow Execution",
"type": "n8n-nodes-base.manualTrigger",
"position": [
2656,
704
],
"parameters": {},
"typeVersion": 1
},
{
"id": "3b6eb337-9b09-4a05-a3c3-6deddbcdd85a",
"name": "Set API Request Parameters",
"type": "n8n-nodes-base.set",
"position": [
3040,
704
],
"parameters": {
"mode": "raw",
"options": {},
"jsonOutput": "{\n \"baseUrl\": \"https://api.justoneapi.com\",\n \"token\": \"YOUR_JUSTONEAPI_TOKEN\",\n \"videoId\": \"YOUR_KUAISHOU_VIDEO_ID\",\n \"pcursor\": \"\"\n}"
},
"typeVersion": 3.4
},
{
"id": "1c40557a-a365-44ab-9a43-9ab3af3ba297",
"name": "Fetch Kuaishou Video Comments API",
"type": "n8n-nodes-base.httpRequest",
"position": [
3504,
704
],
"parameters": {
"url": "={{$json.baseUrl + '/api/kuaishou/get-video-comment/v1'}}",
"options": {
"redirect": {
"redirect": {}
}
},
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "token",
"value": "={{$json.token}}"
},
{
"name": "videoId",
"value": "={{$json.videoId}}"
},
{
"name": "pcursor",
"value": "={{$json.pcursor}}"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "30a999b3-4528-4c76-b65c-eefabba67d35",
"name": "Output Raw Comment Data",
"type": "n8n-nodes-base.set",
"position": [
3824,
928
],
"parameters": {
"mode": "raw",
"options": {},
"jsonOutput": "={{$json}}"
},
"typeVersion": 3.4
},
{
"id": "e930955d-59af-4b6a-a556-1f964cd3feb6",
"name": "Process Comment Data Collection",
"type": "n8n-nodes-base.code",
"position": [
3968,
608
],
"parameters": {
"jsCode": "const rows = $input.all();\nconst config = $('Set API Request Parameters').first().json || {};\n\nfunction getApiResponse(value) {\n if (Array.isArray(value)) return value[0] || {};\n return value || {};\n}\n\nfunction firstUrl(list) {\n if (!Array.isArray(list) || list.length === 0) return '';\n const first = list[0];\n if (typeof first === 'string') return first;\n if (first && typeof first === 'object') return first.url || '';\n return '';\n}\n\nfunction normalizeComment(comment, parentCommentId = '') {\n if (!comment || typeof comment !== 'object') return {};\n return {\n commentId: comment.comment_id ?? '',\n parentCommentId,\n content: comment.content || '',\n photoId: comment.photo_id ?? '',\n authorId: comment.author_id ?? '',\n authorName: comment.author_name || '',\n authorArea: comment.authorArea || '',\n authorVerified: comment.authorVerified ?? '',\n authorLiked: comment.author_liked ?? '',\n userId: comment.user_id ?? '',\n userSex: comment.user_sex || '',\n replyTo: comment.reply_to ?? '',\n replyToUserName: comment.replyToUserName || '',\n time: comment.time || '',\n timestamp: comment.timestamp ?? '',\n likedCount: comment.likedCount ?? '',\n type: comment.type ?? '',\n hot: comment.hot ?? '',\n recallType: comment.recallType ?? '',\n subCommentCount: comment.subCommentCount ?? '',\n displaySubCommentCount: comment.displaySubCommentCount ?? '',\n isKwaiShopItemComment: comment.isKwaiShopItemComment ?? '',\n headUrl: comment.headurl || firstUrl(comment.headurls),\n profilePageType: comment.profilePagePrefetchInfo?.profilePageType ?? '',\n commentAuthorTags: Array.isArray(comment.commentAuthorTags) ? comment.commentAuthorTags : [],\n commentBottomTags: Array.isArray(comment.commentBottomTags) ? comment.commentBottomTags : [],\n cashTags: comment.cashTags || {}\n };\n}\n\nfunction normalizeSubCommentGroup(rootCommentId, group) {\n const subComments = Array.isArray(group?.subComments) ? group.subComments : [];\n return {\n rootCommentId: String(rootCommentId),\n pcursor: group?.pcursor || '',\n subCommentCount: subComments.length,\n subComments: subComments.map(comment => normalizeComment(comment, String(rootCommentId)))\n };\n}\n\nreturn rows.map(item => {\n const commentResponse = item.json || {};\n const apiResponse = getApiResponse(commentResponse);\n const data = apiResponse.data || {};\n const rootComments = Array.isArray(data.rootComments) ? data.rootComments : [];\n const subCommentsMap = data.subCommentsMap && typeof data.subCommentsMap === 'object' ? data.subCommentsMap : {};\n const subCommentGroups = Object.entries(subCommentsMap).map(([rootCommentId, group]) => normalizeSubCommentGroup(rootCommentId, group));\n const subCommentTotal = subCommentGroups.reduce((sum, group) => sum + group.subCommentCount, 0);\n\n return {\n json: {\n requestedVideoId: config.videoId || '',\n requestPcursor: config.pcursor || '',\n videoComments: {\n result: data.result ?? '',\n commentCount: data.commentCount ?? '',\n rootCommentCount: rootComments.length,\n subCommentGroupCount: subCommentGroups.length,\n subCommentCount: subCommentTotal,\n nextPcursor: data.pcursor || '',\n transparentPayload: data.transparentPayload || '',\n hostName: data['host-name'] || '',\n rootComments: rootComments.map(comment => normalizeComment(comment)),\n subCommentsByRoot: subCommentGroups\n },\n debug: {\n apiCode: apiResponse.code ?? '',\n apiMessage: apiResponse.message ?? '',\n recordTime: apiResponse.recordTime || '',\n result: data.result ?? '',\n rootCommentCount: rootComments.length,\n subCommentGroupCount: subCommentGroups.length,\n subCommentCount: subCommentTotal,\n commentCount: data.commentCount ?? '',\n nextPcursor: data.pcursor || ''\n },\n raw: {\n commentData: data,\n commentResponse\n }\n }\n };\n});"
},
"typeVersion": 2
},
{
"id": "139c5e18-784a-41af-9960-fcb2b9625b09",
"name": "Output Final Comment Collection",
"type": "n8n-nodes-base.set",
"position": [
4288,
704
],
"parameters": {
"mode": "raw",
"options": {},
"jsonOutput": "={{$json}}"
},
"typeVersion": 3.4
}
],
"active": false,
"settings": {
"binaryMode": "separate",
"executionOrder": "v1"
},
"versionId": "09119d49-c697-4931-b399-8a06f338b03c",
"connections": {
"Start Workflow Execution": {
"main": [
[
{
"node": "Set API Request Parameters",
"type": "main",
"index": 0
}
]
]
},
"Set API Request Parameters": {
"main": [
[
{
"node": "Fetch Kuaishou Video Comments API",
"type": "main",
"index": 0
}
]
]
},
"Process Comment Data Collection": {
"main": [
[
{
"node": "Output Final Comment Collection",
"type": "main",
"index": 0
}
]
]
},
"Fetch Kuaishou Video Comments API": {
"main": [
[
{
"node": "Output Raw Comment Data",
"type": "main",
"index": 0
},
{
"node": "Process Comment Data Collection",
"type": "main",
"index": 0
}
]
]
}
}
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
This workflow manually fetches comments for a specific Kuaishou video using the JustOneAPI HTTP endpoint, then normalizes root comments and replies into a structured collection while also exposing the raw API response for debugging. Starts when you manually run the workflow.…
Source: https://n8n.io/workflows/16043/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
This workflow listens for an “Approved” label on a Trello card, reads the AI draft bookkeeping JSON from card comments, and posts the corresponding transaction to Xero. It then adds a Xero deep link b
02_LLM_Pipeline v1.0. Uses executeWorkflowTrigger, httpRequest, seaTable. Event-driven trigger; 65 nodes.
This workflow allows you to import any workflow from a file or another n8n instance and map the credentials easily. A multi-form setup guides you through the entire process At the beginning you have t
[n8n] Advanced URL Parsing and Shortening Workflow - Switchy.io Integration. Uses splitInBatches, stickyNote, httpRequest, html. Event-driven trigger; 56 nodes.
[](https://youtu.be/c7yCZhmMjtI)