How to get the last_id from the meta data from the API response

:bullseye: What is your goal?

in the trigger I want to send the last_id in the second time, the first time it will be 0

:thinking: What is the problem?

i’m not able to get the last id or the make is not sennding it

:test_tube: What have you tried so far?

i have tried “last_id”: “{{ifempty(trigger.id, 0)}}” but not getting

here is my code:
{
“url”: “/contacts”,
“method”: “GET”,

"headers": {
    "Authorization": "Bearer {{connection.accessToken}}",
    "Content-Type": "application/json"
},

"qs": {
    "size": 100,
    // This handles the "Next Execution" (Run 2, Run 3...)
    "last_id": "{{ifempty(trigger.id, 0)}}"
},

"response": {
    "iterate": "{{body.data}}",

    "trigger": {
        "type": "date",
        "id": "{{item.id}}",
        "date": "{{item.created_at}}",
        "order": "desc"
    },

    "output": "{{item}}",
    "limit": "{{parameters.limit}}"
},

"pagination": {
    "condition": "{{body.meta.remaining > 0}}",

    "qs": {
        "last_id": "{{body.meta.last_id}}"
    }
}

}

here is the api response: (postman)
{
“success”: true,
“status”: “success”,
“message”: “Contacts found”,
“data”: [
{
“id”: 114,
“uniqueid”: “dandasdn”,
“firstname”: “Fname”,
“lastname”: “Lname”,
“email”: “name@exaple.com”,
“phone”: “”,
“address”: “”,
“country”: null,
“note”: null,
“created_at”: “2025-08-03T14:44:01.688Z”,
“updated_at”: “2025-11-07T15:03:11.946Z”
}
],
“meta”: {
“last_id”: 114,
“returned”: 100,
“remaining”: 1019,
“total_after_last_id”: 1119
}
}

You can try to update your HTTP Module body to fix the pagination cursor reference.

“qs”: {
“size”: 100,
“last_id”: “{{ifempty(pagination.last_id; 0)}}” },
“pagination”: {
“condition”: “{{body.meta.remaining > 0}}”,
“qs”: {
“last_id”: “{{body.meta.last_id}}”
}}

Let me know how it goes!

Hi Karmic, Thank you for your reply

Actually, I’m new here on the make, and I tried with your code, but I’m still not getting the new data. I just got data from the api for the first time, but it does not give me data the second time

So first I called the api and got data (100 Contacts ) in response, after that I jumped on my platform and added a new contact.

and then I clicked on the run once button and got nothing

Please see the ss blow

I also don’t want to use the condition in the code because it give me the last data every time which means there is no meta.remaining > 0

Here is my current code for the Trigger: Contact Created

{

"url": "/contacts",

"method": "GET",



"headers": {

    "Authorization": "Bearer {{connection.accessToken}}",

    "Content-Type": "application/json"

},



"qs": {

    "size": 100,

    "last_id": "{{ifempty(pagination.last_id, 0)}}"

},



"response": {

    "iterate": "{{body.data}}",



    "trigger": {

        "type": "date",

        "id": "{{item.id}}",

        "date": "{{item.created_at}}",

        "order": "desc"

    },



    "output": "{{item}}",

    "limit": "{{parameters.limit}}"

},



"pagination": {

    "qs": {

        "last_id": "{{body.meta.last_id}}"

    }

}

}