Issue with Incomplete Data Storage in Database for Scheduled API Workflow on Lists






Hi everyone,

I’m having trouble with my backend workflows while trying to store data for each employee individually over a date range.

Here’s the setup:

  1. I have a fetching employees backend workflow that retrieves all employees according to my filter criteria, and it returns the list as expected.
  2. In this workflow, I’m using Schedule API Workflow on a List to call a secondary workflow, call_api_one_by_one, for each filtered employee.
  3. Within call_api_one_by_one, I call an API and then use Schedule Workflow on a List again to trigger the datacopy backend workflow.
  4. In datacopy, I’m passing the following data: emp_email, date, status, and totalHours, intending to create database entries for each day within a selected date range (start date: 01-10-2024, end date: 09-10-2024).

However, only emp_email is being stored in the database, and I’m only seeing 8 entries instead of the expected 72 (assuming 8 employees * 9 days = 72 entries). My goal is to store data for each employee from the start date to the end date individually.

Can anyone help me understand why only the email is being stored and why the total entries aren’t as expected? Any insights into potential issues in my workflows would be greatly appreciated!

Thank you!

Response of the Api is coming like in below format:
{
“attendanceRecords”: [
{
“date”: “2024-10-01”,
“userId”: “@ajmerainfotech.com",
“attendanceStatus”: “Present”,
“workHours”: “08:10”
},
{
“date”: “2024-10-02”,
“userId”: "
@ajmerainfotech.com”,
“attendanceStatus”: “Gandhi Jayanti (Holiday)”,
“workHours”: “00:00”
},
{
“date”: “2024-10-03”,
“userId”: “***@ajmerainfotech.com”,
“attendanceStatus”: “Present”,
“workHours”: “09:28”
}
],
“notification”: “Data retrieval successful”
}

This topic was automatically closed after 14 days. New replies are no longer allowed.