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






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”
}

@adam30 @boston85719 @tunacardak @hanan1 @Jici @ntabs @farouk.zemmouri

@adamhholmes @animisha45

@Zeroic

Can someone help me with this issue ?

Did you have a look at the logs?
Check the logs for your app to see what data is being retured by the api call, what date is sent to the scheduled workflow and if it is storing it or not.

It is probably something to do with date type not matching. It looks like your api is returning a date in a text format and bubble is not able to read it. If possible, send a UNIX timestamp with the API call so it becomes easier.

I’ve reviewed it but didn’t find any mistakes. Also, the date type is correct.