Package Information
Documentation
DMS Import
n8n community node package for scraping sale orders from the legacy DMS web UI.
Flow
- n8n runs a Schedule Trigger.
- The
DMS Importnode opens DMS with Playwright, navigates toGiao dịch > Đơn hàng, opens each order, and returns sale order JSON includingOrderDetails. - n8n builds the ERP payload and calls
ERP_CREATE_ORDER_URLfor each order.
Setup
From monorepo root:
pnpm install
cd dms-import && npx playwright install chromium
cp .env.example .env
Fill .env with DMS credentials. Do not commit .env or credential.txt.
The scraper can read credential.txt using this format when DMS_USERNAME and DMS_PASSWORD are not set:
URL: https://vn-dms.accenture.com/DMS_VNM/Default.aspx
Username: your-user
Password: your-password
2FA KEY: BASE32_AUTHENTICATOR_SECRET
DMS 2FA
For unattended runs, set a TOTP secret:
DMS_TOTP_SECRET=BASE32_AUTHENTICATOR_SECRET
For first-time session capture, run visibly and enter the authenticator code manually:
DMS_HEADLESS=false npm run scrape
After a successful login, Playwright stores session cookies in .auth/dms-storage-state.json.
n8n Community Node
Install in n8n:
n8n-nodes-dms-import
Create DMS Credentials with Base URL, Username, Password, and TOTP Secret.
The node exposes one operation: Scrape orders — one output item per sale order, including OrderDetails.
The n8n host/container must have Chromium dependencies for Playwright.
Workflow
Example workflow: workflows/dms-hourly-order-sync.workflow.js
Schedule → Scrape orders → Build ERP Payload → Create ERP Order
Set n8n environment variables:
ERP_CREATE_ORDER_URL=https://erp.example.com/api/orders
ERP_AUTH_HEADER=Authorization
ERP_AUTH_VALUE='Bearer replace-me'
ERP_IDEMPOTENCY_HEADER=Idempotency-Key
Local scrape
npm run scrape