This workflow corresponds to n8n.io template #15843 — 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": "3paW6nBFTyHreR6M",
"name": "Search Taobao and Tmall products and get first product detail with JustOneAPI",
"tags": [],
"nodes": [
{
"id": "65496128-c0f4-47a1-93e5-2b9fa38955c6",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
4064,
544
],
"parameters": {
"width": 480,
"height": 656,
"content": "## Search Taobao and Tmall products and get first product detail with JustOneAPI\n\n### How it works\n\n1. The workflow is manually triggered to start the process.\n2. API and research inputs are prepared for the search query.\n3. A search request is made to Taobao and Tmall for products matching the keyword.\n4. Item IDs are extracted from the search results.\n5. Product details are fetched for the first item using its ID.\n6. The product details are processed and formatted for output.\n7. The final product detail data is outputted.\n\n### Setup steps\n\n- - [ ] Obtain API credentials for JustOneAPI and configure them in the workflow.\n- - [ ] Set up the base URL for the JustOneAPI in the 'Prepare API and Research Inputs' node.\n- - [ ] Ensure the 'Search Taobao and Tmall Products by Keyword' node has the correct endpoint for searching products.\n- - [ ] Verify the 'Fetch Taobao and Tmall Product Details' node has the correct endpoint for fetching product details.\n\n### Customization\n\nThe workflow can be customized by changing the search keyword in the 'Prepare API and Research Inputs' node or by modifying the endpoints in the HTTP request nodes to use different API functionalities."
},
"typeVersion": 1
},
{
"id": "09edc3b5-ff32-4874-a016-50b2220fae3c",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
4624,
544
],
"parameters": {
"color": 7,
"height": 112,
"content": "## Workflow Trigger\n\nManually initiates the workflow execution."
},
"typeVersion": 1
},
{
"id": "45a39424-bf27-4f66-a369-1422350e772c",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
4896,
544
],
"parameters": {
"color": 7,
"width": 272,
"height": 112,
"content": "## Prepare Search Inputs\n\nConfigures the API and prepares the search parameters."
},
"typeVersion": 1
},
{
"id": "7f319146-1a9b-4416-a6d0-9f1cd87e10a1",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
5184,
544
],
"parameters": {
"color": 7,
"width": 544,
"height": 96,
"content": "## Search Products\n\nSends a request to search Taobao and Tmall for products."
},
"typeVersion": 1
},
{
"id": "900b8c3a-522d-46d1-82f8-5e2fbf806023",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
5872,
544
],
"parameters": {
"color": 7,
"width": 496,
"height": 96,
"content": "## Extract Item IDs\n\nProcesses search results to extract item IDs for further queries."
},
"typeVersion": 1
},
{
"id": "49f4bf18-ea1a-4b4b-8045-ed62f1289300",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
6416,
544
],
"parameters": {
"color": 7,
"height": 128,
"content": "## Fetch Product Details\n\nRetrieves detailed information for the first product using its ID."
},
"typeVersion": 1
},
{
"id": "493c7c89-c2a5-4f17-8437-8b32f007c5bc",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
6688,
544
],
"parameters": {
"color": 7,
"width": 672,
"height": 80,
"content": "## Process Product Data\n\nFormats the fetched product details for the final output."
},
"typeVersion": 1
},
{
"id": "164d432c-e485-4b4b-a0a3-17661e62b3cd",
"name": "Start Workflow Manually",
"type": "n8n-nodes-base.manualTrigger",
"position": [
4672,
704
],
"parameters": {},
"typeVersion": 1
},
{
"id": "d21addce-0761-4e2e-97bc-3e373c3a3409",
"name": "Set API and Search Parameters",
"type": "n8n-nodes-base.set",
"position": [
4944,
704
],
"parameters": {
"mode": "raw",
"options": {},
"jsonOutput": "{\n \"baseUrl\": \"https://api.justoneapi.com\",\n \"token\": \"YOUR_JUSTONEAPI_TOKEN\",\n \"keyword\": \"YOUR_PRODUCT_KEYWORD\",\n \"sort\": \"_sale\",\n \"tmall\": false,\n \"startPrice\": \"\",\n \"endPrice\": \"\",\n \"page\": 1,\n \"maxItems\": 1\n}"
},
"typeVersion": 3.4
},
{
"id": "9f815e52-c543-4833-b05d-ab771e3b88bc",
"name": "Search Taobao/Tmall Products",
"type": "n8n-nodes-base.httpRequest",
"position": [
5232,
704
],
"parameters": {
"url": "={{$json.baseUrl + '/api/taobao/search-item-list/v1'}}",
"options": {
"redirect": {
"redirect": {}
}
},
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "token",
"value": "={{$json.token}}"
},
{
"name": "keyword",
"value": "={{$json.keyword}}"
},
{
"name": "sort",
"value": "={{$json.sort}}"
},
{
"name": "tmall",
"value": "={{$json.tmall}}"
},
{
"name": "startPrice",
"value": "={{$json.startPrice}}"
},
{
"name": "endPrice",
"value": "={{$json.endPrice}}"
},
{
"name": "page",
"value": "={{$json.page}}"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "a1e79045-c403-43eb-8b38-e07e67b1674c",
"name": "Store Search Results Data",
"type": "n8n-nodes-base.set",
"position": [
5568,
928
],
"parameters": {
"mode": "raw",
"options": {},
"jsonOutput": "={{$json}}"
},
"typeVersion": 3.4
},
{
"id": "e5323430-5896-4f33-8dee-d95b5288e398",
"name": "Extract Product IDs from Results",
"type": "n8n-nodes-base.code",
"position": [
5920,
704
],
"parameters": {
"jsCode": "const cfg = $('Set API and Search Parameters').first().json;\nconst maxItems = Math.max(1, Number(cfg.maxItems || 1));\nconst token = cfg.token;\nconst baseUrl = cfg.baseUrl;\nconst keyword = cfg.keyword;\n\n// Real tested search-item-list/v1 response path:\n// root.data.model.itemList[]\nconst rows = $input.all();\nconst selectedProducts = [];\n\nfor (const row of rows) {\n const itemList = row.json?.data?.model?.itemList;\n\n if (!Array.isArray(itemList)) {\n continue;\n }\n\n for (const product of itemList) {\n const itemId = product?.itemId;\n\n if (itemId !== undefined && itemId !== null && String(itemId).trim() !== '') {\n selectedProducts.push(product);\n }\n }\n}\n\nconst limitedProducts = selectedProducts.slice(0, maxItems);\n\nreturn limitedProducts.map((product, index) => ({\n json: {\n baseUrl,\n token,\n keyword,\n itemId: String(product.itemId),\n itemRank: index + 1,\n selectedBy: 'search-item-list-v1:data.model.itemList',\n searchProduct: {\n itemId: product.itemId ?? '',\n itemName: product.itemName || '',\n itemSubName: product.itemSubName || '',\n itemType: product.itemType || '',\n priceYuanDouble: product.priceYuanDouble ?? null,\n priceZKYuanDouble: product.priceZKYuanDouble ?? null,\n discntPriceYuan: product.discntPriceYuan ?? null,\n discntType: product.discntType || '',\n orderPayUV: product.orderPayUV || '',\n frontStock: product.frontStock ?? null,\n shopId: product.shopId ?? '',\n shopName: product.shopName || '',\n sellerLoc: product.sellerLoc || '',\n itemLoc: product.itemLoc || '',\n picUrlFull: product.picUrlFull || '',\n picUrlList: Array.isArray(product.picUrlList) ? product.picUrlList : [],\n raw: product\n }\n }\n}));\n"
},
"typeVersion": 2
},
{
"id": "3cb523ce-447a-432c-9c3c-a3707ef12476",
"name": "Store Extracted Product IDs",
"type": "n8n-nodes-base.set",
"position": [
6240,
928
],
"parameters": {
"mode": "raw",
"options": {},
"jsonOutput": "={{$json}}"
},
"typeVersion": 3.4
},
{
"id": "c57454eb-a203-4b35-bd30-59d0d2b1dfba",
"name": "Fetch Product Details by ID",
"type": "n8n-nodes-base.httpRequest",
"position": [
6464,
704
],
"parameters": {
"url": "={{$json.baseUrl + '/api/taobao/get-item-detail/v4'}}",
"options": {
"redirect": {
"redirect": {}
}
},
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "token",
"value": "={{$json.token}}"
},
{
"name": "itemId",
"value": "={{$json.itemId}}"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "ccbda16f-b4a7-4dc0-8d77-8dfe6cbdfa39",
"name": "Build Product Detail Output",
"type": "n8n-nodes-base.code",
"position": [
6736,
704
],
"parameters": {
"jsCode": "const rows = $input.all();\nconst cfg = $('Set API and Search Parameters').first().json;\nconst selectedRows = $('Extract Product IDs from Results').all();\n\nfunction toNumberOrNull(value) {\n if (value === undefined || value === null || value === '') return null;\n const num = Number(value);\n return Number.isFinite(num) ? num : null;\n}\n\nfunction fenToYuan(value) {\n const num = toNumberOrNull(value);\n return num === null ? null : num / 100;\n}\n\nreturn rows.map((item, index) => {\n const root = item.json || {};\n const detail = root.data || {};\n const selected = selectedRows[index]?.json || {};\n const searchProduct = selected.searchProduct || {};\n\n const skus = Array.isArray(detail.sku2info) ? detail.sku2info : [];\n const skuProperties = Array.isArray(detail.skuBase) ? detail.skuBase : [];\n\n const cleanedSkus = skus.map(sku => ({\n skuId: sku.skuId || '',\n skuName: sku.skuName || '',\n skuPicUrl: sku.skuPicUrl || '',\n itemPriceFen: sku.itemPrice ?? null,\n itemPriceYuan: fenToYuan(sku.itemPrice),\n finalSkuPriceFen: sku.finalSkuPrice ?? null,\n finalSkuPriceYuan: fenToYuan(sku.finalSkuPrice),\n finalPriceFen: sku.finalPrice ?? null,\n finalPriceYuan: fenToYuan(sku.finalPrice),\n thirdOriginalDiscountPriceFen: sku.thirdOriginalDiscountPrice ?? null,\n thirdOriginalDiscountPriceYuan: fenToYuan(sku.thirdOriginalDiscountPrice),\n stock: sku.stock ?? '',\n valueList: Array.isArray(sku.valueList) ? sku.valueList : []\n }));\n\n const finalSkuPrices = cleanedSkus\n .map(sku => sku.finalSkuPriceFen)\n .filter(value => typeof value === 'number');\n\n const totalStock = cleanedSkus.reduce((sum, sku) => {\n const stockNum = Number(sku.stock);\n return Number.isFinite(stockNum) ? sum + stockNum : sum;\n }, 0);\n\n const cleanedSkuProperties = skuProperties.map(property => ({\n propertyId: property.propertyId || '',\n propertyName: property.propertyName || '',\n values: Array.isArray(property.itemPropertyValues)\n ? property.itemPropertyValues.map(value => ({\n valueId: value.valueId || '',\n value: value.value || '',\n pic: value.pic || '',\n badge: value.badge ?? null\n }))\n : []\n }));\n\n return {\n json: {\n requestedKeyword: cfg.keyword || '',\n searchEndpoint: '/api/taobao/search-item-list/v1',\n detailEndpoint: '/api/taobao/get-item-detail/v4',\n selectedItemId: selected.itemId || String(detail.itemId || ''),\n selectedBy: selected.selectedBy || '',\n product: {\n itemId: detail.itemId ?? '',\n title: detail.title || '',\n itemPic: detail.itemPic || '',\n images: Array.isArray(detail.images) ? detail.images : [],\n itemPriceFen: detail.itemPrice ?? null,\n itemPriceYuan: fenToYuan(detail.itemPrice),\n discountPriceFen: detail.DiscountPrice ?? null,\n discountPriceYuan: fenToYuan(detail.DiscountPrice),\n shopName: detail.shopName || '',\n shopType: detail.shopType || ''\n },\n skuSummary: {\n skuCount: cleanedSkus.length,\n skuPropertyCount: cleanedSkuProperties.length,\n minFinalSkuPriceFen: finalSkuPrices.length ? Math.min(...finalSkuPrices) : null,\n minFinalSkuPriceYuan: finalSkuPrices.length ? Math.min(...finalSkuPrices) / 100 : null,\n maxFinalSkuPriceFen: finalSkuPrices.length ? Math.max(...finalSkuPrices) : null,\n maxFinalSkuPriceYuan: finalSkuPrices.length ? Math.max(...finalSkuPrices) / 100 : null,\n totalStock\n },\n skus: cleanedSkus,\n skuProperties: cleanedSkuProperties,\n searchSourceProduct: searchProduct,\n raw: root\n }\n };\n});\n"
},
"typeVersion": 2
},
{
"id": "b579cdbf-f852-46a3-8319-eab65a5bb236",
"name": "Store Final Product Details",
"type": "n8n-nodes-base.set",
"position": [
7216,
704
],
"parameters": {
"mode": "raw",
"options": {},
"jsonOutput": "={{$json}}"
},
"typeVersion": 3.4
}
],
"active": false,
"settings": {
"binaryMode": "separate",
"executionOrder": "v1"
},
"versionId": "a7613855-2084-4454-a5b6-8eb5cc0e0905",
"connections": {
"Start Workflow Manually": {
"main": [
[
{
"node": "Set API and Search Parameters",
"type": "main",
"index": 0
}
]
]
},
"Build Product Detail Output": {
"main": [
[
{
"node": "Store Final Product Details",
"type": "main",
"index": 0
}
]
]
},
"Fetch Product Details by ID": {
"main": [
[
{
"node": "Build Product Detail Output",
"type": "main",
"index": 0
}
]
]
},
"Search Taobao/Tmall Products": {
"main": [
[
{
"node": "Store Search Results Data",
"type": "main",
"index": 0
},
{
"node": "Extract Product IDs from Results",
"type": "main",
"index": 0
}
]
]
},
"Set API and Search Parameters": {
"main": [
[
{
"node": "Search Taobao/Tmall Products",
"type": "main",
"index": 0
}
]
]
},
"Extract Product IDs from Results": {
"main": [
[
{
"node": "Store Extracted Product IDs",
"type": "main",
"index": 0
},
{
"node": "Fetch Product Details by ID",
"type": "main",
"index": 0
}
]
]
}
}
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Use this workflow to search Taobao and Tmall products by keyword, extract product IDs from the returned search results, and fetch product detail data for the first selected product with JustOneAPI.
Source: https://n8n.io/workflows/15843/ — 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)