Query Salesforce using SOQL.

Execute a SOQL query against Salesforce.

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 properties.

SOQL query to execute

The SOQL query to run against Salesforce

Default 2000

Maximum batch size

Number of records to include in each batch, the minimum is 200, and the maximum is 2,000.

Default NONE
Possible Values
STOREFETCHFETCH_ONENONE

The way you want to store the data.

FETCH_ONE output the first row, FETCH output all the rows, STORE store all rows in a file, NONE do nothing.

Default true

Query More Flag

Whether to fetch more records if there are more beyond the first batch (default: true)

Map containing the first row of fetched data.

Only populated if using fetchType=FETCH_ONE.

SubType object

List containing the fetched data.

Only populated if using fetchType=FETCH.

The number of rows fetched.

The total number of the rows fetched without pagination.

Format uri

The URI of the stored data.

Only populated if using fetchType=STORE.

Salesforce password

The password for authenticating with Salesforce API. Depending on your Salesforce instance, you may need to append the security token to your password (e.g., '<security_token>'). More details here

Salesforce username

The username for authenticating with Salesforce API

Default https://login.salesforce.com/services/Soap/u/63.0/

Salesforce authentication endpoint

The Salesforce SOAP API authentication endpoint URL