Showing results for 
Search instead for 
Did you mean: 
Regular Visitor

Retrieving "@odata.nextLink" from Salesforce "Get Records" Action

I am looking to use the Get Records action from Salesforce to pull down a list of records matching a given set of criteria. If the number of records exceeds the default maximum batch size, then additional records can be returned using the a URL which is returned in actionBody('xxxxxxxxx')['@odata.nextLink'].


The flow i have created (in pseduocode) is below. 


trigger - Manually trigger a flow

action - Salesforce:Get Records

action - Variables: Initalize Variable - nextLink (string) = actionBody('Get_Records')['@odata.nextLink']

action - SQL Server: Execute Stored Procedure (details not important)


      action - ?? get next result set ??

      action - Variables - Set Variable: nextLink (string) = actionBody('Get_Records')['@odata.nextLink']



I have tried to use a HTTP GET action using the url provided above, but it fails with "Authentication Error". Perhaps this question is better asked: how do I use the same session that was used for the salesforce connector to retrieve the next result set using HTTP GET?  From my understanding of salesforce REST API, there woudl be a session id generated but it does not seem to be accessible as part of the salesforce Get Records action, or via the connector.




Community Support
Community Support

Re: Retrieving "@odata.nextLink" from Salesforce "Get Records" Action

Hi @CraigD,


It seems that you are trying to use HTTP action in your flow, more details about HTTP action, please check this blog for a reference:


Are you trying to get output parameters from the action “Execute Stored Procedure”? If yes, there is a current limitation that when invoking a Stored Procedure on on-premises SQL server, output values for OUTPUT parameters are not returned. You can still specify input values for OUTPUT parameters. Please see this doc for more details about known limitations on SQL server:

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Regular Visitor

Re: Retrieving "@odata.nextLink" from Salesforce "Get Records" Action

Apologies if this was unclear. I am trying to fetch the next result set from a salesforce "Get Records" and have not been able to find a way do this. 


The value of "nextLink" is a URL, however merely executing a HTTP GET of the URL fails, so presumably there is a context in which this needs to be executed (ie some additional headers) to get this to work.


Thanks again for your response. I have updated the originla question to provide additional details.


Helpful resources


Super User Program Update

Three Super User rank tiers have been launched!


Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021


New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!


Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Top Kudoed Authors
Users online (6,599)