Salesforce
CRM OAuthRead and write Salesforce records and run SOQL and SOSL queries from any Windmill script, flow or app.
Set up in 3 steps
Connect from the Resources page
Open Resources, click Add a resource/API and pick salesforce under Instance-configured OAuth APIs; sandbox orgs have their own tile. Click Connect and sign in.
Check the instance URL
Connect fills instance_url, your org's My Domain URL such as https://acme.my.salesforce.com, under Connection details: every call goes to that host. Leave api_version empty unless you need to pin one.
Run your first script
Fork any script below and read before writing anything.
Scripts
Building blocks, if none of the projects above fit. Fork one, run it, or call it as a step inside your own flow.
New or Updated Record
Upsert Record
Upload File
Update Record
SOSL Search
Query More
Parameterized Search
List Objects
Get User Info
Get Related Records
Get Record
Execute SOQL Query
Describe Object
Delete Record
Create Record
Convert Lead
Trigger flows from Salesforce
Salesforce is not only a destination. These inbound paths are supported today.
New or updated record (scheduled poll)
The New or Updated Record trigger script polls one object (Lead, Account, a custom object) and returns the records modified since its last run. To run it, open a flow, add a trigger and choose Scheduled Poll, then pick the trigger script and an interval. The steps after it run once per new item, and each flow keeps its own cursor.
Resource type
The shape of the credential every script on this page expects.
salesforce
View raw schema →| Field | Type | Required | What it is |
|---|---|---|---|
| api_version | string | No | Salesforce REST API version path segment, e.g. v60.0. Optional — scripts default to v60.0 when left blank. |
| instance_url | string | Yes | Org data host returned in the OAuth token response, e.g. https://acme.my.salesforce.com (production) or https://acme--sandbox.sandbox.my.salesforce.com (sandbox). Every REST call is made against this host, not login.salesforce.com. |
| token | string | Yes | OAuth access token. Populated by Windmill's OAuth flow. |
Questions
Sandbox or production?
Separate tiles, separate sign-in hosts. The saved resource keeps the same type either way, so scripts do not fork.
There is no Connect button on my instance
A Windmill instance admin has to add a Salesforce connected app's consumer key and secret once, under Instance settings → Auth/OAuth/SAML → OAuth (and salesforce_sandbox for sandbox orgs). Until then there is no tile.
Is my token stored on the hub?
Never. It lives only in your own Windmill workspace, encrypted at rest.