
Salesforce SoqlQuery
CertifiedEnterprise EditionRun SOQL query and fetch rows
Salesforce SoqlQuery
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.
type: io.kestra.plugin.ee.salesforce.SoqlQueryExamples
Query Salesforce Contacts and store as ION file.
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
connection *RequiredNon-dynamic
Salesforce connection
Partner API credentials using username/password with auth endpoint or access token with instance URL.
io.kestra.plugin.ee.salesforce.SalesforceConnection
Salesforce access token
Session or OAuth access token. When set, username and password are ignored; requires instanceUrl.
https://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/.
Salesforce instance URL
Instance base URL required with accessToken (for example https://mydomain.my.salesforce.com).
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.
Salesforce username
Username for SOAP authentication. Ignored when accessToken is provided.
query *Requiredstring
SOQL query
SOQL statement rendered with task variables before execution. Use selective filters to control result size.
batchSize integerstring
2000Batch size
Records per page when querying; minimum 200, maximum 2,000. Default is 2,000.
fetchType string
NONESTOREFETCHFETCH_ONENONEFetch 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.
pluginDefaultsRef Non-dynamicstring
Reference (ref) of the pluginDefaults to apply to this task.
queryMore booleanstring
truePaginate through results
When true (default), continues with queryMore until all pages are fetched.
Outputs
row object
First fetched row
Populated when fetchType=FETCH_ONE.
rows array
Fetched rows
Populated when fetchType=FETCH.
size integer
Fetched row count
total integer
Total available rows
uri string
uriStored results URI
Populated when fetchType=STORE; points to the internal storage object.