The Data Getter - No Nav Edition is a Lightning Web Component (LWC) designed for use in Salesforce Screen Flows. It enables users to execute SOQL queries and display the resulting records on the same screen. This avoids the need for additional navigation, streamlining the user experience.
- SOQL Query Input: Allows users to input a general text query directly.
- Integration: We use integration to convert the general text to SOQL.
- Cache Included: Cache mechanism for improving perfomance .
- Real-Time Data Display: Shows query results dynamically on the same screen.
- Debug Mode: Enable this mode to receive new prompt messages when errors occur, and to access additional console logs for troubleshooting.
To use the Gemini API, you'll need to obtain an API key. Follow these steps to get your API key from Google.
🔹 Step 1: Go to Google AI Studio Google AI Studio Log in with your Google/Gmail account 🔹 Step 2: Get Your API Key Click your Google account icon (top-right corner) Choose “Get API Key” Click “Create API Key” Copy this key — you’ll use it as the x-goog-api-key header for calling Gemini APIs.
You can use my API key since it's free, but I recommend generating your own in case it becomes paid later—you’ll then have full control.
- Keep Your API Key Confidential: Do not share your API key publicly or include it in client-side code.
- Regenerate Keys if Compromised: If you believe your API key has been compromised, regenerate it immediately from the Gemini dashboard.
- Monitor Usage: Regularly check your Gemini usage to ensure there are no unexpected activities.
By following these steps, you'll be able to obtain and securely use your Gemini API key for accessing the Gemini services.



To configure Salesforce to communicate with the Gemini API, follow these steps to add a remote site setting.
-
Log in to Salesforce:
- Go to your Salesforce instance and log in with an account that has administrative privileges.
-
Navigate to Remote Site Settings:
- Click on the Setup icon (the gear icon) in the upper right corner.
- In the quick find box, type
Remote Site Settings
and select it from the dropdown list.
-
Create a New Remote Site:
- Click the New Remote Site button.
-
Fill in the Remote Site Details:
- Remote Site Name: Enter a name for the remote site. Example:
Gemini_2_5_Flash
. - Remote Site URL: Enter
https://generativelanguage.googleapis.com/
.- Ensure you use
https://
for the secure protocol.
- Ensure you use
- Description: Optionally, add a description such as
Remote site for Gemini API
.
- Remote Site Name: Enter a name for the remote site. Example:
-
Save the Remote Site:
- Click the Save button to create the remote site setting.
-
Verify the Remote Site Setting:
- After saving, you should see the new remote site listed in the Remote Site Settings. You can click on the name to view or edit details if needed.
- Security and Access: Ensure that the remote site setting matches the Gemini API URL exactly. The protocol (
https://
) and domain must be correct. - Testing Connectivity: Use an HTTP request tool or write Apex code to test if Salesforce can access the Gemini API.
- Apex Integration: Consider using named credentials for storing authentication securely and simplifying API calls.
By following these steps, you can configure Salesforce to communicate with the Gemini API. Ensure that the URL and other details are accurate to avoid any issues.
-- Here I used Text Template, you can use formula fields/text variables as well.
-- Enable Developer Mode by passing true to this XML variable.
- If you encounter problems, it could be due to an invalid API key.
- Consider creating a new API key and updating your code with the new key.
- Add more debug statements to help identify and resolve issues.
- Use the test flow available in the
flow
folder for testing purposes.