New to Kestra?
Use blueprints to kickstart your first workflows.
Run SOQL queries against Salesforce from Kestra to extract Account and company data into reusable files for reporting, analytics, and data pipelines.
id: salesforce-query-company
namespace: company.team
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, Name, Industry, Type, Website, Phone FROM Account WHERE
CreatedDate = LAST_WEEK"
fetchType: STORE
Pull company records (Accounts) out of Salesforce on a schedule by running a SOQL query directly from Kestra. This blueprint extracts every Account created in the last week, including its name, industry, type, website, and phone, then stores the result as a queryable file you can hand off to reporting, analytics, or any downstream data pipeline. It closes the common gap between your CRM and your data platform without custom ETL scripts or manual exports.
A single query_contacts task of type io.kestra.plugin.ee.salesforce.SoqlQuery connects to your Salesforce org and runs a SOQL statement. The query SELECT Id, Name, Industry, Type, Website, Phone FROM Account WHERE CreatedDate = LAST_WEEK returns all Accounts created in the trailing week. With fetchType: STORE, Kestra writes the result set to internal storage and exposes it as a downloadable, ion-formatted file rather than holding rows in memory, so the output scales to large result sets.
Id, Name, Industry, Type, Website, Phone) instead of full object dumps.Salesforce schedules reports inside its own UI, but it cannot push data into your warehouse, retry a failed export, or trigger downstream jobs. With Kestra you can run this query on an event or schedule trigger, add automatic retries on transient API failures, capture execution lineage and the exact output produced, and chain the extract into loads and transforms. Everything stays declarative in YAML and lives in Git, so the pipeline is reviewable and reproducible.
A Salesforce org with API access and a user permitted to run SOQL queries against the Account object.
SALESFORCE_USERNAME: the Salesforce login username.SALESFORCE_PASSWORD: the password, with the security token appended if required.SALESFORCE_AUTH_ENDPOINT: the SOAP login endpoint for your org (production or sandbox).SALESFORCE_USERNAME, SALESFORCE_PASSWORD, and SALESFORCE_AUTH_ENDPOINT secrets to your Kestra instance.query_contacts.Contact, Opportunity, or Lead.WHERE clause to filter by date range, owner, or region.