{"id":105622,"date":"2025-05-23T14:29:40","date_gmt":"2025-05-23T07:29:40","guid":{"rendered":"https:\/\/wiki.tino.org\/?p=105622"},"modified":"2025-07-09T19:37:11","modified_gmt":"2025-07-09T12:37:11","slug":"cach-tao-sub-workflow-tren-n8n","status":"publish","type":"post","link":"https:\/\/tino.vn\/blog\/cach-tao-sub-workflow-tren-n8n\/","title":{"rendered":"H\u01b0\u1edbng d\u1eabn c\u00e1ch t\u1ea1o sub-workflow tr\u00ean n8n \u0111\u01a1n gi\u1ea3n"},"content":{"rendered":"\n<p><strong>Trong qu\u00e1 tr\u00ecnh x\u00e2y d\u1ef1ng c\u00e1c quy tr\u00ecnh t\u1ef1 \u0111\u1ed9ng h\u00f3a v\u1edbi <a href=\"https:\/\/tino.vn\/blog\/n8n-la-gi\/\" target=\"_blank\" data-type=\"post\" data-id=\"104774\" rel=\"noreferrer noopener\">n8n<\/a>, vi\u1ec7c t\u1ed5 ch\u1ee9c workflow m\u1ed9t c\u00e1ch r\u00f5 r\u00e0ng, linh ho\u1ea1t v\u00e0 d\u1ec5 qu\u1ea3n l\u00fd l\u00e0 v\u00f4 c\u00f9ng quan tr\u1ecdng. \u0110\u00e2y ch\u00ednh l\u00e0 l\u00fac sub-workflow ph\u00e1t huy t\u00e1c d\u1ee5ng m\u1ea1nh m\u1ebd. Thay v\u00ec nh\u1ed3i nh\u00e9t to\u00e0n b\u1ed9 logic v\u00e0o m\u1ed9t workflow duy nh\u1ea5t, b\u1ea1n ho\u00e0n to\u00e0n c\u00f3 th\u1ec3 chia nh\u1ecf ch\u00fang th\u00e0nh c\u00e1c sub-workflow \u0111\u1ec3 t\u00e1i s\u1eed d\u1ee5ng v\u00e0 b\u1ea3o tr\u00ec d\u1ec5 d\u00e0ng h\u01a1n. V\u1eady c\u00e1ch t\u1ea1o c\u00e1ch t\u1ea1o sub-workflow tr\u00ean n8n nh\u01b0 th\u1ebf n\u00e0o?<\/strong><\/p>\n\n\n\n<h2 id=\"Sub-workflow_n8n_l\u00e0_g\u00ec?\"><a id=\"post-105622-_kbmvkiwwbhb8\"><\/a><strong>Sub-workflow n8n l\u00e0 g\u00ec?<\/strong><\/h2>\n\n\n\n<p>Sub-workflow trong n8n l\u00e0 m\u1ed9t workflow con \u0111\u01b0\u1ee3c t\u1ea1o ri\u00eang bi\u1ec7t v\u00e0 c\u00f3 th\u1ec3 \u0111\u01b0\u1ee3c g\u1ecdi t\u1eeb m\u1ed9t workflow ch\u00ednh (main workflow) th\u00f4ng qua node &#8220;Execute Sub-Workflow&#8221;. Hi\u1ec3u \u0111\u01a1n gi\u1ea3n, sub-workflow gi\u1ed1ng nh\u01b0 m\u1ed9t \u201ch\u00e0m\u201d ho\u1eb7c \u201cmodule\u201d trong l\u1eadp tr\u00ecnh, cho ph\u00e9p b\u1ea1n t\u00e1ch bi\u1ec7t c\u00e1c ph\u1ea7n c\u00f4ng vi\u1ec7c ri\u00eang l\u1ebb \u0111\u1ec3 t\u00e1i s\u1eed d\u1ee5ng, qu\u1ea3n l\u00fd v\u00e0 b\u1ea3o tr\u00ec d\u1ec5 d\u00e0ng h\u01a1n.<\/p>\n\n\n\n<p>V\u00ed d\u1ee5:<\/p>\n\n\n\n<p>N\u1ebfu b\u1ea1n c\u00f3 m\u1ed9t workflow ch\u00ednh \u0111\u1ec3 t\u1ef1 \u0111\u1ed9ng h\u00f3a quy tr\u00ecnh g\u1eedi email marketing, b\u1ea1n c\u00f3 th\u1ec3 t\u1ea1o m\u1ed9t sub-workflow ri\u00eang \u0111\u1ec3 x\u1eed l\u00fd vi\u1ec7c l\u1ea5y d\u1eef li\u1ec7u kh\u00e1ch h\u00e0ng t\u1eeb <a href=\"https:\/\/tino.vn\/blog\/api-la-gi\/\" target=\"_blank\" data-type=\"post\" data-id=\"36281\" rel=\"noreferrer noopener\">API<\/a>, sau \u0111\u00f3 g\u1ecdi sub-workflow n\u00e0y trong workflow ch\u00ednh \u0111\u1ec3 t\u00e1i s\u1eed d\u1ee5ng \u1edf nhi\u1ec1u chi\u1ebfn d\u1ecbch kh\u00e1c nhau.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"700\" height=\"375\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/cach-tao-sub-workflow-tren-1.png\" alt=\"Sub-workflow n8n l\u00e0 g\u00ec?\" class=\"wp-image-105632\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/cach-tao-sub-workflow-tren-1.png 700w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/cach-tao-sub-workflow-tren-1-300x161.png 300w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><figcaption class=\"wp-element-caption\"><strong>Sub-workflow n8n l\u00e0 g\u00ec?<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<h3 id=\"T\u1ea1i_sao_n\u00ean_s\u1eed_d\u1ee5ng_sub-workflow_trong_n8n?\"><a id=\"post-105622-_rti05m2qfpks\"><\/a><strong>T\u1ea1i sao n\u00ean s\u1eed d\u1ee5ng sub-workflow trong n8n?<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>T\u00e1i s\u1eed d\u1ee5ng logic x\u1eed l\u00fd:<\/strong> Sub-workflow gi\u00fap b\u1ea1n kh\u00f4ng c\u1ea7n l\u1eb7p l\u1ea1i c\u00f9ng m\u1ed9t \u0111o\u1ea1n x\u1eed l\u00fd \u1edf nhi\u1ec1u n\u01a1i, ti\u1ebft ki\u1ec7m th\u1eddi gian v\u00e0 c\u00f4ng s\u1ee9c khi ph\u00e1t tri\u1ec3n.<\/li>\n\n\n\n<li><strong>T\u0103ng t\u00ednh modular (chia nh\u1ecf ch\u1ee9c n\u0103ng): <\/strong>Thay v\u00ec nh\u1ed3i nh\u00e9t to\u00e0n b\u1ed9 logic v\u00e0o m\u1ed9t workflow l\u1edbn, b\u1ea1n c\u00f3 th\u1ec3 chia nh\u1ecf th\u00e0nh c\u00e1c sub-workflow theo t\u1eebng ch\u1ee9c n\u0103ng, gi\u00fap workflow ch\u00ednh ng\u1eafn g\u1ecdn, r\u00f5 r\u00e0ng v\u00e0 d\u1ec5 \u0111\u1ecdc h\u01a1n.<\/li>\n\n\n\n<li><strong>D\u1ec5 d\u00e0ng b\u1ea3o tr\u00ec v\u00e0 n\u00e2ng c\u1ea5p: <\/strong>Khi c\u1ea7n ch\u1ec9nh s\u1eeda m\u1ed9t ph\u1ea7n logic, b\u1ea1n ch\u1ec9 c\u1ea7n s\u1eeda trong sub-workflow, c\u00e1c workflow kh\u00e1c g\u1ecdi t\u1edbi n\u00f3 s\u1ebd t\u1ef1 \u0111\u1ed9ng \u00e1p d\u1ee5ng phi\u00ean b\u1ea3n m\u1edbi.<\/li>\n\n\n\n<li><strong>T\u0103ng kh\u1ea3 n\u0103ng m\u1edf r\u1ed9ng h\u1ec7 th\u1ed1ng: <\/strong>Sub-workflow gi\u00fap b\u1ea1n x\u00e2y d\u1ef1ng m\u1ed9t h\u1ec7 th\u1ed1ng t\u1ef1 \u0111\u1ed9ng h\u00f3a c\u00f3 c\u1ea5u tr\u00fac r\u00f5 r\u00e0ng, d\u1ec5 m\u1edf r\u1ed9ng khi s\u1ed1 l\u01b0\u1ee3ng workflow ng\u00e0y c\u00e0ng nhi\u1ec1u ho\u1eb7c khi quy tr\u00ecnh tr\u1edf n\u00ean ph\u1ee9c t\u1ea1p h\u01a1n.<\/li>\n<\/ul>\n\n\n\n<h2 id=\"H\u01b0\u1edbng_d\u1eabn_c\u00e1ch_t\u1ea1o_sub-workflow_tr\u00ean_n8n\"><a id=\"post-105622-_53e8dvqnztnr\"><\/a><strong>H\u01b0\u1edbng d\u1eabn c\u00e1ch t\u1ea1o sub-workflow tr\u00ean n8n<\/strong><\/h2>\n\n\n\n<p><strong>B\u01b0\u1edbc 1: <\/strong>Truy c\u1eadp v\u00e0o n8n (b\u1ea3n Cloud ho\u1eb7c t\u1ef1 host tr\u00ean <a href=\"https:\/\/tino.vn\/blog\/dang-ky-vps-cai-san-n8n\/\" target=\"_blank\" data-type=\"post\" data-id=\"105289\" rel=\"noreferrer noopener\">VPS<\/a>)<\/p>\n\n\n\n<p><strong>B\u01b0\u1edbc 2: <\/strong>Nh\u1ea5n v\u00e0o n\u00fat <strong>Create workflow<\/strong> \u0111\u1ec3 t\u1ea1o m\u1ed9t workflow m\u1edbi v\u00e0 \u0111\u1eb7t t\u00ean l\u00e0 <strong>Sub-workflow<\/strong>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"1528\" height=\"787\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105622-3.png\" alt=\"C\u00e1ch t\u1ea1o sub-workflow tr\u00ean n8n\" class=\"wp-image-105625\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105622-3.png 1528w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105622-3-300x155.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105622-3-1024x527.png 1024w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105622-3-768x396.png 768w\" sizes=\"(max-width: 1528px) 100vw, 1528px\" \/><figcaption class=\"wp-element-caption\"><strong>C\u00e1ch t\u1ea1o sub-workflow tr\u00ean n8n<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<p><strong>B\u01b0\u1edbc 3: <\/strong>Th\u00eam trigger <strong>Execute Sub-Workflow <\/strong>v\u00e0 t\u1ea1m th\u1eddi \u0111\u1ec3 \u0111\u00f3.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"1100\" height=\"631\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105622-4.png\" alt=\"C\u00e1ch t\u1ea1o sub-workflow tr\u00ean n8n\" class=\"wp-image-105626\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105622-4.png 1100w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105622-4-300x172.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105622-4-1024x587.png 1024w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105622-4-768x441.png 768w\" sizes=\"(max-width: 1100px) 100vw, 1100px\" \/><figcaption class=\"wp-element-caption\"><strong>C\u00e1ch t\u1ea1o sub-workflow tr\u00ean n8n<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<p><strong>B\u01b0\u1edbc 4:<\/strong> M\u1edf workflow b\u1ea1n mu\u1ed1n l\u1ea5y c\u00e1c node \u0111\u1ec3 l\u00e0m sub-workflow (t\u1ea1m g\u1ecdi l\u00e0 workflow cha). Sau \u0111\u00f3, sao ch\u00e9p c\u00e1c node c\u1ea7n thi\u1ebft r\u1ed3i d\u00e1n v\u00e0o b\u00ean <strong>Sub-workflow.<\/strong><\/p>\n\n\n\n<p><strong>V\u00ed d\u1ee5:<\/strong> Tino s\u1ebd sao ch\u00e9p v\u00e0 d\u00e1n nh\u00f3m node<strong> Ti\u00eau \u0111\u1ec1 m\u00f4 t\u1ea3, prompt h\u00ecnh \u1ea3nh<\/strong> c\u1ee7a m\u1ed9t workflow vi\u1ebft b\u00e0i SEO \u0111\u0103ng website (workflow cha).<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"1814\" height=\"904\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105622-5.png\" alt=\"C\u00e1ch t\u1ea1o sub-workflow tr\u00ean n8n\" class=\"wp-image-105627\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105622-5.png 1814w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105622-5-300x150.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105622-5-1024x510.png 1024w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105622-5-768x383.png 768w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105622-5-1536x765.png 1536w\" sizes=\"(max-width: 1814px) 100vw, 1814px\" \/><figcaption class=\"wp-element-caption\"><strong>C\u00e1ch t\u1ea1o sub-workflow tr\u00ean n8n<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"1392\" height=\"734\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105622-6.png\" alt=\"C\u00e1ch t\u1ea1o sub-workflow tr\u00ean n8n\" class=\"wp-image-105628\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105622-6.png 1392w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105622-6-300x158.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105622-6-1024x540.png 1024w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105622-6-768x405.png 768w\" sizes=\"(max-width: 1392px) 100vw, 1392px\" \/><figcaption class=\"wp-element-caption\"><strong>C\u00e1ch t\u1ea1o sub-workflow tr\u00ean n8n<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<p><strong>B\u01b0\u1edbc 5:<\/strong> Sao khi d\u00e1n c\u00e1c node v\u00e0o Sub-workflow, b\u1ea1n quay l\u1ea1i workflow cha v\u00e0 x\u00f3a nh\u00f3m node <strong>Ti\u00eau \u0111\u1ec1 m\u00f4 t\u1ea3, prompt h\u00ecnh \u1ea3nh <\/strong>v\u00e0 th\u00eam m\u1ed9t node <strong>Execute Sub-Workflow <\/strong>v\u00e0 c\u1ea5u h\u00ecnh nh\u01b0 sau:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Source<\/strong>: Database<\/li>\n\n\n\n<li><strong>Workflow:<\/strong> Ch\u1ecdn <strong>Form list<\/strong> r\u1ed3i t\u00ecm workflow c\u00f3 t\u00ean l\u00e0 <strong>Sub-workflow<\/strong> b\u1ea1n \u0111\u00e3 t\u1ea1o l\u00fac n\u00e3y.<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"1826\" height=\"911\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105622-7.png\" alt=\"C\u00e1ch t\u1ea1o sub-workflow tr\u00ean n8n\" class=\"wp-image-105629\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105622-7.png 1826w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105622-7-300x150.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105622-7-1024x511.png 1024w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105622-7-768x383.png 768w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105622-7-1536x766.png 1536w\" sizes=\"(max-width: 1826px) 100vw, 1826px\" \/><figcaption class=\"wp-element-caption\"><strong>C\u00e1ch t\u1ea1o sub-workflow tr\u00ean n8n<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<p>Nh\u01b0 v\u1eady, nh\u00f3m node Ti\u00eau \u0111\u1ec1 m\u00f4 t\u1ea3, prompt h\u00ecnh \u1ea3nh \u0111\u00e3 \u0111\u01b0\u1ee3c g\u1ed9p l\u1ea1i trong m\u1ed9t node <strong>Sub-workflow <\/strong>duy nh\u1ea5t. B\u1ea1n ch\u1ec9 c\u1ea7n k\u00e9o \u0111\u1ec3 k\u1ebft n\u1ed1i l\u1ea1i v\u1edbi c\u00e1c nh\u00f3m node kh\u00e1c trong workflow l\u00e0 \u0111\u01b0\u1ee3c.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"1550\" height=\"799\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105622-8.png\" alt=\"C\u00e1ch t\u1ea1o sub-workflow tr\u00ean n8n\" class=\"wp-image-105630\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105622-8.png 1550w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105622-8-300x155.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105622-8-1024x528.png 1024w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105622-8-768x396.png 768w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105622-8-1536x792.png 1536w\" sizes=\"(max-width: 1550px) 100vw, 1550px\" \/><figcaption class=\"wp-element-caption\"><strong>C\u00e1ch t\u1ea1o sub-workflow tr\u00ean n8n<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<p><strong>B\u01b0\u1edbc 6:<\/strong> V\u1ec1 ph\u00eda sub-workflow. B\u1ea1n c\u1ea7n c\u0169ng c\u1ea7n c\u1ea5u cho node trigger.<\/p>\n\n\n\n<p>\u1ede m\u1ee5c Input data mode, b\u1ea1n c\u00f3 th\u1ec3 ch\u1ecdn:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Accept all data (Ch\u1ea5p nh\u1eadn to\u00e0n b\u1ed9 d\u1eef li\u1ec7u): <\/strong>D\u00f9ng khi b\u1ea1n mu\u1ed1n node nh\u1eadn to\u00e0n b\u1ed9 d\u1eef li\u1ec7u t\u1eeb workflow cha, kh\u00f4ng c\u1ea7n \u0111\u1ecbnh ngh\u0129a tr\u01b0\u1edbc c\u1ea5u tr\u00fac.<\/li>\n\n\n\n<li><strong>Define using fields below (X\u00e1c \u0111\u1ecbnh theo tr\u01b0\u1eddng b\u00ean d\u01b0\u1edbi): <\/strong>D\u00f9ng khi b\u1ea1n mu\u1ed1n \u0111\u1ecbnh ngh\u0129a tr\u01b0\u1edbc t\u00ean v\u00e0 ki\u1ec3u d\u1eef li\u1ec7u m\u00e0 node n\u00e0y s\u1ebd nh\u1eadn. Ph\u00f9 h\u1ee3p khi b\u1ea1n c\u1ea7n ki\u1ec3m so\u00e1t d\u1eef li\u1ec7u \u0111\u1ea7u v\u00e0o ch\u1eb7t ch\u1ebd.<\/li>\n\n\n\n<li><strong>Define using JSON example (X\u00e1c \u0111\u1ecbnh t\u1eeb v\u00ed d\u1ee5 JSON): <\/strong>Cho ph\u00e9p b\u1ea1n d\u00e1n v\u00e0o m\u1ed9t v\u00ed d\u1ee5 JSON, t\u1eeb \u0111\u00f3 n8n s\u1ebd t\u1ef1 t\u1ea1o ra schema ph\u00f9 h\u1ee3p.<\/li>\n<\/ul>\n\n\n\n<p>N\u1ebfu b\u1ea1n ch\u1eafc ch\u1eafn workflow cha s\u1ebd g\u1eedi \u0111\u00fang v\u00e0 \u0111\u1ea7y \u0111\u1ee7 d\u1eef li\u1ec7u ho\u1eb7c mu\u1ed1n t\u00e1i s\u1eed d\u1ee5ng sub-workflow cho nhi\u1ec1u m\u1ee5c \u0111\u00edch kh\u00e1c nhau, h\u00e3y ch\u1ecdn <strong>Accept all data.<\/strong><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"1417\" height=\"796\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105622-9.png\" alt=\"C\u00e1ch t\u1ea1o sub-workflow tr\u00ean n8n\" class=\"wp-image-105631\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105622-9.png 1417w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105622-9-300x169.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105622-9-1024x575.png 1024w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105622-9-768x431.png 768w\" sizes=\"(max-width: 1417px) 100vw, 1417px\" \/><figcaption class=\"wp-element-caption\"><strong>C\u00e1ch t\u1ea1o sub-workflow tr\u00ean n8n<\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<p>\u0110\u1ebfn \u0111\u00e2y, coi nh\u01b0 b\u1ea1n \u0111\u00e3 t\u1ea1o th\u00e0nh c\u00f4ng sub-workflow. Sau khi, c\u00f3 nhu c\u1ea7u c\u1eadp nh\u1eadt c\u00e1c node, b\u1ea1n kh\u00f4ng c\u1ea7n th\u1ef1c hi\u1ec7n tr\u00ean workflow cha m\u00e0 c\u00f3 th\u1ec3 thao t\u00e1c trong sub-workflow, workflow cha s\u1ebd t\u1ef1 c\u1eadp nh\u1eadt ch\u00ednh x\u00e1c.<\/p>\n\n\n\n<p>Ho\u1eb7c trong tr\u01b0\u1eddng h\u1ee3p b\u1ea1n mu\u1ed1n s\u1eed d\u1ee5ng l\u1ea1i nh\u00f3m node \u0111\u00f3 m\u00e0 kh\u00f4ng nh\u1edb tr\u01b0\u1edbc \u0111\u00e2y b\u1ea1n \u0111\u00e3 c\u1ea5u h\u00ecnh nh\u01b0 th\u1ebf n\u00e0o, h\u00e3y t\u1ea1o sub-workflow.<\/p>\n\n\n\n<h3 id=\"K\u1ebft_lu\u1eadn\"><a id=\"post-105622-_5a1cz9durlqt\"><\/a><strong>K\u1ebft lu\u1eadn<\/strong><\/h3>\n\n\n\n<p>T\u00f3m l\u1ea1i, vi\u1ec7c t\u1ea1o sub-workflow tr\u00ean n8n s\u1ebd tr\u1edf n\u00ean \u0111\u01a1n gi\u1ea3n v\u00e0 hi\u1ec7u qu\u1ea3 h\u01a1n n\u1ebfu b\u1ea1n chu\u1ea9n b\u1ecb \u0111\u00fang c\u00e1c \u0111i\u1ec1u ki\u1ec7n v\u00e0 l\u01b0u \u00fd c\u1ea7n thi\u1ebft. \u0110\u00e2y l\u00e0 m\u1ed9t ph\u01b0\u01a1ng ph\u00e1p t\u1ed1i \u01b0u h\u00f3a quy tr\u00ecnh t\u1ef1 \u0111\u1ed9ng h\u00f3a c\u1ef1c k\u1ef3 m\u1ea1nh m\u1ebd v\u00e0 linh ho\u1ea1t, \u0111\u1eb7c bi\u1ec7t trong c\u00e1c h\u1ec7 th\u1ed1ng c\u00f3 nhi\u1ec1u lu\u1ed3ng x\u1eed l\u00fd l\u1eb7p l\u1ea1i ho\u1eb7c ph\u1ee9c t\u1ea1p.<\/p>\n\n\n\n<h2 id=\"Nh\u1eefng_c\u00e2u_h\u1ecfi_th\u01b0\u1eddng_g\u1eb7p\"><a id=\"post-105622-_7pc992xld4xq\"><\/a><strong>Nh\u1eefng c\u00e2u h\u1ecfi th\u01b0\u1eddng g\u1eb7p<\/strong><\/h2>\n\n\n\t\t<section\t\thelp class=\"sc_fs_faq sc_card    \"\n\t\t\t\t>\n\t\t\t\t<h2 id=\"Sub-workflow_c\u00f3_th\u1ef1c_thi_song_song_\u0111\u01b0\u1ee3c_kh\u00f4ng?\">Sub-workflow c\u00f3 th\u1ef1c thi song song \u0111\u01b0\u1ee3c kh\u00f4ng?<\/h2>\t\t\t\t<div>\n\t\t\t\t\t\t<div class=\"sc_fs_faq__content\">\n\t\t\t\t\n\n<p>C\u00f3. N\u1ebfu workflow cha g\u1ecdi nhi\u1ec1u l\u1ea7n node Execute Workflow (m\u1ed7i l\u1ea7n v\u1edbi d\u1eef li\u1ec7u kh\u00e1c nhau), c\u00e1c sub-workflow c\u00f3 th\u1ec3 ch\u1ea1y song song. Tuy nhi\u00ean, c\u1ea7n ki\u1ec3m so\u00e1t s\u1ed1 l\u01b0\u1ee3ng phi\u00ean b\u1ea3n \u0111\u1ec3 tr\u00e1nh v\u01b0\u1ee3t qu\u00e1 t\u00e0i nguy\u00ean h\u1ec7 th\u1ed1ng.<\/p>\n\n\t\t\t<\/div>\n\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section\t\thelp class=\"sc_fs_faq sc_card    \"\n\t\t\t\t>\n\t\t\t\t<h2 id=\"L\u00e0m_sao_qu\u1ea3n_l\u00fd_v\u00e0_t\u1ed5_ch\u1ee9c_nhi\u1ec1u_sub-workflow_hi\u1ec7u_qu\u1ea3?\">L\u00e0m sao qu\u1ea3n l\u00fd v\u00e0 t\u1ed5 ch\u1ee9c nhi\u1ec1u sub-workflow hi\u1ec7u qu\u1ea3?<\/h2>\t\t\t\t<div>\n\t\t\t\t\t\t<div class=\"sc_fs_faq__content\">\n\t\t\t\t\n\n<ul class=\"wp-block-list\">\n<li>\u0110\u1ec3 qu\u1ea3n l\u00fd sub-workflow hi\u1ec7u qu\u1ea3, b\u1ea1n n\u00ean:<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u0110\u1eb7t t\u00ean c\u00f3 quy t\u1eafc, v\u00ed d\u1ee5: sub-parse-email, sub-generate-report,\u2026<\/li>\n\n\n\n<li>G\u1eafn tag cho c\u00e1c workflow ph\u1ee5 (sub, utility, reusable,\u2026).<\/li>\n\n\n\n<li>Vi\u1ebft m\u00f4 t\u1ea3 r\u00f5 r\u00e0ng \u1edf ph\u1ea7n Settings \u0111\u1ec3 ng\u01b0\u1eddi kh\u00e1c d\u1ec5 hi\u1ec3u ch\u1ee9c n\u0103ng c\u1ee7a t\u1eebng sub-workflow.<\/li>\n<\/ul>\n\n\t\t\t<\/div>\n\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section\t\thelp class=\"sc_fs_faq sc_card    \"\n\t\t\t\t>\n\t\t\t\t<h2 id=\"Sub-workflow_c\u00f3_th\u1ec3_d\u00f9ng_c\u00e1c_credential_ri\u00eang_kh\u00f4ng?\">Sub-workflow c\u00f3 th\u1ec3 d\u00f9ng c\u00e1c credential ri\u00eang kh\u00f4ng?<\/h2>\t\t\t\t<div>\n\t\t\t\t\t\t<div class=\"sc_fs_faq__content\">\n\t\t\t\t\n\n<p>C\u00f3. M\u1ed7i workflow (k\u1ec3 c\u1ea3 workflow con) c\u00f3 th\u1ec3 d\u00f9ng credentials \u0111\u1ed9c l\u1eadp. Tuy nhi\u00ean, b\u1ea1n n\u00ean qu\u1ea3n l\u00fd credentials nh\u1ea5t qu\u00e1n gi\u1eefa c\u00e1c workflow \u0111\u1ec3 tr\u00e1nh l\u1ed7i truy c\u1eadp.<\/p>\n\n\t\t\t<\/div>\n\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section\t\thelp class=\"sc_fs_faq sc_card    \"\n\t\t\t\t>\n\t\t\t\t<h2 id=\"Sub-workflow_c\u00f3_th\u1ec3_ch\u1ee9a_sub-workflow_kh\u00e1c_kh\u00f4ng?\">Sub-workflow c\u00f3 th\u1ec3 ch\u1ee9a sub-workflow kh\u00e1c kh\u00f4ng?<\/h2>\t\t\t\t<div>\n\t\t\t\t\t\t<div class=\"sc_fs_faq__content\">\n\t\t\t\t\n\n<p>C\u00f3 th\u1ec3. n8n h\u1ed7 tr\u1ee3 l\u1ed3ng nhi\u1ec1u c\u1ea5p sub-workflow. Tuy nhi\u00ean, n\u00ean h\u1ea1n ch\u1ebf \u0111\u1ed9 s\u00e2u qu\u00e1 l\u1edbn \u0111\u1ec3 tr\u00e1nh kh\u00f3 debug v\u00e0 t\u0103ng \u0111\u1ed9 ph\u1ee9c t\u1ea1p.<\/p>\n\n\t\t\t<\/div>\n\t\t<\/div>\n\t\t<\/section>\n\t\t\n<script type=\"application\/ld+json\">\n\t{\n\t\t\"@context\": \"https:\/\/schema.org\",\n\t\t\"@type\": \"FAQPage\",\n\t\t\"mainEntity\": [\n\t\t\t\t\t{\n\t\t\t\t\"@type\": \"Question\",\n\t\t\t\t\"name\": \"Sub-workflow c\u00f3 th\u1ef1c thi song song \u0111\u01b0\u1ee3c kh\u00f4ng?\",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"<p>C\u00f3. N\u1ebfu workflow cha g\u1ecdi nhi\u1ec1u l\u1ea7n node Execute Workflow (m\u1ed7i l\u1ea7n v\u1edbi d\u1eef li\u1ec7u kh\u00e1c nhau), c\u00e1c sub-workflow c\u00f3 th\u1ec3 ch\u1ea1y song song. Tuy nhi\u00ean, c\u1ea7n ki\u1ec3m so\u00e1t s\u1ed1 l\u01b0\u1ee3ng phi\u00ean b\u1ea3n \u0111\u1ec3 tr\u00e1nh v\u01b0\u1ee3t qu\u00e1 t\u00e0i nguy\u00ean h\u1ec7 th\u1ed1ng.<\/p>\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\t,\t\t\t\t{\n\t\t\t\t\"@type\": \"Question\",\n\t\t\t\t\"name\": \"L\u00e0m sao qu\u1ea3n l\u00fd v\u00e0 t\u1ed5 ch\u1ee9c nhi\u1ec1u sub-workflow hi\u1ec7u qu\u1ea3?\",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"<ul><li>\u0110\u1ec3 qu\u1ea3n l\u00fd sub-workflow hi\u1ec7u qu\u1ea3, b\u1ea1n n\u00ean:<\/li><\/ul><ul><li>\u0110\u1eb7t t\u00ean c\u00f3 quy t\u1eafc, v\u00ed d\u1ee5: sub-parse-email, sub-generate-report,\u2026<\/li><li>G\u1eafn tag cho c\u00e1c workflow ph\u1ee5 (sub, utility, reusable,\u2026).<\/li><li>Vi\u1ebft m\u00f4 t\u1ea3 r\u00f5 r\u00e0ng \u1edf ph\u1ea7n Settings \u0111\u1ec3 ng\u01b0\u1eddi kh\u00e1c d\u1ec5 hi\u1ec3u ch\u1ee9c n\u0103ng c\u1ee7a t\u1eebng sub-workflow.<\/li><\/ul>\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\t,\t\t\t\t{\n\t\t\t\t\"@type\": \"Question\",\n\t\t\t\t\"name\": \"Sub-workflow c\u00f3 th\u1ec3 d\u00f9ng c\u00e1c credential ri\u00eang kh\u00f4ng?\",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"<p>C\u00f3. M\u1ed7i workflow (k\u1ec3 c\u1ea3 workflow con) c\u00f3 th\u1ec3 d\u00f9ng credentials \u0111\u1ed9c l\u1eadp. Tuy nhi\u00ean, b\u1ea1n n\u00ean qu\u1ea3n l\u00fd credentials nh\u1ea5t qu\u00e1n gi\u1eefa c\u00e1c workflow \u0111\u1ec3 tr\u00e1nh l\u1ed7i truy c\u1eadp.<\/p>\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\t,\t\t\t\t{\n\t\t\t\t\"@type\": \"Question\",\n\t\t\t\t\"name\": \"Sub-workflow c\u00f3 th\u1ec3 ch\u1ee9a sub-workflow kh\u00e1c kh\u00f4ng?\",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"<p>C\u00f3 th\u1ec3. n8n h\u1ed7 tr\u1ee3 l\u1ed3ng nhi\u1ec1u c\u1ea5p sub-workflow. Tuy nhi\u00ean, n\u00ean h\u1ea1n ch\u1ebf \u0111\u1ed9 s\u00e2u qu\u00e1 l\u1edbn \u0111\u1ec3 tr\u00e1nh kh\u00f3 debug v\u00e0 t\u0103ng \u0111\u1ed9 ph\u1ee9c t\u1ea1p.<\/p>\"\n\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\t\t\t\t]\n\t}\n<\/script>\n","protected":false},"excerpt":{"rendered":"<p>Trong qu\u00e1 tr\u00ecnh x\u00e2y d\u1ef1ng c\u00e1c quy tr\u00ecnh t\u1ef1 \u0111\u1ed9ng h\u00f3a v\u1edbi n8n, vi\u1ec7c t\u1ed5 ch\u1ee9c workflow m\u1ed9t c\u00e1ch r\u00f5 r\u00e0ng, linh ho\u1ea1t v\u00e0 d\u1ec5 qu\u1ea3n l\u00fd l\u00e0 v\u00f4 c\u00f9ng quan tr\u1ecdng. \u0110\u00e2y ch\u00ednh l\u00e0 l\u00fac sub-workflow ph\u00e1t huy t\u00e1c d\u1ee5ng m\u1ea1nh m\u1ebd. Thay v\u00ec nh\u1ed3i nh\u00e9t to\u00e0n b\u1ed9 logic v\u00e0o m\u1ed9t workflow duy nh\u1ea5t, [&hellip;]<\/p>\n","protected":false},"author":23,"featured_media":105633,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7397],"tags":[7343],"class_list":["post-105622","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-n8n","tag-n8n"],"_links":{"self":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/posts\/105622","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/users\/23"}],"replies":[{"embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/comments?post=105622"}],"version-history":[{"count":3,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/posts\/105622\/revisions"}],"predecessor-version":[{"id":117302,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/posts\/105622\/revisions\/117302"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/media\/105633"}],"wp:attachment":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/media?parent=105622"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/categories?post=105622"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/tags?post=105622"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}