I am currently in the process of developing a sales support tool that integrates with Salesforce. I’m not originally a software engineer, but I’ve been diligently learning and working with Bubble to bring this project to life.
I have successfully enabled OAuth 2.0 User-Agent Flow authentication for users to connect to their Salesforce environment within my Bubble app, as shown in the first image I’ve attached. My understanding is that the access token is automatically saved and refreshed by Bubble.
Now, I need to fetch and update data from the users’ Salesforce environment. For example, I want to add a dedicated API call like “GetOpportunities”, but I’m not sure how to configure it correctly. Specifically, I am unsure about:
How to dynamically set the user’s Salesforce instance URL.
Here’s what I’ve set up so far (please see the second image attached). If anyone has expertise in this area, could you please guide me through the correct configuration for adding an API like “GetOpportunities”? Any help or guidance would be greatly appreciated!
Thank you in advance for your support and assistance.
I understand that I can use [ ] as a placeholder for dynamic values in the URL, and that I need to fetch the userinfo first. I have successfully retrieved the userinfo data. If I am correct, this involves treating the retrieved userinfo as variables.
Would the correct approach be to first save the retrieved userinfo data to the User table and then use that data as variables specified within [ ] in the API URL? I apologize if this approach seems off the mark. Could you please confirm if this is correct, or guide me if there is a better way to handle this?
Thank you so much for your help; it really solved my problem.
If you have time, I would appreciate it if you could also answer the question at the following link: