Features
After adding a TTLock node and configuring credentials, select the function to execute via the Type and Action dropdowns:
- Type: Passcode
- Action: Create Random Passcode / Create Custom Passcode
Create Random Passcode
Let the platform automatically create a random passcode for the lock. Suitable when you don't need to specify the passcode content.
For detailed API parameters: Create Random Passcode - TTLock Open Platform Docs
Steps
- Set the Type dropdown to Passcode
- Set the Action dropdown to Create Random Passcode
- Fill in parameters like lock ID, passcode type, start time, etc. as prompted (or use expressions)
- Click Execute Node and check the
keyboardPwdfield in the output — that's your created random passcode
Tip
When passing parameters via expressions, follow the parameter requirements from the TTLock Open Platform Documentation.
Create Custom Passcode
Manually specify passcode content and transmit it to the lock via Bluetooth, Gateway, WiFi lock, or asynchronous delivery.
For detailed API parameters: Create Custom Passcode - TTLock Open Platform Docs
Steps
- Set the Type dropdown to Passcode
- Set the Action dropdown to Create Custom Passcode
- Fill in parameters like lock ID, passcode, passcode type, add method, etc. as prompted (or use expressions)
- Click Execute Node and wait for transmission to complete — the user can then enter the set passcode on the lock keypad to unlock
Tip
When passing parameters via expressions, follow the parameter requirements from the TTLock Open Platform Documentation.
Time Field Explanation
All time fields in this node (start date, end date) support the following input formats. When using expressions, millisecond timestamps are recommended:
| Format | Example | Description |
|---|---|---|
| Date-time picker | Click directly in the n8n UI | Most convenient |
| Millisecond timestamp | 1746574800000 | 13-digit number |
| Second-level timestamp | 1746574800 | 10-digit number, auto-converted |
| Date string | 2026-05-07 09:00:00 | Auto-parsed |
Next Steps
- Workflow Examples — See complete workflows built with these features