Api workflow Automatic adding things daily only if for that date nothing is added in the DB

Need help with an api workflow I am creating for marking attendance where if user checks in and checks out the attendance will be calculated based on hours but for days when user doesn’t mark anything in that case attendance should automatically marked for that date and that row should be filled in db automatically.This last part I am unable to achieve as it will help in view attendance Please help with this.