By default, the prebuilt Salesforce connection communicates via Salesforce REST APIs. However, it doesn’t currently allow you to directly access relative URIs to Salesforce endpoints. These endpoints can be useful, for example, for fetching metadata from your Salesforce environment.
The solution described below involves routing your connection to a relative URI by specifying HTTP headers in integrator.io API exports or imports, acting as a proxy for requests to your Salesforce connection.
Setup
A. Configure your Salesforce connection
First, create or edit a standard Salesforce connection. Record the connection ID at the end of the URL for use below as the Salesforce connection ID.
B. Establish an integrator.io (application) connection
Next, set up an integrator.io connection.
C. Retrieve Salesforce endpoint
Before you can interact with the proxy, you must find which relative URI you want to get data from. See the Salesforce REST API reference for these values.
Export (read) via proxy
In Flow builder, create an export to the application integrator.io, selecting the integrator.io connection that you just created. Define the export as follows:
Name: Give the export a name.
Form view: Choose REST API.
HTTP method: Choose POST.
Headers:
Name | Suggested value |
Integrator-Relative-URI | /services/data/v58.0/sobjects/account/describe |
Integrator-Method | The method to use with your REST call, most likely GET for an export |
Relative URI: Enter the proxy URI for your Salesforce connection, referencing your Salesforce connection ID that you copied above, in the format, /v1/connections/<id>/proxy
.
Export type: Choose All.
Click Preview to see your Salesforce data.
Comments
Please sign in to leave a comment.