How to use: Append ?action=ACTION_NAME&token=YOUR_TOKEN to the API URL.
POST requests must send JSON body with token, action, and adminEmail.
| Action | Body Fields |
updateEmployee |
email (required), empId, empType, department, jobTitle, managerId (email), mobilePhone, businessPhone, companyName, officeLocation, hireDate, birthDate, gender, division, nickname, idCard, nameTH |
uploadSignature |
email (required), fileData (base64 PNG) |
triggerSync |
(no extra fields needed) |
Important: All POST actions require adminEmail in body. The email must be in the ADMIN_EMAILS list in Script Properties.
| Field | Type | Description |
| empId | string | Employee ID |
| nameEN | string | Full name in English |
| nameTH | string | Full name in Thai / ชื่อไทย |
| nickname | string | Nickname / ชื่อเล่น |
| email | string | Email address |
| department | string | Department name |
| division | string | Division / สายงาน |
| position | string | Job title / ตำแหน่ง |
| level | string | Employee level (e.g. E1, S2) |
| project | string | Office location / Project (comma-separated) |
| mobilePhone | string | Mobile phone number |
| businessPhone | string | Business/office extension |
| manager | string | Manager / Leader name |
| managerEmail | string | Manager / Leader email |
| signatureUrl | string | Signature image URL (Google Drive) |
Returns only active + non-excluded employees.
| Field | Type | Description |
| empId | string | Employee ID |
| displayName | string | Full name |
| email | string | Email address |
| department | string | Department name |
| jobTitle | string | Job title |
| managerId | string | Manager's employee ID |
| managerName | string | Manager's name |
| managerEmail | string | Manager's email |
| employeeType | string | Employee type |
| status | string | active / inactive |
| mobilePhone | string | Mobile phone number |
| businessPhone | string | Business/office phone |
| companyName | string | Company name |
| officeLocation | string | Office/Project (comma-separated) |
| hireDate | string | Hire date (ISO format) |
| yearsOfService | string | Years of service (e.g. "1 yr 3 mo 20 day") |
| birthDate | string | Birth date (YYYY-MM-DD) |
| gender | string | M = Male, F = Female |
| division | string | Division / สายงาน |
| nickname | string | Nickname / ชื่อเล่น |
| idCard | string | ID Card number / เลขบัตรประชาชน |
| nameTH | string | Full name in Thai / ชื่อไทย |
| excluded | string | "true" = hidden from getAll API |
| signatureUrl | string | Signature image URL |
| syncedAt | string | Last sync timestamp |