Connect your app to Salesforce
You can connect your Lovable app to Salesforce to read and update customer information like accounts, contacts, and cases. This lets you build internal tools or customer portals that use your live Salesforce data.
Anyone building an app that needs to interact with Salesforce data, especially for internal tools or customer-facing portals.
Do this, in order
- 1
In Salesforce, create a new External Client App, giving it a name like 'Lovable Integration' and your email.
This app acts as a secure gateway for Lovable to connect to your Salesforce data.
- 2
Enable OAuth settings for this External Client App, setting the Callback URL to `https://api.lovable.dev/workspaces/connectors/standard/oauth/callback` and adding 'Manage user data via APIs (api)' and 'Perform requests at any time (refresh_token, offline_access)' to the OAuth Scopes.
This tells Salesforce that Lovable is allowed to access your data and stay connected without you having to log in repeatedly.
- 3
Retrieve the 'Consumer Key' (your Client ID) and 'Consumer Secret' (your Client Secret) from the OAuth Settings of your new External Client App in Salesforce.
These are the unique credentials Lovable needs to identify itself to Salesforce.
- 4
In Lovable, go to 'Connectors', select 'Salesforce', and click 'Add connection'.
This starts the process of setting up the connection in Lovable.
- 5
Enter a display name (e.g., 'Salesforce Prod'), select the correct environment (Production or Sandbox), provide your Salesforce org's 'My Domain URL' (e.g., `https://acme.my.salesforce.com`), and paste the Client ID and Client Secret you copied from Salesforce.
This configures Lovable with the necessary details to find and authenticate with your specific Salesforce organization.
- 6
Choose whether to share this connection with other members of your Lovable workspace or keep it private.
This controls who else in your team can use this Salesforce connection in their projects.
- 7
Click 'Connect' and, when prompted, sign in to Salesforce and grant Lovable the requested permissions.
This completes the secure handshake between Lovable and Salesforce, authorizing the connection.
Paste this into your project
Use Salesforce and build a dashboard showing open Cases by priority and status.
Words decoded
- CRM platform
- A software system that helps businesses manage customer relationships, sales, and support.
- External Client App
- A special setup within Salesforce that allows other applications, like Lovable, to securely connect and interact with your Salesforce data.
- OAuth
- A secure way for you to give one application (Lovable) permission to access your information in another application (Salesforce) without sharing your password directly.
- Client ID
- A public identifier for your Lovable connection, like a username for an app.
- Client Secret
- A secret key for your Lovable connection, like a password for an app, that must be kept confidential.
- SOQL
- Salesforce Object Query Language, which is like a special search language used to find specific information within your Salesforce database.
- API limits
- Restrictions on how many requests an application can make to Salesforce in a certain period, to prevent overuse and ensure system stability.
- My Domain URL
- A unique web address for your specific Salesforce organization, like `yourcompany.my.salesforce.com`.
Where people get stuck
- Sharing your Client Secret publicly, as it functions like a password.
- Using an incorrect Callback URL in your Salesforce External Client App settings, which will cause a 'redirect_uri_mismatch' error.
- Attempting to connect without having the Lovable workspace owner or admin role.
- Forgetting that all API requests count against your Salesforce org's API limits.
The short version, steps, decoder and prompt on this page are written automatically from Lovable's own documentation and can lag or misread it. The official page is always the authority.