Skip to main content

Integration & Automation-leave synchronization DingTalk attendance

1. Usage scenarios

This example describes how to use integrated automation in YIDA to automatically synchronize YIDA attendance when a leave application is submitted and approved on DingTalk.

For example, an employeeThe application for sick leave from 2024-06-05 to 2024-06-07 was submitted on YIDA. After the approval of the approver is passed, the attendance from 2024-06-05 to 2024-06-07 on flow chart will be displayed as sick leave 」.

2. Implement functions

2.1. Create flow chart

Note: By default, the Leave type on this page is fixed to the holiday rule in the DingTalk management background (as shown in the figure). To add the leave type, contact the organization administrator to synchronize the DingTalk holiday rule.

2.2. Configuration Integration & Automation

[Leave application] approved:

Call the connector to query DingTalk vacation types:

The script node handles the leave type parameter to synchronize DingTalk attendance.

var holidayTypeResult = holidayTypeResultJson ? JSON.parse(holidayTypeResultJson) : [];
var holidayTypeCode = '';
var nowHolidayType = holidayTypeResult.filter(function(item){
return item.leave_name === type;
});
if(nowHolidayType.length){
holidayTypeCode = nowHolidayType[0].leave_name + "##" + nowHolidayType[0].leave_view_unit;
}
outputs.add("请假类型编码","holidayTypeCode",holidayTypeCode);

Call connector to synchronize DingTalk attendance leave

3. Effect display

Submit a leave application on YIDA:

DingTalk attendance-personal statistics:

4. Try it online

This doc is generated using machine translation. Any discrepancies or differences created in the translation are not binding and have no legal effect for compliance or enforcement purposes.
Copyright © 2024钉钉(中国)信息技术有限公司和/或其关联公司浙ICP备18037475号-4