Salesforce SoqlQuery

Salesforce SoqlQuery

Certified
Enterprise Edition

Run SOQL query and fetch rows

Execute a SOQL query via the Partner API with paging enabled by default. Supports returning rows inline, a single row, or storing results to internal storage.

yaml
type: io.kestra.plugin.ee.salesforce.SoqlQuery

Query Salesforce Contacts and store as ION file.

yaml
id: query_salesforce_contacts
namespace: company.sales

tasks:
  - id: query_contacts
    type: io.kestra.plugin.ee.salesforce.SoqlQuery
    connection:
      username: "{{ secret('SALESFORCE_USERNAME') }}"
      password: "{{ secret('SALESFORCE_PASSWORD') }}"
      authEndpoint: "{{ secret('SALESFORCE_AUTH_ENDPOINT') }}"
    query: "SELECT Id, FirstName, LastName, Email FROM Contact WHERE CreatedDate = LAST_WEEK"
    fetchType: STORE
Properties

Salesforce connection

Partner API credentials using username/password with auth endpoint or access token with instance URL.

Definitions
accessTokenstring

Salesforce access token

Session or OAuth access token. When set, username and password are ignored; requires instanceUrl.

authEndpointstring
Defaulthttps://login.salesforce.com/services/Soap/u/63.0/

Salesforce authentication endpoint

SOAP login endpoint used with username/password. Defaults to https://login.salesforce.com/services/Soap/u/63.0/.

instanceUrlstring

Salesforce instance URL

Instance base URL required with accessToken (for example https://mydomain.my.salesforce.com).

passwordstring

Salesforce password

Password for SOAP authentication (append the security token when required, for example <password><token>). Only used when accessToken is empty. For more details, refer to the Salesforce Documentation.

usernamestring

Salesforce username

Username for SOAP authentication. Ignored when accessToken is provided.

SOQL query

SOQL statement rendered with task variables before execution. Use selective filters to control result size.

Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.

Definitions
assetFailureBehaviorstring
Possible Values
IGNOREFAILWARN

Asset failure behavior

Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.

enableAutobooleanstring

Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.

inputsarray

The assets consumed as inputs.

id*string
Min length1
typestring
outputs

The assets produced as outputs.

id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*string
Min length1

Custom asset type

descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
Default2000

Batch size

Records per page when querying; minimum 200, maximum 2,000. Default is 2,000.

DefaultNONE
Possible Values
STOREFETCHFETCH_ONENONE

Fetch strategy

FETCH returns all rows, FETCH_ONE returns the first row, STORE writes all rows to internal storage and returns a URI, NONE returns counts only. Default is NONE.

Defaulttrue

Paginate through results

When true (default), continues with queryMore until all pages are fetched.

First fetched row

Populated when fetchType=FETCH_ONE.

SubTypeobject

Fetched rows

Populated when fetchType=FETCH.

Fetched row count

Total available rows

Formaturi

Stored results URI

Populated when fetchType=STORE; points to the internal storage object.