{"id":105622,"date":"2025-05-23T14:29:40","date_gmt":"2025-05-23T07:29:40","guid":{"rendered":"https:\/\/wiki.tino.org\/?p=105622"},"modified":"2026-10-23T18:29:54","modified_gmt":"2026-10-23T11:29:54","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 class=\"wp-block-paragraph\"><strong>Sub-workflow<\/strong> trong n8n l\u00e0 m\u1ed9t workflow con b\u1eaft \u0111\u1ea7u b\u1eb1ng trigger Execute Sub-workflow Trigger v\u00e0 \u0111\u01b0\u1ee3c workflow ch\u00ednh g\u1ecdi qua node Execute Sub-workflow. C\u00e1ch nhanh nh\u1ea5t \u0111\u1ec3 t\u1ea1o l\u00e0 ch\u1ecdn nh\u00f3m node tr\u00ean canvas, chu\u1ed9t ph\u1ea3i v\u00e0 ch\u1ecdn Convert to sub-workflow; n8n t\u1ef1 t\u1ea1o workflow con v\u00e0 thay nh\u00f3m node b\u1eb1ng m\u1ed9t node g\u1ecdi.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Thay v\u00ec nh\u1ed3i to\u00e0n b\u1ed9 logic v\u00e0o m\u1ed9t workflow, b\u1ea1n t\u00e1ch ph\u1ea7n d\u00f9ng chung ra workflow con \u0111\u1ec3 t\u00e1i s\u1eed d\u1ee5ng v\u00e0 b\u1ea3o tr\u00ec d\u1ec5 h\u01a1n. B\u00e0i n\u00e0y l\u00e0 m\u1ed9t ph\u1ea7n c\u1ee7a lo\u1ea1t h\u01b0\u1edbng d\u1eabn <a href=\"https:\/\/tino.vn\/blog\/cach-tao-workflow-tren-n8n-co-ban\/\">t\u1ea1o workflow tr\u00ean n8n<\/a>; n\u1ebfu m\u1edbi l\u00e0m quen <a href=\"https:\/\/tino.vn\/blog\/n8n-la-gi\/\">n8n<\/a>, n\u00ean \u0111\u1ecdc b\u00e0i \u0111\u00f3 tr\u01b0\u1edbc.<\/p>\n\n\n\n<h2 id=\"Sub-workflow_n8n_l\u00e0_g\u00ec?\">Sub-workflow n8n l\u00e0 g\u00ec?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Sub-workflow l\u00e0 m\u1ed9t workflow ri\u00eang, \u0111\u01b0\u1ee3c g\u1ecdi t\u1eeb workflow ch\u00ednh (workflow cha) qua node <strong>Execute Sub-workflow<\/strong>. Ph\u00eda workflow con, node \u0111\u1ea7u ti\u00ean l\u00e0 <strong>Execute Sub-workflow Trigger<\/strong>, tr\u00ean canvas hi\u1ec7n t\u00ean &#8220;When Executed by Another Workflow&#8221;. Hi\u1ec3u \u0111\u01a1n gi\u1ea3n, sub-workflow gi\u1ed1ng m\u1ed9t &#8220;h\u00e0m&#8221; trong l\u1eadp tr\u00ecnh: nh\u1eadn d\u1eef li\u1ec7u v\u00e0o, x\u1eed l\u00fd, tr\u1ea3 k\u1ebft qu\u1ea3 ra.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>V\u00ed d\u1ee5:<\/strong> workflow ch\u00ednh g\u1eedi email marketing; b\u1ea1n t\u00e1ch ph\u1ea7n l\u1ea5y d\u1eef li\u1ec7u kh\u00e1ch h\u00e0ng t\u1eeb API (xem <a href=\"https:\/\/tino.vn\/blog\/cach-them-api-vao-n8n\/\">c\u00e1ch g\u1ecdi API trong n8n<\/a>) th\u00e0nh sub-workflow, r\u1ed3i g\u1ecdi l\u1ea1i \u1edf nhi\u1ec1u chi\u1ebfn d\u1ecbch kh\u00e1c nhau.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1400\" height=\"750\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/cach-tao-sub-workflow-tren-n8n-luong-du-lieu.webp\" alt=\"Lu\u1ed3ng d\u1eef li\u1ec7u gi\u1eefa workflow cha v\u00e0 workflow con trong n8n: node Execute Sub-workflow g\u1eedi items sang trigger When Executed by Another Workflow, node cu\u1ed1i c\u1ee7a workflow con tr\u1ea3 k\u1ebft qu\u1ea3 v\u1ec1; Mode ch\u1ea1y m\u1ed9t l\u1ea7n cho m\u1ecdi item ho\u1eb7c t\u1eebng item, t\u00f9y ch\u1ecdn Wait for Sub-Workflow Completion\" class=\"wp-image-131677\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/cach-tao-sub-workflow-tren-n8n-luong-du-lieu.webp 1400w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/cach-tao-sub-workflow-tren-n8n-luong-du-lieu-300x161.webp 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/cach-tao-sub-workflow-tren-n8n-luong-du-lieu-1024x549.webp 1024w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/cach-tao-sub-workflow-tren-n8n-luong-du-lieu-768x411.webp 768w\" sizes=\"(max-width: 1400px) 100vw, 1400px\" \/><\/figure>\n\n\n\n<h3 id=\"T\u1ea1i_sao_n\u00ean_d\u00f9ng_sub-workflow?\">T\u1ea1i sao n\u00ean d\u00f9ng sub-workflow?<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>T\u00e1i s\u1eed d\u1ee5ng logic:<\/strong> kh\u00f4ng l\u1eb7p l\u1ea1i c\u00f9ng m\u1ed9t \u0111o\u1ea1n x\u1eed l\u00fd \u1edf nhi\u1ec1u n\u01a1i.<\/li>\n\n\n<li><strong>Chia nh\u1ecf ch\u1ee9c n\u0103ng:<\/strong> workflow ch\u00ednh ng\u1eafn g\u1ecdn, d\u1ec5 \u0111\u1ecdc; m\u1ed7i sub-workflow lo m\u1ed9t vi\u1ec7c.<\/li>\n\n\n<li><strong>B\u1ea3o tr\u00ec d\u1ec5:<\/strong> s\u1eeda logic trong sub-workflow m\u1ed9t l\u1ea7n, m\u1ecdi workflow g\u1ecdi t\u1edbi n\u00f3 d\u00f9ng b\u1ea3n m\u1edbi.<\/li>\n\n\n<li><strong>D\u1ec5 m\u1edf r\u1ed9ng:<\/strong> h\u1ec7 th\u1ed1ng c\u00f3 c\u1ea5u tr\u00fac r\u00f5 khi s\u1ed1 workflow t\u0103ng ho\u1eb7c quy tr\u00ecnh ph\u1ee9c t\u1ea1p h\u01a1n.<\/li>\n<\/ul>\n\n\n\n<h2 id=\"C\u00e1ch_1:_Chuy\u1ec3n_nh\u00f3m_node_th\u00e0nh_sub-workflow_b\u1eb1ng_Convert_to_sub-workflow\">C\u00e1ch 1: Chuy\u1ec3n nh\u00f3m node th\u00e0nh sub-workflow b\u1eb1ng Convert to sub-workflow<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">T\u1eeb n8n 1.97.0 (<a href=\"https:\/\/docs.n8n.io\/build\/flow-logic\/convert-to-sub-workflows\/\" target=\"_blank\" rel=\"noopener nofollow\">docs: Convert to sub-workflow<\/a>), b\u1ea1n kh\u00f4ng c\u1ea7n ch\u00e9p, d\u00e1n node b\u1eb1ng tay:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>M\u1edf workflow cha, ch\u1ecdn c\u00e1c node c\u1ea7n t\u00e1ch (k\u00e9o chu\u1ed9t qu\u00e9t ho\u1eb7c gi\u1eef Ctrl\/Cmd v\u00e0 b\u1ea5m t\u1eebng node).<\/li>\n\n\n<li>Chu\u1ed9t ph\u1ea3i v\u00e0o n\u1ec1n canvas, ch\u1ecdn <strong>Convert to sub-workflow<\/strong>.<\/li>\n\n\n<li>n8n t\u1ea1o workflow con c\u00f3 s\u1eb5n trigger, chuy\u1ec3n c\u00e1c node sang, c\u1eadp nh\u1eadt expression tham chi\u1ebfu t\u1edbi node kh\u00e1c th\u00e0nh tham s\u1ed1 \u0111\u1ea7u v\u00e0o, v\u00e0 thay nh\u00f3m node trong workflow cha b\u1eb1ng m\u1ed9t node Execute Sub-workflow.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">\u0110i\u1ec1u ki\u1ec7n \u0111\u1ec3 chuy\u1ec3n \u0111\u01b0\u1ee3c: kh\u00f4ng ch\u1ecdn node trigger; nh\u00f3m node ph\u1ea3i li\u1ec1n m\u1ea1ch; ch\u1ec9 m\u1ed9t node nh\u1eadn k\u1ebft n\u1ed1i t\u1eeb ngo\u00e0i v\u00e0o (kh\u00f4ng ph\u1ea3i Merge) v\u00e0 ch\u1ec9 m\u1ed9t node g\u1eedi k\u1ebft n\u1ed1i ra (kh\u00f4ng ph\u1ea3i If); ph\u1ea3i ch\u1ecdn \u0111\u1ee7 m\u1ecdi node n\u1eb1m gi\u1eefa. Expression d\u00f9ng <code>first()<\/code>, <code>last()<\/code>, <code>all()<\/code> n\u00ean ki\u1ec3m tra l\u1ea1i sau khi chuy\u1ec3n.<\/p>\n\n\n\n<h2 id=\"C\u00e1ch_2:_T\u1ea1o_sub-workflow_th\u1ee7_c\u00f4ng\">C\u00e1ch 2: T\u1ea1o sub-workflow th\u1ee7 c\u00f4ng<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">C\u00e1ch th\u1ee7 c\u00f4ng h\u1ee3p khi b\u1ea1n d\u1ef1ng workflow con t\u1eeb \u0111\u1ea7u ho\u1eb7c phi\u00ean b\u1ea3n n8n c\u0169 h\u01a1n 1.97. V\u00ed d\u1ee5 d\u01b0\u1edbi t\u00e1ch nh\u00f3m node &#8220;Ti\u00eau \u0111\u1ec1 m\u00f4 t\u1ea3, prompt h\u00ecnh \u1ea3nh&#8221; kh\u1ecfi m\u1ed9t workflow vi\u1ebft b\u00e0i SEO.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>C\u00e1c \u1ea3nh d\u01b0\u1edbi ch\u1ee5p \u1edf b\u1ea3n n8n 1.x (c\u00f4ng t\u1eafc Inactive, n\u00fat Test workflow, Create Workflow). \u1ede n8n 2.x, workflow d\u00f9ng n\u00fat Publish v\u00e0 Execute workflow; t\u00ean node v\u00e0 c\u00e1c t\u00f9y ch\u1ecdn trong b\u00e0i gi\u1eef nguy\u00ean.<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>B\u01b0\u1edbc 1:<\/strong> Truy c\u1eadp n8n (b\u1ea3n Cloud ho\u1eb7c t\u1ef1 host, xem <a href=\"https:\/\/tino.vn\/blog\/cach-cai-dat-n8n-tren-vps\/\">c\u00e1ch c\u00e0i n8n tr\u00ean VPS<\/a>).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>B\u01b0\u1edbc 2:<\/strong> T\u1ea1o workflow m\u1edbi (n\u00fat Create > Workflow; \u1edf b\u1ea3n 1.x l\u00e0 <strong>Create Workflow<\/strong>) v\u00e0 \u0111\u1eb7t t\u00ean, v\u00ed d\u1ee5 <strong>Sub-workflow<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1528\" height=\"787\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105622-3.png\" alt=\"Trang Overview c\u1ee7a n8n v\u1edbi danh s\u00e1ch workflow v\u00e0 n\u00fat Create Workflow \u1edf g\u00f3c tr\u00ean b\u00ean ph\u1ea3i\" 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\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>B\u01b0\u1edbc 3:<\/strong> Th\u00eam trigger <strong>Execute Sub-workflow Trigger<\/strong> (g\u00f5 &#8220;Execute Sub-workflow&#8221; \u1edf \u00f4 t\u00ecm ki\u1ebfm), t\u1ea1m \u0111\u1ec3 \u0111\u00f3.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1100\" height=\"631\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105622-4.png\" alt=\"B\u1ea3ng What triggers this workflow trong n8n, t\u00ecm Execute Sub-Workflow v\u00e0 ch\u1ecdn trigger Execute Sub-workflow\" 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\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>B\u01b0\u1edbc 4:<\/strong> M\u1edf workflow cha, ch\u1ecdn v\u00e0 sao ch\u00e9p c\u00e1c node c\u1ea7n t\u00e1ch (Ctrl+C), r\u1ed3i d\u00e1n (Ctrl+V) v\u00e0o workflow <strong>Sub-workflow<\/strong>, n\u1ed1i sau trigger.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1814\" height=\"904\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105622-5.png\" alt=\"Workflow cha vi\u1ebft b\u00e0i SEO trong n8n v\u1edbi nh\u00f3m node Ti\u00eau \u0111\u1ec1 m\u00f4 t\u1ea3, prompt h\u00ecnh \u1ea3nh \u0111\u01b0\u1ee3c ch\u1ecdn \u0111\u1ec3 sao ch\u00e9p\" 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\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1392\" height=\"734\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105622-6.png\" alt=\"C\u00e1c node \u0111\u00e3 d\u00e1n v\u00e0o workflow con, n\u1ed1i sau trigger When Executed by Another Workflow\" 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\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>B\u01b0\u1edbc 5:<\/strong> Quay l\u1ea1i workflow cha, x\u00f3a nh\u00f3m node v\u1eeba ch\u00e9p, th\u00eam node <strong>Execute Sub-workflow<\/strong> v\u00e0 c\u1ea5u h\u00ecnh:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Source:<\/strong> Database.<\/li>\n\n\n<li><strong>Workflow:<\/strong> ch\u1ecdn <strong>From list<\/strong> r\u1ed3i t\u00ecm workflow t\u00ean <strong>Sub-workflow<\/strong> (ho\u1eb7c ch\u1ecdn By ID v\u00e0 nh\u1eadp Workflow ID).<\/li>\n\n\n<li><strong>Mode:<\/strong> <em>Run once with all items<\/em> (g\u1eedi m\u1ecdi item m\u1ed9t l\u1ea7n) ho\u1eb7c <em>Run once for each item<\/em> (g\u1ecdi ri\u00eang cho t\u1eebng item, l\u1ea7n l\u01b0\u1ee3t).<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1826\" height=\"911\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105622-7.png\" alt=\"Node Execute Sub-workflow trong workflow cha, t\u00ecm action Execute A Sub Workflow\" 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\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Nh\u00f3m node \u0111\u00e3 \u0111\u01b0\u1ee3c g\u00f3i v\u00e0o m\u1ed9t node duy nh\u1ea5t. N\u1ed1i l\u1ea1i node n\u00e0y v\u1edbi c\u00e1c node tr\u01b0\u1edbc v\u00e0 sau trong workflow cha.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1550\" height=\"799\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105622-8.png\" alt=\"Workflow cha sau khi thay nh\u00f3m node b\u1eb1ng m\u1ed9t node Execute Workflow n\u1ed1i v\u1edbi c\u00e1c node tr\u01b0\u1edbc v\u00e0 sau\" 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\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>B\u01b0\u1edbc 6:<\/strong> C\u1ea5u h\u00ecnh trigger c\u1ee7a sub-workflow. \u1ede m\u1ee5c <strong>Input data mode<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Define using fields below:<\/strong> khai b\u00e1o tr\u01b0\u1edbc t\u00ean v\u00e0 ki\u1ec3u t\u1eebng tr\u01b0\u1eddng \u0111\u1ea7u v\u00e0o; workflow cha s\u1ebd th\u1ea5y c\u00e1c \u00f4 n\u00e0y \u0111\u1ec3 \u0111i\u1ec1n ho\u1eb7c map. H\u1ee3p khi c\u1ea7n ki\u1ec3m so\u00e1t d\u1eef li\u1ec7u ch\u1eb7t.<\/li>\n\n\n<li><strong>Define using JSON example:<\/strong> d\u00e1n m\u1ed9t JSON m\u1eabu, n8n t\u1ef1 suy ra c\u1ea5u tr\u00fac.<\/li>\n\n\n<li><strong>Accept all data:<\/strong> nh\u1eadn m\u1ecdi d\u1eef li\u1ec7u t\u1eeb workflow cha m\u00e0 kh\u00f4ng \u0111\u1ecbnh ngh\u0129a tr\u01b0\u1edbc. H\u1ee3p khi workflow cha lu\u00f4n g\u1eedi \u0111\u00fang d\u1eef li\u1ec7u ho\u1eb7c sub-workflow d\u00f9ng cho nhi\u1ec1u m\u1ee5c \u0111\u00edch.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1417\" height=\"796\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/05\/word-image-105622-9.png\" alt=\"Trigger When Executed by Another Workflow v\u1edbi ba l\u1ef1a ch\u1ecdn Input data mode: Define using fields below, Define using JSON example, Accept all data\" 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\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Xong. D\u1eef li\u1ec7u c\u1ee7a node cu\u1ed1i c\u00f9ng ch\u1ea1y trong sub-workflow \u0111\u01b0\u1ee3c tr\u1ea3 v\u1ec1 workflow cha. Khi c\u1ea7n s\u1eeda logic, b\u1ea1n s\u1eeda trong sub-workflow; m\u1ecdi workflow cha g\u1ecdi t\u1edbi n\u00f3 d\u00f9ng b\u1ea3n m\u1edbi.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>L\u01b0u \u00fd n8n 2.0:<\/strong> n\u1ebfu sub-workflow c\u00f3 node Wait, form ho\u1eb7c b\u01b0\u1edbc ch\u1edd ng\u01b0\u1eddi duy\u1ec7t, workflow cha nh\u1eadn k\u1ebft qu\u1ea3 cu\u1ed1i c\u1ee7a sub-workflow sau khi n\u00f3 ch\u1ea1y ti\u1ebfp; \u1edf b\u1ea3n 1.x, workflow cha ch\u1ec9 nh\u1eadn l\u1ea1i d\u1eef li\u1ec7u \u0111\u1ea7u v\u00e0o c\u1ee7a sub-workflow (<a href=\"https:\/\/docs.n8n.io\/changelog\/v20-breaking-changes\/\" target=\"_blank\" rel=\"noopener nofollow\">v2.0 breaking changes<\/a>).<\/p>\n\n\n\n<h2 id=\"K\u1ebft_lu\u1eadn\">K\u1ebft lu\u1eadn<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Sub-workflow gi\u00fap chia workflow l\u1edbn th\u00e0nh c\u00e1c kh\u1ed1i nh\u1ecf d\u00f9ng l\u1ea1i \u0111\u01b0\u1ee3c. V\u1edbi n8n t\u1eeb 1.97.0, c\u00e1ch nhanh l\u00e0 Convert to sub-workflow; c\u00e1ch th\u1ee7 c\u00f4ng v\u1eabn h\u1eefu \u00edch khi d\u1ef1ng workflow con t\u1eeb \u0111\u1ea7u. T\u00e1ch workflow con c\u0169ng gi\u00fap x\u1eed l\u00fd d\u1eef li\u1ec7u l\u1edbn \u1ed5n \u0111\u1ecbnh h\u01a1n, xem <a href=\"https:\/\/tino.vn\/blog\/tai-sao-workflow-trong-n8n-chay-cham\/\">v\u00ec sao workflow n8n ch\u1ea1y ch\u1eadm<\/a>.<\/p>\n\n\n\n<h2 id=\"Nh\u1eefng_c\u00e2u_h\u1ecfi_th\u01b0\u1eddng_g\u1eb7p\">Nh\u1eefng c\u00e2u h\u1ecfi th\u01b0\u1eddng g\u1eb7p<\/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_ch\u1ea1y_song_song_\u0111\u01b0\u1ee3c_kh\u00f4ng?\">Sub-workflow c\u00f3 ch\u1ea1y 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 class=\"wp-block-paragraph\">M\u1eb7c \u0111\u1ecbnh node Execute Sub-workflow ch\u1edd sub-workflow ch\u1ea1y xong r\u1ed3i workflow cha m\u1edbi ch\u1ea1y ti\u1ebfp; \u1edf Mode Run once for each item, c\u00e1c item \u0111\u01b0\u1ee3c g\u1ecdi l\u1ea7n l\u01b0\u1ee3t. T\u1eaft t\u00f9y ch\u1ecdn Wait for Sub-Workflow Completion th\u00ec workflow cha kh\u00f4ng ch\u1edd, sub-workflow ch\u1ea1y \u0111\u1ed9c l\u1eadp (<a href=\"https:\/\/docs.n8n.io\/integrations\/builtin\/core-nodes\/n8n-nodes-base.executeworkflow\/\" target=\"_blank\" rel=\"noopener nofollow\">docs: Execute Sub-workflow<\/a>). Theo d\u00f5i t\u00e0i nguy\u00ean m\u00e1y ch\u1ee7 khi g\u1ecdi nhi\u1ec1u l\u1ea7n c\u00f9ng l\u00fac.<\/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_nhi\u1ec1u_sub-workflow_hi\u1ec7u_qu\u1ea3?\">L\u00e0m sao qu\u1ea3n l\u00fd 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<p class=\"wp-block-paragraph\">\u0110\u1eb7t t\u00ean theo quy t\u1eafc (sub-parse-email, sub-generate-report), gom v\u00e0o m\u1ed9t <a href=\"https:\/\/tino.vn\/blog\/cach-su-dung-tinh-nang-folder-trong-n8n\/\">folder ho\u1eb7c g\u1eafn tag<\/a> nh\u01b0 sub, utility, v\u00e0 ghi m\u00f4 t\u1ea3 trong Settings c\u1ee7a workflow \u0111\u1ec3 ng\u01b0\u1eddi kh\u00e1c hi\u1ec3u ch\u1ee9c n\u0103ng.<\/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_d\u00f9ng_credential_ri\u00eang_\u0111\u01b0\u1ee3c_kh\u00f4ng?\">Sub-workflow c\u00f3 d\u00f9ng credential ri\u00eang \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 class=\"wp-block-paragraph\">C\u00f3. M\u1ed7i workflow, k\u1ec3 c\u1ea3 workflow con, ch\u1ecdn <a href=\"https:\/\/tino.vn\/blog\/credential-trong-n8n-la-gi\/\">credential<\/a> ri\u00eang trong t\u1eebng node. N\u00ean d\u00f9ng chung credential nh\u1ea5t qu\u00e1n \u0111\u1ec3 tr\u00e1nh l\u1ed7i truy c\u1eadp khi m\u1ed9t credential b\u1ecb \u0111\u1ed5i.<\/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_ch\u1ee9a_sub-workflow_kh\u00e1c_\u0111\u01b0\u1ee3c_kh\u00f4ng?\">Sub-workflow c\u00f3 ch\u1ee9a sub-workflow kh\u00e1c \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 class=\"wp-block-paragraph\">\u0110\u01b0\u1ee3c, n8n cho g\u1ecdi l\u1ed3ng nhi\u1ec1u c\u1ea5p. N\u00ean h\u1ea1n ch\u1ebf \u0111\u1ed9 s\u00e2u \u0111\u1ec3 d\u1ec5 debug: l\u1ed7i \u1edf c\u1ea5p s\u00e2u s\u1ebd hi\u1ec7n trong executions c\u1ee7a t\u1eebng workflow con.<\/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 ch\u1ea1y 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>M\u1eb7c \u0111\u1ecbnh node Execute Sub-workflow ch\u1edd sub-workflow ch\u1ea1y xong r\u1ed3i workflow cha m\u1edbi ch\u1ea1y ti\u1ebfp; \u1edf Mode Run once for each item, c\u00e1c item \u0111\u01b0\u1ee3c g\u1ecdi l\u1ea7n l\u01b0\u1ee3t. T\u1eaft t\u00f9y ch\u1ecdn Wait for Sub-Workflow Completion th\u00ec workflow cha kh\u00f4ng ch\u1edd, sub-workflow ch\u1ea1y \u0111\u1ed9c l\u1eadp (<a>docs: Execute Sub-workflow<\/a>). Theo d\u00f5i t\u00e0i nguy\u00ean m\u00e1y ch\u1ee7 khi g\u1ecdi nhi\u1ec1u l\u1ea7n c\u00f9ng l\u00fac.<\/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 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\": \"<p>\u0110\u1eb7t t\u00ean theo quy t\u1eafc (sub-parse-email, sub-generate-report), gom v\u00e0o m\u1ed9t <a>folder ho\u1eb7c g\u1eafn tag<\/a> nh\u01b0 sub, utility, v\u00e0 ghi m\u00f4 t\u1ea3 trong Settings c\u1ee7a workflow \u0111\u1ec3 ng\u01b0\u1eddi kh\u00e1c hi\u1ec3u ch\u1ee9c n\u0103ng.<\/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 d\u00f9ng credential ri\u00eang \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. M\u1ed7i workflow, k\u1ec3 c\u1ea3 workflow con, ch\u1ecdn <a>credential<\/a> ri\u00eang trong t\u1eebng node. N\u00ean d\u00f9ng chung credential nh\u1ea5t qu\u00e1n \u0111\u1ec3 tr\u00e1nh l\u1ed7i truy c\u1eadp khi m\u1ed9t credential b\u1ecb \u0111\u1ed5i.<\/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 ch\u1ee9a sub-workflow kh\u00e1c \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>\u0110\u01b0\u1ee3c, n8n cho g\u1ecdi l\u1ed3ng nhi\u1ec1u c\u1ea5p. N\u00ean h\u1ea1n ch\u1ebf \u0111\u1ed9 s\u00e2u \u0111\u1ec3 d\u1ec5 debug: l\u1ed7i \u1edf c\u1ea5p s\u00e2u s\u1ebd hi\u1ec7n trong executions c\u1ee7a t\u1eebng workflow con.<\/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>Sub-workflow trong n8n l\u00e0 m\u1ed9t workflow con b\u1eaft \u0111\u1ea7u b\u1eb1ng trigger Execute Sub-workflow Trigger v\u00e0 \u0111\u01b0\u1ee3c workflow ch\u00ednh g\u1ecdi qua node Execute Sub-workflow. C\u00e1ch nhanh nh\u1ea5t \u0111\u1ec3 t\u1ea1o l\u00e0 ch\u1ecdn nh\u00f3m node tr\u00ean canvas, chu\u1ed9t ph\u1ea3i v\u00e0 ch\u1ecdn Convert to sub-workflow; n8n t\u1ef1 t\u1ea1o workflow con v\u00e0 thay nh\u00f3m node b\u1eb1ng m\u1ed9t node g\u1ecdi. Thay [&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":4,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/posts\/105622\/revisions"}],"predecessor-version":[{"id":131708,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/posts\/105622\/revisions\/131708"}],"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}]}}