Salesforce

CRM OAuth

Read and write Salesforce records, run SOQL queries and call Apex REST endpoints from any Windmill script, flow or app.

Set up in 3 steps

1

Connect from the Resources page

Open Resources, click Add a resource/API and pick salesforce from the OAuth APIs list — there is a separate tile for sandbox orgs. Sign in, then name the resource and save it.

2

Check the instance URL

instance_url pins every call to your org's data host. Windmill fills it from the connection; api_version selects the REST API version if you need to pin one.

3

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.

Submit a script →

Resource type

The shape of the credential every script on this page expects.

FieldTypeRequiredWhat it is
api_versionstringNoSalesforce REST API version path segment, e.g. v60.0. Optional — scripts default to v60.0 when left blank.
instance_urlstringYesOrg 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.
tokenstringYesOAuth 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

Self-hosted instances need a Salesforce connected app configured once by an admin before the tile appears.

Is my token stored on the hub?

Never. It lives only in your own Windmill workspace, encrypted at rest.