{"id":121297,"date":"2025-12-04T16:20:03","date_gmt":"2025-12-04T09:20:03","guid":{"rendered":"https:\/\/tino.vn\/blog\/?p=121297"},"modified":"2026-10-23T18:54:21","modified_gmt":"2026-10-23T11:54:21","slug":"cach-su-dung-n8n-va-puppeteer","status":"publish","type":"post","link":"https:\/\/tino.vn\/blog\/cach-su-dung-n8n-va-puppeteer\/","title":{"rendered":"Puppeteer l\u00e0 g\u00ec? C\u00e1ch d\u00f9ng Puppeteer v\u1edbi n8n t\u1eeb A-Z"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong>Puppeteer l\u00e0 th\u01b0 vi\u1ec7n Node.js do Google ph\u00e1t tri\u1ec3n, \u0111i\u1ec1u khi\u1ec3n tr\u00ecnh duy\u1ec7t Chrome ho\u1eb7c Chromium qua giao th\u1ee9c DevTools, th\u01b0\u1eddng ch\u1ea1y \u1edf ch\u1ebf \u0111\u1ed9 kh\u00f4ng giao di\u1ec7n (headless). Trong n8n, b\u1ea1n d\u00f9ng node c\u1ed9ng \u0111\u1ed3ng n8n-nodes-puppeteer khi c\u1ea7n m\u1edf trang web c\u00f3 JavaScript, ch\u1ee5p m\u00e0n h\u00ecnh ho\u1eb7c xu\u1ea5t PDF, nh\u1eefng vi\u1ec7c node HTTP Request kh\u00f4ng l\u00e0m \u0111\u01b0\u1ee3c.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">H\u01b0\u1edbng d\u1eabn d\u01b0\u1edbi \u0111\u00e2y c\u00e0i node tr\u00ean <a href=\"https:\/\/tino.vn\/blog\/n8n-la-gi\/\">n8n<\/a> t\u1ef1 host ch\u1ea1y Docker, d\u1ef1ng workflow ch\u1ee5p m\u00e0n h\u00ecnh v\u00e0 s\u1eeda l\u1ed7i thi\u1ebfu Chromium b\u1eb1ng image tu\u1ef3 bi\u1ebfn. Puppeteer l\u00e0 m\u1ed9t trong c\u00e1c c\u00e1ch l\u1ea5y d\u1eef li\u1ec7u web m\u00e0 <a href=\"https:\/\/tino.vn\/blog\/cach-su-dung-node-ai-agent-tren-n8n\/\">node AI Agent trong n8n<\/a> c\u00f3 th\u1ec3 d\u00f9ng; c\u00e1ch l\u00e0m c\u01a1 b\u1ea3n c\u00f3 \u1edf b\u00e0i <a href=\"https:\/\/tino.vn\/blog\/crawl-du-lieu-website-voi-n8n\/\">crawl d\u1eef li\u1ec7u website v\u1edbi n8n<\/a>.<\/p>\n\n\n\n<h2 id=\"Puppeteer_l\u00e0_g\u00ec?\">Puppeteer l\u00e0 g\u00ec?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/pptr.dev\/\" target=\"_blank\" rel=\"noopener nofollow\">Puppeteer<\/a> l\u00e0 th\u01b0 vi\u1ec7n Node.js cung c\u1ea5p API c\u1ea5p cao \u0111\u1ec3 \u0111i\u1ec1u khi\u1ec3n Chrome ho\u1eb7c Chromium th\u00f4ng qua giao th\u1ee9c DevTools. C\u00f4ng c\u1ee5 n\u00e0y ch\u1ee7 y\u1ebfu ch\u1ea1y \u1edf ch\u1ebf \u0111\u1ed9 headless (kh\u00f4ng hi\u1ec7n c\u1eeda s\u1ed5), n\u00ean t\u1ef1 \u0111\u1ed9ng ho\u00e1 \u0111\u01b0\u1ee3c thao t\u00e1c web tr\u00ean m\u00e1y ch\u1ee7 kh\u00f4ng c\u00f3 m\u00e0n h\u00ecnh.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Nh\u1edd \u0111i\u1ec1u khi\u1ec3n \u0111\u01b0\u1ee3c tr\u00ecnh duy\u1ec7t th\u1eadt, Puppeteer th\u01b0\u1eddng \u0111\u01b0\u1ee3c d\u00f9ng \u0111\u1ec3 ch\u1ee5p \u1ea3nh m\u00e0n h\u00ecnh, t\u1ea1o file PDF t\u1eeb trang web, ki\u1ec3m th\u1eed giao di\u1ec7n v\u00e0 l\u1ea5y n\u1ed9i dung c\u1ee7a trang ch\u1ec9 hi\u1ec7n ra sau khi JavaScript ch\u1ea1y xong.<\/p>\n\n\n\n<h2 id=\"Khi_n\u00e0o_n\u00ean_k\u1ebft_h\u1ee3p_n8n_v\u00e0_Puppeteer?\">Khi n\u00e0o n\u00ean k\u1ebft h\u1ee3p n8n v\u00e0 Puppeteer?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">n8n v\u00e0 Puppeteer h\u1ee3p nhau khi m\u1ed9t b\u01b0\u1edbc trong workflow c\u1ea7n tr\u00ecnh duy\u1ec7t th\u1eadt: trang d\u1ef1ng b\u1eb1ng React, Vue, Angular, c\u1ea7n b\u1ea5m n\u00fat, cu\u1ed9n trang ho\u1eb7c c\u1ea7n \u1ea3nh ch\u1ee5p, PDF. C\u00e1c b\u01b0\u1edbc c\u00f2n l\u1ea1i (l\u1ecdc, l\u01b0u, g\u1eedi th\u00f4ng b\u00e1o) \u0111\u1ec3 n8n lo.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Trang web \u0111\u1ed9ng:<\/strong> node HTTP Request ch\u1ec9 t\u1ea3i HTML ban \u0111\u1ea7u, c\u00f2n trang Single Page Application (SPA) ch\u1ec9 c\u00f3 n\u1ed9i dung sau khi JavaScript ch\u1ea1y. Puppeteer render xong trang r\u1ed3i m\u1edbi tr\u1ea3 HTML.<\/li>\n\n\n<li><strong>Thao t\u00e1c ng\u01b0\u1eddi d\u00f9ng:<\/strong> \u0111i\u1ec1n bi\u1ec3u m\u1eabu tr\u00ean h\u1ec7 th\u1ed1ng n\u1ed9i b\u1ed9 c\u1ee7a b\u1ea1n, cu\u1ed9n trang \u0111\u1ec3 t\u1ea3i th\u00eam n\u1ed9i dung, b\u1ea5m n\u00fat. Puppeteer \u0111i\u1ec1u khi\u1ec3n \u0111\u01b0\u1ee3c t\u1eebng thao t\u00e1c chu\u1ed9t v\u00e0 b\u00e0n ph\u00edm.<\/li>\n\n\n<li><strong>\u1ea2nh ch\u1ee5p v\u00e0 PDF:<\/strong> l\u01b0u \u1ea3nh trang b\u00e1o c\u00e1o, xu\u1ea5t ho\u00e1 \u0111\u01a1n web ra PDF \u0111\u1ec3 g\u1eedi email ho\u1eb7c l\u01b0u Google Drive.<\/li>\n\n\n<li><strong>Ph\u1ea7n c\u00f2n l\u1ea1i cho n8n:<\/strong> l\u1eadp l\u1ecbch, x\u1eed l\u00fd l\u1ed7i, l\u01b0u Google Sheets, g\u1eedi Telegram m\u00e0 kh\u00f4ng ph\u1ea3i vi\u1ebft th\u00eam m\u00e3.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">N\u1ebfu trang c\u00f3 API ch\u00ednh th\u1ee9c ho\u1eb7c HTML t\u0129nh, h\u00e3y d\u00f9ng HTTP Request: nh\u1eb9 h\u01a1n nhi\u1ec1u so v\u1edbi m\u1edf m\u1ed9t tr\u00ecnh duy\u1ec7t.<\/p>\n\n\n\n<h2 id=\"C\u00e1ch_c\u00e0i_node_Puppeteer_cho_n8n?\">C\u00e1ch c\u00e0i node Puppeteer cho n8n?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Node Puppeteer l\u00e0 node c\u1ed9ng \u0111\u1ed3ng <code>n8n-nodes-puppeteer<\/code> (<a href=\"https:\/\/github.com\/drudge\/n8n-nodes-puppeteer\" target=\"_blank\" rel=\"noopener nofollow\">kho m\u00e3 tr\u00ean GitHub<\/a>, b\u1ea3n 1.5.0 tr\u00ean npm ng\u00e0y 23\/10\/2026). Node n\u00e0y ch\u01b0a \u0111\u01b0\u1ee3c n8n x\u00e1c minh n\u00ean ch\u1ec9 c\u00e0i \u0111\u01b0\u1ee3c tr\u00ean n8n t\u1ef1 host, kh\u00f4ng c\u00e0i \u0111\u01b0\u1ee3c tr\u00ean n8n Cloud (<a href=\"https:\/\/docs.n8n.io\/integrations\/community-nodes\/installation\/\" target=\"_blank\" rel=\"noopener nofollow\">docs n8n<\/a>).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>B\u01b0\u1edbc 1: <\/strong>T\u1ea1i giao di\u1ec7n n8n, m\u1edf menu t\u00e0i kho\u1ea3n \u1edf g\u00f3c d\u01b0\u1edbi b\u00ean tr\u00e1i \u2192 <strong>Settings<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"779\" height=\"405\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-1.png\" alt=\"Giao di\u1ec7n n8n, menu t\u00e0i kho\u1ea3n \u1edf g\u00f3c d\u01b0\u1edbi b\u00ean tr\u00e1i m\u1edf ra hai m\u1ee5c Settings v\u00e0 Sign out\" class=\"wp-image-121298\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-1.png 779w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-1-300x156.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-1-768x399.png 768w\" sizes=\"(max-width: 779px) 100vw, 779px\" \/><figcaption class=\"wp-element-caption\">M\u1edf Settings<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>B\u01b0\u1edbc 2: <\/strong>Ch\u1ecdn m\u1ee5c <strong>Community Nodes<\/strong> r\u1ed3i nh\u1ea5n n\u00fat <strong>Install<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1341\" height=\"607\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-2.png\" alt=\"Trang Community nodes trong Settings c\u1ee7a n8n v\u1edbi danh s\u00e1ch node \u0111\u00e3 c\u00e0i v\u00e0 n\u00fat Install\" class=\"wp-image-121299\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-2.png 1341w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-2-300x136.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-2-1024x464.png 1024w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-2-768x348.png 768w\" sizes=\"(max-width: 1341px) 100vw, 1341px\" \/><figcaption class=\"wp-element-caption\">Trang Community nodes. \u1ea2nh ch\u1ee5p \u1edf n8n 1.119 (12\/2025).<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>B\u01b0\u1edbc 3: <\/strong>Nh\u1eadp t\u00ean g\u00f3i: <strong>n8n-nodes-puppeteer<\/strong>, \u0111\u00e1nh d\u1ea5u \u0111\u1ed3ng \u00fd v\u1edbi c\u1ea3nh b\u00e1o r\u1ee7i ro khi c\u00e0i m\u00e3 ch\u01b0a x\u00e1c minh v\u00e0 nh\u1ea5n <strong>Install<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"907\" height=\"512\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-3.png\" alt=\"H\u1ed9p tho\u1ea1i Install community nodes: npm Package Name n8n-nodes-puppeteer, \u00f4 \u0111\u1ed3ng \u00fd r\u1ee7i ro \u0111\u00e3 \u0111\u00e1nh d\u1ea5u, n\u00fat Install\" class=\"wp-image-121300\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-3.png 907w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-3-300x169.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-3-768x434.png 768w\" sizes=\"(max-width: 907px) 100vw, 907px\" \/><figcaption class=\"wp-element-caption\">Nh\u1eadp t\u00ean g\u00f3i v\u00e0 b\u1ea5m Install<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Node c\u1ed9ng \u0111\u1ed3ng ch\u1ea1y v\u1edbi quy\u1ec1n c\u1ee7a n8n, n\u00ean ch\u1ec9 c\u00e0i g\u00f3i b\u1ea1n tin c\u1eady v\u00e0 ghim phi\u00ean b\u1ea3n khi c\u00e0i (v\u00ed d\u1ee5 <code>n8n-nodes-puppeteer@1.5.0<\/code>). Sau khi c\u00e0i xong, node <strong>Puppeteer<\/strong> xu\u1ea5t hi\u1ec7n trong danh s\u00e1ch node.<\/p>\n\n\n\n<h2 id=\"C\u00e1ch_t\u1ea1o_workflow_ch\u1ee5p_m\u00e0n_h\u00ecnh_trang_web_b\u1eb1ng_Puppeteer?\">C\u00e1ch t\u1ea1o workflow ch\u1ee5p m\u00e0n h\u00ecnh trang web b\u1eb1ng Puppeteer?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Workflow m\u1eabu ch\u1ec9 c\u00f3 hai node: Manual Trigger v\u00e0 Puppeteer v\u1edbi thao t\u00e1c Get Screenshot. V\u00ed d\u1ee5 d\u01b0\u1edbi \u0111\u00e2y ch\u1ee5p trang ch\u1ee7 Google; b\u1ea1n thay b\u1eb1ng URL trang c\u1ee7a m\u00ecnh.<\/p>\n\n\n\n<h3 id=\"B\u01b0\u1edbc_1:_T\u1ea1o_Trigger\">B\u01b0\u1edbc 1: T\u1ea1o Trigger<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">K\u00e9o node <strong>Manual Trigger<\/strong> (When clicking \u2018Execute workflow\u2019) v\u00e0o khung l\u00e0m vi\u1ec7c. Node n\u00e0y l\u00e0 n\u00fat kh\u1edfi \u0111\u1ed9ng th\u1ee7 c\u00f4ng \u0111\u1ec3 ki\u1ec3m tra quy tr\u00ecnh.<\/p>\n\n\n\n<h3 id=\"B\u01b0\u1edbc_2:_C\u1ea5u_h\u00ecnh_node_Puppeteer\">B\u01b0\u1edbc 2: C\u1ea5u h\u00ecnh node Puppeteer<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">T\u00ecm v\u00e0 k\u00e9o node <strong>Puppeteer<\/strong> n\u1ed1i v\u00e0o sau Trigger, ch\u1ecdn thao t\u00e1c <strong>Get Screenshot<\/strong>. Node c\u00f3 b\u1ed1n thao t\u00e1c: Get Page Content, Get PDF, Get Screenshot v\u00e0 Run Custom Script.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1067\" height=\"619\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-4.png\" alt=\"B\u1ea3ng Node details c\u1ee7a Puppeteer trong n8n v\u1edbi b\u1ed1n Actions: Get Page Content, Get PDF, Get Screenshot, Run Custom Script\" class=\"wp-image-121301\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-4.png 1067w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-4-300x174.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-4-1024x594.png 1024w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-4-768x446.png 768w\" sizes=\"(max-width: 1067px) 100vw, 1067px\" \/><figcaption class=\"wp-element-caption\">\u1ea2nh ch\u1ee5p \u1edf n8n 1.x (12\/2025); tr\u00ean n8n 2.x c\u00f4ng t\u1eafc Inactive \u0111\u01b0\u1ee3c thay b\u1eb1ng n\u00fat Publish.<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Trong b\u1ea3ng c\u1ea5u h\u00ecnh, thi\u1ebft l\u1eadp nh\u01b0 sau:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Operation:<\/strong> Gi\u1eef nguy\u00ean <strong>Get Screenshot<\/strong>.<\/li>\n\n\n<li><strong>URL:<\/strong> Nh\u1eadp <code>https:\/\/www.google.com<\/code>.<\/li>\n\n\n<li><strong>Property Name:<\/strong> <code>data<\/code> (t\u00ean tr\u01b0\u1eddng binary ch\u1ee9a \u1ea3nh).<\/li>\n\n\n<li><strong>Type:<\/strong> PNG (ho\u1eb7c JPEG, WebP).<\/li>\n\n\n<li><strong>Full Page:<\/strong> b\u1eadt \u0111\u1ec3 cu\u1ed9n v\u00e0 ch\u1ee5p to\u00e0n b\u1ed9 chi\u1ec1u d\u00e0i trang; t\u1eaft \u0111\u1ec3 ch\u1ec9 ch\u1ee5p ph\u1ea7n m\u00e0n h\u00ecnh \u0111\u1ea7u ti\u00ean.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"641\" height=\"608\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-5.png\" alt=\"C\u1ea5u h\u00ecnh node Puppeteer: URL https:\/\/www.google.com, Operation Get Screenshot, Property Name data, Type PNG, Full Page t\u1eaft\" class=\"wp-image-121302\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-5.png 641w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-5-300x285.png 300w\" sizes=\"(max-width: 641px) 100vw, 641px\" \/><figcaption class=\"wp-element-caption\">C\u1ea5u h\u00ecnh Get Screenshot<\/figcaption><\/figure>\n\n\n\n<h3 id=\"B\u01b0\u1edbc_3:_Th\u1ef1c_thi_v\u00e0_ki\u1ec3m_tra\">B\u01b0\u1edbc 3: Th\u1ef1c thi v\u00e0 ki\u1ec3m tra<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Nh\u1ea5n n\u00fat <strong>Execute step<\/strong> v\u00e0 xem k\u1ebft qu\u1ea3 \u1edf khung <strong>Output<\/strong> b\u00ean ph\u1ea3i.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Tab <strong>JSON<\/strong> g\u1ea7n nh\u01b0 tr\u1ed1ng v\u00ec \u1ea3nh l\u00e0 d\u1eef li\u1ec7u binary.<\/li>\n\n\n<li>B\u1ea5m tab <strong>Binary<\/strong> (c\u1ea1nh tab JSON \u1edf g\u00f3c tr\u00ean khung Output) s\u1ebd th\u1ea5y t\u1ec7p \u1ea3nh.<\/li>\n\n\n<li>B\u1ea5m <strong>View<\/strong> \u0111\u1ec3 xem \u1ea3nh Puppeteer v\u1eeba ch\u1ee5p.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"878\" height=\"509\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-6.png\" alt=\"Khung Output c\u1ee7a node Puppeteer \u1edf tab Binary, tr\u01b0\u1eddng data l\u00e0 t\u1ec7p png 41 kB v\u1edbi n\u00fat View\" class=\"wp-image-121303\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-6.png 878w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-6-300x174.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-6-768x445.png 768w\" sizes=\"(max-width: 878px) 100vw, 878px\" \/><figcaption class=\"wp-element-caption\">\u1ea2nh n\u1eb1m \u1edf tab Binary<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"887\" height=\"547\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-7.png\" alt=\"\u1ea2nh ch\u1ee5p trang ch\u1ee7 Google do Puppeteer tr\u1ea3 v\u1ec1, hi\u1ec3n th\u1ecb trong khung Output c\u1ee7a n8n\" class=\"wp-image-121304\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-7.png 887w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-7-300x185.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-7-768x474.png 768w\" sizes=\"(max-width: 887px) 100vw, 887px\" \/><figcaption class=\"wp-element-caption\">K\u1ebft qu\u1ea3 ch\u1ee5p m\u00e0n h\u00ecnh<\/figcaption><\/figure>\n\n\n\n<h2 id=\"V\u00ec_sao_node_Puppeteer_b\u00e1o_l\u1ed7i_Could_not_find_Chrome_tr\u00ean_Docker?\">V\u00ec sao node Puppeteer b\u00e1o l\u1ed7i Could not find Chrome tr\u00ean Docker?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Node Puppeteer b\u00e1o l\u1ed7i Could not find Chrome v\u00ec image Docker ch\u00ednh th\u1ee9c c\u1ee7a n8n d\u1ef1a tr\u00ean Alpine Linux r\u00fat g\u1ecdn, kh\u00f4ng c\u00f3 Chromium v\u00e0 th\u01b0 vi\u1ec7n \u0111\u1ed3 ho\u1ea1 \u0111i k\u00e8m. Hay g\u1eb7p ba th\u00f4ng b\u00e1o:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Could not find Chrome:<\/strong> kh\u00f4ng t\u00ecm th\u1ea5y tr\u00ecnh duy\u1ec7t.<\/li>\n\n\n<li><strong>Error loading shared library (libnss3.so, libatk\u2026):<\/strong> thi\u1ebfu th\u01b0 vi\u1ec7n h\u1ec7 th\u1ed1ng \u0111\u1ec3 kh\u1edfi ch\u1ea1y tr\u00ecnh duy\u1ec7t.<\/li>\n\n\n<li><strong>Operation not permitted:<\/strong> sandbox c\u1ee7a Chrome xung \u0111\u1ed9t v\u1edbi quy\u1ec1n trong container.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"879\" height=\"601\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-8.png\" alt=\"Node Puppeteer trong n8n b\u00e1o l\u1ed7i Failed to launch\/connect to browser: Could not find Chrome\" class=\"wp-image-121305\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-8.png 879w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-8-300x205.png 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-8-768x525.png 768w\" sizes=\"(max-width: 879px) 100vw, 879px\" \/><figcaption class=\"wp-element-caption\">L\u1ed7i Could not find Chrome khi ch\u1ea1y l\u1ea7n \u0111\u1ea7u tr\u00ean Docker<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">B\u1ea3n c\u0169 c\u1ee7a b\u00e0i n\u00e0y c\u00e0i Chromium b\u1eb1ng <code>docker exec \u2026 apk add<\/code>. C\u00e1ch \u0111\u00f3 kh\u00f4ng c\u00f2n d\u00f9ng \u0111\u01b0\u1ee3c: theo <a href=\"https:\/\/docs.n8n.io\/integrations\/builtin\/core-nodes\/n8n-nodes-base.executecommand\/\" target=\"_blank\" rel=\"noopener nofollow\">t\u00e0i li\u1ec7u n8n<\/a> (\u0111\u1ecdc 23\/10\/2026), image ch\u00ednh th\u1ee9c \u0111\u00e3 g\u1ee1 tr\u00ecnh qu\u1ea3n l\u00fd g\u00f3i apk; v\u00e0 k\u1ec3 c\u1ea3 khi c\u00e0i \u0111\u01b0\u1ee3c, g\u00f3i s\u1ebd m\u1ea5t m\u1ed7i l\u1ea7n container \u0111\u01b0\u1ee3c t\u1ea1o l\u1ea1i (c\u1eadp nh\u1eadt n8n, \u0111\u1ed5i c\u1ea5u h\u00ecnh). C\u00e1ch b\u1ec1n l\u00e0 build image n8n ri\u00eang c\u00f3 s\u1eb5n Chromium.<\/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-su-dung-n8n-va-puppeteer-chon-cach-chay.webp\" alt=\"S\u01a1 \u0111\u1ed3 ba c\u00e1ch ch\u1ea1y tr\u00ecnh duy\u1ec7t cho Puppeteer trong n8n: docker exec c\u1ed9ng apk add kh\u00f4ng d\u00f9ng n\u1eefa v\u00ec image m\u1edbi \u0111\u00e3 g\u1ee1 apk v\u00e0 m\u1ea5t khi t\u1ea1o l\u1ea1i container; image n8n tu\u1ef3 bi\u1ebfn t\u1eeb Dockerfile ghim phi\u00ean b\u1ea3n c\u00f3 Chromium v\u00e0 font, ch\u1ea1y docker compose up -d --build, khuy\u00ean d\u00f9ng; tr\u00ecnh duy\u1ec7t t\u1eeb xa l\u00e0 container Chrome ri\u00eang n\u1ed1i qua Browser WebSocket Endpoint\" class=\"wp-image-131747\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/cach-su-dung-n8n-va-puppeteer-chon-cach-chay.webp 1400w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/cach-su-dung-n8n-va-puppeteer-chon-cach-chay-300x161.webp 300w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/cach-su-dung-n8n-va-puppeteer-chon-cach-chay-1024x549.webp 1024w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2026\/10\/cach-su-dung-n8n-va-puppeteer-chon-cach-chay-768x411.webp 768w\" sizes=\"(max-width: 1400px) 100vw, 1400px\" \/><\/figure>\n\n\n\n<h3 id=\"B\u01b0\u1edbc_1:_T\u1ea1o_Dockerfile_c\u00f3_Chromium\">B\u01b0\u1edbc 1: T\u1ea1o Dockerfile c\u00f3 Chromium<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Trong th\u01b0 m\u1ee5c ch\u1ee9a <code>docker-compose.yml<\/code> c\u1ee7a n8n, t\u1ea1o file <code>Dockerfile<\/code>. Ba d\u00f2ng <code>COPY --from=alpine:3.22<\/code> kh\u00f4i ph\u1ee5c apk theo \u0111\u00fang c\u00e1ch t\u00e0i li\u1ec7u n8n h\u01b0\u1edbng d\u1eabn; d\u00f2ng <code>FROM<\/code> ghim phi\u00ean b\u1ea3n n8n b\u1ea1n \u0111ang ch\u1ea1y thay v\u00ec <code>latest<\/code>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>FROM docker.n8n.io\/n8nio\/n8n:2.44.6\nUSER root\n\n# Kh\u00f4i ph\u1ee5c apk (image n8n \u0111\u00e3 g\u1ee1 apk)\nCOPY --from=alpine:3.22 \/sbin\/apk \/sbin\/apk\nCOPY --from=alpine:3.22 \/lib\/apk \/lib\/apk\nCOPY --from=alpine:3.22 \/usr\/lib\/libapk* \/usr\/lib\/\n\n# Chromium, th\u01b0 vi\u1ec7n v\u00e0 font (c\u00f3 font Noto \u0111\u1ec3 hi\u1ec3n th\u1ecb ti\u1ebfng Vi\u1ec7t)\nRUN apk add --no-cache chromium nss freetype harfbuzz ca-certificates ttf-freefont font-noto\n\nENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \\\n    PUPPETEER_EXECUTABLE_PATH=\/usr\/bin\/chromium-browser\nUSER node<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">C\u00e1ch d\u1ef1ng image tu\u1ef3 bi\u1ebfn t\u01b0\u01a1ng t\u1ef1, d\u00f9ng \u0111\u1ec3 c\u00e0i FFmpeg, c\u00f3 \u1edf b\u00e0i <a href=\"https:\/\/tino.vn\/blog\/ffmpeg-la-gi\/\">FFmpeg l\u00e0 g\u00ec v\u00e0 c\u00e1ch t\u00edch h\u1ee3p v\u00e0o n8n<\/a>.<\/p>\n\n\n\n<h3 id=\"B\u01b0\u1edbc_2:_S\u1eeda_docker-compose.yml_\u0111\u1ec3_build_image\">B\u01b0\u1edbc 2: S\u1eeda docker-compose.yml \u0111\u1ec3 build image<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u1ede service n8n, thay d\u00f2ng <code>image: docker.n8n.io\/n8nio\/n8n<\/code> b\u1eb1ng kh\u1ed1i <code>build<\/code>, gi\u1eef nguy\u00ean volume v\u00e0 bi\u1ebfn m\u00f4i tr\u01b0\u1eddng \u0111ang c\u00f3:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>services:\n  n8n:\n    build: .\n    image: n8n-puppeteer:2.44.6\n    # gi\u1eef nguy\u00ean ports, environment, volumes hi\u1ec7n c\u00f3<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Build v\u00e0 kh\u1edfi \u0111\u1ed9ng l\u1ea1i:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker compose up -d --build<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Node c\u1ed9ng \u0111\u1ed3ng \u0111\u00e3 c\u00e0i n\u1eb1m trong th\u01b0 m\u1ee5c d\u1eef li\u1ec7u <code>\/home\/node\/.n8n<\/code> (volume), n\u00ean kh\u00f4ng m\u1ea5t khi \u0111\u1ed5i image. M\u1ed7i l\u1ea7n c\u1eadp nh\u1eadt n8n, s\u1eeda s\u1ed1 phi\u00ean b\u1ea3n \u1edf d\u00f2ng <code>FROM<\/code> r\u1ed3i build l\u1ea1i; c\u00e1ch c\u1eadp nh\u1eadt c\u00f3 \u1edf b\u00e0i <a href=\"https:\/\/tino.vn\/blog\/cach-cap-nhat-n8n\/\">c\u1eadp nh\u1eadt n8n<\/a>.<\/p>\n\n\n\n<h3 id=\"B\u01b0\u1edbc_3:_Khai_b\u00e1o_Executable_Path_trong_node\">B\u01b0\u1edbc 3: Khai b\u00e1o Executable Path trong node<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Image tr\u00ean \u0111\u00e3 \u0111\u1eb7t bi\u1ebfn <code>PUPPETEER_EXECUTABLE_PATH<\/code>, node s\u1ebd t\u1ef1 d\u00f9ng. N\u1ebfu mu\u1ed1n ch\u1ec9 \u0111\u1ecbnh ri\u00eang cho m\u1ed9t node:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>M\u1edf node <strong>Puppeteer<\/strong>, k\u00e9o xu\u1ed1ng <strong>Options<\/strong> \u2192 <strong>Add Option<\/strong>.<\/li>\n\n\n<li>Ch\u1ecdn <strong>Executable Path<\/strong>.<\/li>\n\n\n<li>Nh\u1eadp \u0111\u01b0\u1eddng d\u1eabn tuy\u1ec7t \u0111\u1ed1i: <code>\/usr\/bin\/chromium-browser<\/code>.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"585\" height=\"481\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-11.png\" alt=\"Ph\u1ea7n Options c\u1ee7a node Puppeteer v\u1edbi \u00f4 Executable path \u0111i\u1ec1n \/usr\/bin\/chromium-browser\" class=\"wp-image-121308\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-11.png 585w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-11-300x247.png 300w\" sizes=\"(max-width: 585px) 100vw, 585px\" \/><figcaption class=\"wp-element-caption\">Executable Path tr\u1ecf t\u1edbi Chromium trong container<\/figcaption><\/figure>\n\n\n\n<h3 id=\"B\u01b0\u1edbc_4:_Tham_s\u1ed1_sandbox_(Launch_Arguments)\">B\u01b0\u1edbc 4: Tham s\u1ed1 sandbox (Launch Arguments)<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Trong container, Chrome th\u01b0\u1eddng kh\u00f4ng t\u1ea1o \u0111\u01b0\u1ee3c sandbox. Node n8n-nodes-puppeteer t\u1ef1 th\u00eam c\u00e1c tham s\u1ed1 cho container khi ph\u00e1t hi\u1ec7n \u0111ang ch\u1ea1y trong Docker (tu\u1ef3 ch\u1ecdn Add Container Arguments). N\u1ebfu v\u1eabn l\u1ed7i Operation not permitted, th\u00eam th\u1ee7 c\u00f4ng \u1edf <strong>Options<\/strong> \u2192 <strong>Launch Arguments<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>--no-sandbox<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>--disable-setuid-sandbox<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>--disable-dev-shm-usage<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"588\" height=\"614\" src=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-12.png\" alt=\"Launch Arguments c\u1ee7a node Puppeteer: --no-sandbox, --disable-setuid-sandbox, --disable-dev-shm-usage c\u00f9ng Executable path\" class=\"wp-image-121309\" title=\"\" srcset=\"https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-12.png 588w, https:\/\/tino.vn\/blog\/wp-content\/uploads\/2025\/12\/word-image-121297-12-287x300.png 287w\" sizes=\"(max-width: 588px) 100vw, 588px\" \/><figcaption class=\"wp-element-caption\">Ba Launch Arguments th\u01b0\u1eddng d\u00f9ng trong container<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>L\u01b0u \u00fd b\u1ea3o m\u1eadt:<\/strong> <code>--no-sandbox<\/code> t\u1eaft l\u1edbp c\u00e1ch ly c\u1ee7a Chrome. Ch\u1ec9 d\u00f9ng trong container, ch\u1ec9 m\u1edf trang b\u1ea1n tin c\u1eady, kh\u00f4ng ch\u1ea1y n8n b\u1eb1ng quy\u1ec1n root. Mu\u1ed1n t\u00e1ch h\u1eb3n r\u1ee7i ro, ch\u1ea1y tr\u00ecnh duy\u1ec7t \u1edf container ri\u00eang v\u00e0 n\u1ed1i qua tu\u1ef3 ch\u1ecdn <strong>Browser WebSocket Endpoint<\/strong> c\u1ee7a node.<\/p>\n\n\n\n<h2 id=\"D\u00f9ng_Puppeteer_v\u1edbi_n8n_th\u1ebf_n\u00e0o_cho_\u0111\u00fang_quy_\u0111\u1ecbnh?\">D\u00f9ng Puppeteer v\u1edbi n8n th\u1ebf n\u00e0o cho \u0111\u00fang quy \u0111\u1ecbnh?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Puppeteer ch\u1ec9 n\u00ean t\u1ef1 \u0111\u1ed9ng ho\u00e1 website b\u1ea1n c\u00f3 quy\u1ec1n: trang c\u1ee7a ch\u00ednh b\u1ea1n, h\u1ec7 th\u1ed1ng n\u1ed9i b\u1ed9, ho\u1eb7c trang cho ph\u00e9p truy c\u1eadp t\u1ef1 \u0111\u1ed9ng trong \u0111i\u1ec1u kho\u1ea3n. \u0110\u00e2y l\u00e0 nguy\u00ean t\u1eafc tham kh\u1ea3o, kh\u00f4ng ph\u1ea3i t\u01b0 v\u1ea5n ph\u00e1p l\u00fd.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>T\u00f4n tr\u1ecdng robots.txt v\u00e0 \u0111i\u1ec1u kho\u1ea3n:<\/strong> trang c\u1ea5m thu th\u1eadp t\u1ef1 \u0111\u1ed9ng, y\u00eau c\u1ea7u \u0111\u0103ng nh\u1eadp ho\u1eb7c hi\u1ec7n CAPTCHA l\u00e0 t\u00edn hi\u1ec7u kh\u00f4ng n\u00ean ch\u1ea1y bot. Kh\u00f4ng d\u00f9ng plugin gi\u1ea3 l\u1eadp ng\u01b0\u1eddi d\u00f9ng \u0111\u1ec3 l\u00e1ch c\u01a1 ch\u1ebf ch\u1ed1ng bot.<\/li>\n\n\n<li><strong>Gi\u1edbi h\u1ea1n t\u1ed1c \u0111\u1ed9:<\/strong> th\u00eam node Wait gi\u1eefa c\u00e1c l\u1ea7n m\u1edf trang, kh\u00f4ng m\u1edf h\u00e0ng lo\u1ea1t tab c\u00f9ng l\u00fac tr\u00ean m\u1ed9t site.<\/li>\n\n\n<li><strong>Kh\u00f4ng t\u1ea1o t\u00e0i kho\u1ea3n hay g\u1eedi bi\u1ec3u m\u1eabu h\u00e0ng lo\u1ea1t<\/strong> tr\u00ean d\u1ecbch v\u1ee5 c\u1ee7a ng\u01b0\u1eddi kh\u00e1c: d\u1ec5 vi ph\u1ea1m \u0111i\u1ec1u kho\u1ea3n v\u00e0 b\u1ecb coi l\u00e0 spam.<\/li>\n\n\n<li><strong>D\u1eef li\u1ec7u c\u00e1 nh\u00e2n:<\/strong> kh\u00f4ng thu th\u1eadp h\u1ecd t\u00ean, email, s\u1ed1 \u0111i\u1ec7n tho\u1ea1i c\u1ee7a ng\u01b0\u1eddi kh\u00e1c \u0111\u1ec3 l\u00e0m danh s\u00e1ch li\u00ean h\u1ec7 (Ngh\u1ecb \u0111\u1ecbnh 13\/2023\/N\u0110-CP, Lu\u1eadt B\u1ea3o v\u1ec7 d\u1eef li\u1ec7u c\u00e1 nh\u00e2n s\u1ed1 91\/2025\/QH15).<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Node c\u1ed9ng \u0111\u1ed3ng v\u00e0 Chromium c\u1ea7n n8n t\u1ef1 host. N\u1ebfu ch\u01b0a c\u00f3 m\u00e1y ch\u1ee7, xem <a href=\"https:\/\/tino.vn\/blog\/vps-n8n\/\">VPS n8n l\u00e0 g\u00ec v\u00e0 khi n\u00e0o c\u1ea7n<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Mu\u1ed1n ch\u1ea1y n8n 24\/7 m\u00e0 kh\u00f4ng t\u1ef1 c\u00e0i? <a href=\"https:\/\/tino.vn\/vps-n8n\">VPS n8n c\u1ee7a Tino<\/a> c\u00e0i s\u1eb5n n8n tr\u00ean VPS NVMe \u0111\u1eb7t t\u1ea1i Vi\u1ec7t Nam; b\u1ea1n v\u1eabn c\u00f3 quy\u1ec1n root \u0111\u1ec3 c\u1ea5u h\u00ecnh. Xem c\u1ea5u h\u00ecnh v\u00e0 gi\u00e1 tr\u00ean trang s\u1ea3n ph\u1ea9m.<\/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=\"Khi_n\u00e0o_n\u00ean_d\u00f9ng_Puppeteer_thay_v\u00ec_node_HTTP_Request_th\u00f4ng_th\u01b0\u1eddng?\">Khi n\u00e0o n\u00ean d\u00f9ng Puppeteer thay v\u00ec node HTTP Request th\u00f4ng th\u01b0\u1eddng?<\/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\">D\u00f9ng Puppeteer khi n\u1ed9i dung ch\u1ec9 hi\u1ec7n sau khi JavaScript ch\u1ea1y (trang React, Vue, Angular), ho\u1eb7c khi c\u1ea7n cu\u1ed9n trang, b\u1ea5m n\u00fat, ch\u1ee5p m\u00e0n h\u00ecnh, xu\u1ea5t PDF. Trang t\u0129nh ho\u1eb7c c\u00f3 API th\u00ec d\u00f9ng HTTP Request v\u00ec nhanh v\u00e0 nh\u1eb9 h\u01a1n nhi\u1ec1u.<\/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_th\u1ebf_n\u00e0o_\u0111\u1ec3_l\u1ea5y_ch\u00ednh_x\u00e1c_m\u1ed9t_\u0111o\u1ea1n_v\u0103n_b\u1ea3n_ho\u1eb7c_gi\u00e1_tr\u1ecb_c\u1ee5_th\u1ec3_tr\u00ean_trang_web?\">L\u00e0m th\u1ebf n\u00e0o \u0111\u1ec3 l\u1ea5y ch\u00ednh x\u00e1c m\u1ed9t \u0111o\u1ea1n v\u0103n b\u1ea3n ho\u1eb7c gi\u00e1 tr\u1ecb c\u1ee5 th\u1ec3 tr\u00ean trang web?<\/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\">L\u1ea5y HTML b\u1eb1ng thao t\u00e1c Get Page Content r\u1ed3i t\u00e1ch b\u1eb1ng node HTML (Extract HTML Content) v\u1edbi CSS Selector. Selector l\u1ea5y b\u1eb1ng c\u00e1ch b\u1ea5m chu\u1ed9t ph\u1ea3i v\u00e0o ph\u1ea7n t\u1eed trong Chrome, ch\u1ecdn Inspect, r\u1ed3i Copy selector.<\/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=\"Puppeteer_c\u00f3_th\u1ec3_t\u1ef1_\u0111\u1ed9ng_\u0111i\u1ec1n_form_ho\u1eb7c_nh\u1eadp_d\u1eef_li\u1ec7u_v\u00e0o_\u00f4_t\u00ecm_ki\u1ebfm_kh\u00f4ng?\">Puppeteer c\u00f3 th\u1ec3 t\u1ef1 \u0111\u1ed9ng \u0111i\u1ec1n form ho\u1eb7c nh\u1eadp d\u1eef li\u1ec7u v\u00e0o \u00f4 t\u00ecm ki\u1ebfm 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, qua thao t\u00e1c Run Custom Script v\u1edbi c\u00e1c l\u1ec7nh nh\u01b0 <code>$page.type()<\/code> v\u00e0 <code>$page.click()<\/code>. H\u00e3y d\u00f9ng cho bi\u1ec3u m\u1eabu tr\u00ean h\u1ec7 th\u1ed1ng c\u1ee7a b\u1ea1n, v\u00ed d\u1ee5 nh\u1eadp s\u1ed1 li\u1ec7u v\u00e0o trang qu\u1ea3n tr\u1ecb n\u1ed9i b\u1ed9 kh\u00f4ng c\u00f3 API.<\/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_\u0111\u1ec3_x\u1eed_l\u00fd_c\u00e1c_trang_web_t\u1ea3i_n\u1ed9i_dung_theo_d\u1ea1ng_&quot;Cu\u1ed9n_v\u00f4_t\u1eadn&quot;_(Infinite_Scroll)?\">L\u00e0m sao \u0111\u1ec3 x\u1eed l\u00fd c\u00e1c trang web t\u1ea3i n\u1ed9i dung theo d\u1ea1ng &quot;Cu\u1ed9n v\u00f4 t\u1eadn&quot; (Infinite Scroll)?<\/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\">D\u00f9ng Run Custom Script: cu\u1ed9n xu\u1ed1ng cu\u1ed1i trang b\u1eb1ng <code>$page.evaluate()<\/code>, ch\u1edd n\u1ed9i dung m\u1edbi t\u1ea3i, l\u1eb7p l\u1ea1i s\u1ed1 l\u1ea7n gi\u1edbi h\u1ea1n r\u1ed3i m\u1edbi l\u1ea5y HTML. \u0110\u1eb7t gi\u1edbi h\u1ea1n s\u1ed1 l\u1ea7n cu\u1ed9n \u0111\u1ec3 workflow kh\u00f4ng ch\u1ea1y m\u00e3i.<\/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=\"Ch\u1ea1y_Puppeteer_trong_n8n_c\u00f3_t\u1ed1n_nhi\u1ec1u_t\u00e0i_nguy\u00ean_kh\u00f4ng?\">Ch\u1ea1y Puppeteer trong n8n c\u00f3 t\u1ed1n nhi\u1ec1u t\u00e0i nguy\u00ean 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 l\u1ea7n m\u1edf Chromium d\u00f9ng th\u00eam h\u00e0ng tr\u0103m MB RAM, n\u00ean m\u00e1y ch\u1ee7 nh\u1ecf d\u1ec5 h\u1ebft b\u1ed9 nh\u1edb khi nhi\u1ec1u workflow ch\u1ea1y c\u00f9ng l\u00fac. Gi\u1edbi h\u1ea1n s\u1ed1 l\u1ea7n ch\u1ea1y \u0111\u1ed3ng th\u1eddi, \u0111\u00f3ng tr\u00ecnh duy\u1ec7t sau m\u1ed7i l\u1ea7n d\u00f9ng, ho\u1eb7c t\u00e1ch tr\u00ecnh duy\u1ec7t ra container ri\u00eang.<\/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\": \"Khi n\u00e0o n\u00ean d\u00f9ng Puppeteer thay v\u00ec node HTTP Request th\u00f4ng th\u01b0\u1eddng?\",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"<p>D\u00f9ng Puppeteer khi n\u1ed9i dung ch\u1ec9 hi\u1ec7n sau khi JavaScript ch\u1ea1y (trang React, Vue, Angular), ho\u1eb7c khi c\u1ea7n cu\u1ed9n trang, b\u1ea5m n\u00fat, ch\u1ee5p m\u00e0n h\u00ecnh, xu\u1ea5t PDF. Trang t\u0129nh ho\u1eb7c c\u00f3 API th\u00ec d\u00f9ng HTTP Request v\u00ec nhanh v\u00e0 nh\u1eb9 h\u01a1n nhi\u1ec1u.<\/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 th\u1ebf n\u00e0o \u0111\u1ec3 l\u1ea5y ch\u00ednh x\u00e1c m\u1ed9t \u0111o\u1ea1n v\u0103n b\u1ea3n ho\u1eb7c gi\u00e1 tr\u1ecb c\u1ee5 th\u1ec3 tr\u00ean trang web?\",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"<p>L\u1ea5y HTML b\u1eb1ng thao t\u00e1c Get Page Content r\u1ed3i t\u00e1ch b\u1eb1ng node HTML (Extract HTML Content) v\u1edbi CSS Selector. Selector l\u1ea5y b\u1eb1ng c\u00e1ch b\u1ea5m chu\u1ed9t ph\u1ea3i v\u00e0o ph\u1ea7n t\u1eed trong Chrome, ch\u1ecdn Inspect, r\u1ed3i Copy selector.<\/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\": \"Puppeteer c\u00f3 th\u1ec3 t\u1ef1 \u0111\u1ed9ng \u0111i\u1ec1n form ho\u1eb7c nh\u1eadp d\u1eef li\u1ec7u v\u00e0o \u00f4 t\u00ecm ki\u1ebfm 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, qua thao t\u00e1c Run Custom Script v\u1edbi c\u00e1c l\u1ec7nh nh\u01b0 $page.type() v\u00e0 $page.click(). H\u00e3y d\u00f9ng cho bi\u1ec3u m\u1eabu tr\u00ean h\u1ec7 th\u1ed1ng c\u1ee7a b\u1ea1n, v\u00ed d\u1ee5 nh\u1eadp s\u1ed1 li\u1ec7u v\u00e0o trang qu\u1ea3n tr\u1ecb n\u1ed9i b\u1ed9 kh\u00f4ng c\u00f3 API.<\/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 \u0111\u1ec3 x\u1eed l\u00fd c\u00e1c trang web t\u1ea3i n\u1ed9i dung theo d\u1ea1ng \\\"Cu\u1ed9n v\u00f4 t\u1eadn\\\" (Infinite Scroll)?\",\n\t\t\t\t\"acceptedAnswer\": {\n\t\t\t\t\t\"@type\": \"Answer\",\n\t\t\t\t\t\"text\": \"<p>D\u00f9ng Run Custom Script: cu\u1ed9n xu\u1ed1ng cu\u1ed1i trang b\u1eb1ng $page.evaluate(), ch\u1edd n\u1ed9i dung m\u1edbi t\u1ea3i, l\u1eb7p l\u1ea1i s\u1ed1 l\u1ea7n gi\u1edbi h\u1ea1n r\u1ed3i m\u1edbi l\u1ea5y HTML. \u0110\u1eb7t gi\u1edbi h\u1ea1n s\u1ed1 l\u1ea7n cu\u1ed9n \u0111\u1ec3 workflow kh\u00f4ng ch\u1ea1y m\u00e3i.<\/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\": \"Ch\u1ea1y Puppeteer trong n8n c\u00f3 t\u1ed1n nhi\u1ec1u t\u00e0i nguy\u00ean 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 l\u1ea7n m\u1edf Chromium d\u00f9ng th\u00eam h\u00e0ng tr\u0103m MB RAM, n\u00ean m\u00e1y ch\u1ee7 nh\u1ecf d\u1ec5 h\u1ebft b\u1ed9 nh\u1edb khi nhi\u1ec1u workflow ch\u1ea1y c\u00f9ng l\u00fac. Gi\u1edbi h\u1ea1n s\u1ed1 l\u1ea7n ch\u1ea1y \u0111\u1ed3ng th\u1eddi, \u0111\u00f3ng tr\u00ecnh duy\u1ec7t sau m\u1ed7i l\u1ea7n d\u00f9ng, ho\u1eb7c t\u00e1ch tr\u00ecnh duy\u1ec7t ra container ri\u00eang.<\/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>Puppeteer l\u00e0 th\u01b0 vi\u1ec7n Node.js do Google ph\u00e1t tri\u1ec3n, \u0111i\u1ec1u khi\u1ec3n tr\u00ecnh duy\u1ec7t Chrome ho\u1eb7c Chromium qua giao th\u1ee9c DevTools, th\u01b0\u1eddng ch\u1ea1y \u1edf ch\u1ebf \u0111\u1ed9 kh\u00f4ng giao di\u1ec7n (headless). Trong n8n, b\u1ea1n d\u00f9ng node c\u1ed9ng \u0111\u1ed3ng n8n-nodes-puppeteer khi c\u1ea7n m\u1edf trang web c\u00f3 JavaScript, ch\u1ee5p m\u00e0n h\u00ecnh ho\u1eb7c xu\u1ea5t PDF, nh\u1eefng vi\u1ec7c node HTTP Request [&hellip;]<\/p>\n","protected":false},"author":23,"featured_media":121313,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7397],"tags":[7474],"class_list":["post-121297","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-n8n","tag-n8n-va-puppeteer"],"_links":{"self":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/posts\/121297","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=121297"}],"version-history":[{"count":5,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/posts\/121297\/revisions"}],"predecessor-version":[{"id":131872,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/posts\/121297\/revisions\/131872"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/media\/121313"}],"wp:attachment":[{"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/media?parent=121297"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/categories?post=121297"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tino.vn\/blog\/wp-json\/wp\/v2\/tags?post=121297"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}