Pagination Setup step for Data Stream Action

Oscar Mateos
Tera Contributor

I made a data stream action and I'm having issues with the pagination setup step.

In the execution details, I'm getting the first 20 item count but the pagination is not working. I'm only getting 1 page count and I know there's way more than 20 items.  Also I'm getting an empty pageToken in the execution detailsHere's what I have in the Pagination Setup step:Capturewdwdwd3t4t4.PNG

In the REST step, I have a query parameter name "PageToken" and for the value I'm using the data pill pickers to get the pageToken variable in the pagination setup step.Capturewdwdwd3wt333333333sds.PNG

 

Any Ideas what the issue could be? New to data stream action.resultsdatastream.PNG

 

 

 

Payload return Structure:

{
    "Records": [
        {
            "TimeCreated": "2024-03-11T05:36:35Z",
            "ApprovalRequests": [
                {
                    "State": "Approved",
                    "ApprovalRequired": true,
                    "Approver": {
                        "UniqueName": "JMANN1",
                        "PasswordAdapter": "PasswordAdapter1"
                    }
                }
            ],
            "Active": true,
            "ApprovedState": "Approved",
            "StatusString": "Paid",
            "InitialUniqueName": "IRTEST123",
            "TimeUpdated": "2024-03-21T21:06:39Z",
            "UniqueName": "IRTEST123",
            "Name": "IRTEST123"
        }], 
 
"PageToken": "QUYzOEFRT06DTW9hNlVz"
}
1 ACCEPTED SOLUTION

Vamshi5
ServiceNow Employee
ServiceNow Employee

Could you try assigning pageToken to response Body and update the expression to $.PageToken.

Vamshi5_0-1712767342872.png

By doing this you shall get access to pageToken of previous request.

View solution in original post

1 REPLY 1

Vamshi5
ServiceNow Employee
ServiceNow Employee

Could you try assigning pageToken to response Body and update the expression to $.PageToken.

Vamshi5_0-1712767342872.png

By doing this you shall get access to pageToken of previous request.