Salesforce Sales Cloud · Arazzo Workflow

Salesforce Sales Cloud Paginated SOQL Export

Version 1.0.0

Run a large SOQL query, then page to the next batch when the first is not complete.

1 workflow 1 source API 1 provider
View Spec View on GitHub CloudCRMCustomer ManagementEnterpriseSalesArazzoWorkflows

Provider

salesforce-sales-cloud

Workflows

paginated-soql-export
Execute a SOQL query and fetch the next batch when not done.
Runs the supplied SOQL query, branches on the done flag, and when more records remain retrieves the next batch using the query locator.
2 steps inputs: accessToken, query, queryLocator outputs: firstBatchDone, nextBatchRecords, totalSize
1
runQuery
Execute the SOQL query and read the first batch.
2
nextBatch
Retrieve the next batch of results using the query locator.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Salesforce Sales Cloud Paginated SOQL Export
  summary: Run a large SOQL query, then page to the next batch when the first is not complete.
  description: >-
    A pagination pattern over the Query resource. The workflow runs a SOQL query
    and inspects the done flag; when more results remain it derives the query
    locator from the nextRecordsUrl and fetches the next batch, otherwise it ends
    after the first page. Every step inlines its request and the OAuth bearer
    Authorization header.
  version: 1.0.0
sourceDescriptions:
- name: queryApi
  url: ../openapi/salesforce-sales-cloud-query-api-openapi.yml
  type: openapi
workflows:
- workflowId: paginated-soql-export
  summary: Execute a SOQL query and fetch the next batch when not done.
  description: >-
    Runs the supplied SOQL query, branches on the done flag, and when more
    records remain retrieves the next batch using the query locator.
  inputs:
    type: object
    required:
    - accessToken
    - query
    - queryLocator
    properties:
      accessToken:
        type: string
        description: OAuth 2.0 access token used as the Bearer credential.
      query:
        type: string
        description: The SOQL query string to execute.
      queryLocator:
        type: string
        description: >-
          The query locator (the identifier at the end of nextRecordsUrl) used to
          fetch the next batch when the first page is not done.
  steps:
  - stepId: runQuery
    description: Execute the SOQL query and read the first batch.
    operationId: executeSOQLQuery
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.accessToken
    - name: q
      in: query
      value: $inputs.query
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      done: $response.body#/done
      totalSize: $response.body#/totalSize
      nextRecordsUrl: $response.body#/nextRecordsUrl
    onSuccess:
    - name: morePages
      type: goto
      stepId: nextBatch
      criteria:
      - context: $response.body
        condition: $.done == false
        type: jsonpath
    - name: complete
      type: end
      criteria:
      - context: $response.body
        condition: $.done == true
        type: jsonpath
  - stepId: nextBatch
    description: Retrieve the next batch of results using the query locator.
    operationId: getNextQueryResults
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.accessToken
    - name: queryLocator
      in: path
      value: $inputs.queryLocator
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      done: $response.body#/done
      records: $response.body#/records
  outputs:
    firstBatchDone: $steps.runQuery.outputs.done
    totalSize: $steps.runQuery.outputs.totalSize
    nextBatchRecords: $steps.nextBatch.outputs.records

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/salesforce-sales-cloud-paginated-soql-export-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.