Profile Management

Profile Management cho phép bạn quản lý các profile trình duyệt Chrome/Chromium. Mỗi profile là một phiên bản độc lập của trình duyệt với dữ liệu riêng biệt như cookies, lịch sử, bookmark, v.v.

Create New Profile

Tạo hồ sơ trình duyệt mới

Tạo một profile trình duyệt mới với ID duy nhất. Profile này sẽ có thư mục dữ liệu riêng biệt và có thể được sử dụng để chạy các phiên trình duyệt độc lập.

Tham số:
Profile Name: Tên của profile mới (bắt buộc)
Profile ID: ID duy nhất cho profile (tự động tạo nếu để trống)
Proxy: Chuỗi proxy theo định dạng http:ip:port:user:pass hoặc socks5:ip:port:user:pass
Note: Ghi chú cho profile
Extension: Danh sách extension (mỗi extension một dòng)
Ví dụ:

Tạo profile với tên "My Profile":

{ "resource": "profileManagement", "operation": "createNewProfile", "profileName": "My Profile", "profileId": "my_profile_001", "proxy": "http:127.0.0.1:8080:user:pass", "note": "Profile cho automation", "extension": "extension_id_1\nextension_id_2" }
💡 Lưu ý:
  • Profile Name là bắt buộc và phải có định dạng dễ nhớ
  • Profile ID nên có định dạng dễ nhớ và không chứa ký tự đặc biệt
  • Nếu không cung cấp Profile ID, hệ thống sẽ tự động tạo ID ngẫu nhiên
  • Profile mới tạo sẽ sạch và không có dữ liệu nào
  • Proxy có thể được cấu hình để sử dụng proxy server
  • Extension có thể là ID từ Chrome Store hoặc đường dẫn local

Delete Profile

Xóa hồ sơ trình duyệt

Xóa hoàn toàn một profile trình duyệt và tất cả dữ liệu liên quan (cookies, lịch sử, bookmark, v.v.). Hành động này không thể hoàn tác.

Tham số:
Profile ID: ID của profile cần xóa (bắt buộc)
Ví dụ:

Xóa profile "my_profile_001":

{ "resource": "profileManagement", "operation": "deleteProfile", "profileId": "my_profile_001" }
⚠️ Cảnh báo:

Hành động này sẽ xóa vĩnh viễn tất cả dữ liệu trong profile bao gồm:

  • Cookies và session data
  • Lịch sử duyệt web
  • Bookmarks
  • Saved passwords
  • Extensions và cài đặt

Import Cookies

Import cookies từ file JSON

Import cookies từ file JSON vào một profile cụ thể. Điều này hữu ích khi bạn muốn sử dụng session đã lưu trước đó.

Tham số:
Profile ID: ID của profile để import cookies (bắt buộc)
Cookies File Path: Đường dẫn đến file JSON chứa cookies (bắt buộc)
Ví dụ:

Import cookies vào profile "my_profile_001":

{ "resource": "profileManagement", "operation": "importCookies", "profileId": "my_profile_001", "cookiesFilePath": "C:/cookies/session_data.json" }

Format file JSON cookies:

[ { "name": "session_id", "value": "abc123", "domain": ".example.com", "path": "/", "expires": 1640995200, "httpOnly": true, "secure": true } ]
💡 Lưu ý:
  • File JSON phải có format đúng chuẩn Chrome cookies
  • Cookies sẽ được import vào profile trước khi khởi động
  • Nếu profile đang chạy, cookies sẽ được áp dụng ở lần khởi động tiếp theo
  • Đường dẫn file phải chính xác và file phải tồn tại

Start Profile

Khởi động hồ sơ trình duyệt

Khởi động một profile trình duyệt với remote debugging enabled. Profile sẽ được mở với debug port để có thể điều khiển từ xa.

Tham số:
Profile ID: ID của profile cần khởi động (bắt buộc)
Debug Port: Port để kết nối remote debugging (mặc định: 9222)
Win Scale: Window scale cho profile (ví dụ: 1.25)
Win Position: Vị trí cửa sổ (format: x,y, ví dụ: 100,100)
Win Size: Kích thước cửa sổ (format: width,height, ví dụ: 1024,768)
Ví dụ:

Khởi động profile "my_profile_001" với debug port 9223:

{ "resource": "profileManagement", "operation": "startProfile", "profileId": "my_profile_001", "debugPort": 9223, "winScale": "1.25", "winPosition": "100,100", "winSize": "1024,768" }
💡 Lưu ý:
  • Mỗi profile chỉ có thể chạy một lần tại một thời điểm
  • Debug port phải là duy nhất cho mỗi profile
  • Profile sẽ được mở với remote debugging để có thể điều khiển từ n8n
  • Nếu profile đã chạy, action này sẽ trả về thông tin profile hiện tại
  • Win Scale giúp điều chỉnh độ phân giải hiển thị
  • Win Position và Win Size giúp kiểm soát vị trí và kích thước cửa sổ

Stop Profile

Dừng hồ sơ trình duyệt

Dừng một profile trình duyệt đang chạy và đóng tất cả tab. Dữ liệu profile sẽ được lưu lại.

Tham số:
Profile ID: ID của profile cần dừng (bắt buộc)
Ví dụ:

Dừng profile "my_profile_001":

{ "resource": "profileManagement", "operation": "stopProfile", "profileId": "my_profile_001" }
💡 Lưu ý:
  • Action này sẽ đóng tất cả tab và cửa sổ của profile
  • Dữ liệu profile (cookies, lịch sử) sẽ được lưu lại
  • Nếu profile không chạy, action sẽ trả về thông báo tương ứng
  • Nên dừng profile trước khi xóa để tránh lỗi