The Salesforce (REST API) provides a powerful platform for creating and managing customer relationships with a wide array of features like data manipulation, querying, and complex automation. With Pipedream's serverless execution, you can create workflows that automate your sales processes, sync data with other platforms, enhance customer engagement, and trigger actions based on specific events. Dive into Salesforce data, streamline lead management, track customer interactions, and push or pull data to or from Salesforce seamlessly.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
salesforce_rest_api: {
type: "app",
app: "salesforce_rest_api",
}
},
async run({steps, $}) {
return await axios($, {
url: `${this.salesforce_rest_api.$auth.instancetype}/services/oauth2/userinfo`,
headers: {
Authorization: `Bearer ${this.salesforce_rest_api.$auth.oauth_access_token}`,
},
})
},
})
Synchronize Salesforce with external databases to ensure data accuracy and consistency without manual effort.
Improve customer service responsiveness by triggering real-time notifications to support teams when new tickets are created.
Streamline lead management by automatically scoring and engaging leads through personalized campaigns, enhancing conversion rates.
Keep inventory levels accurate and responsive to sales activity by updating Salesforce in real-time based on e-commerce data.
You can install the Pipedream Salesforce app in the Accounts section of your Pipedream account, or directly in a workflow.
In order to use this application, you must be on a Salesforce Edition that has API Access, and API Access must be enabled. See here for more details.
Salesforce Editions with API Access
Your Salesforce user needs a System Administrator profile in order to enable API access. If you don't have this on your Salesforce Profile, ask your System Administrator to enable API Access for your user.
The most straightforward way to add these permissions is to create a new Permission Set in Salesforce, and to add it to the user once created.
Here is a step-by-step on how to do this:
Create New Permission Set
Add Permissions
Now that the permission set is created, navigate to System Permissions.
From System Permissions, click Edit.
Select the following permission, and click Save.
If you'd like to utilize Pipedream's webhook triggers, you will need to add the following permissions to the permissions set as well:
Add Permission Set to User
From the newly created Permission Set, click Manage Assignments, then Add Assignment.
Select the user you'd like to assign this permission set to, and click Assign. The user should now show up under Current Assignments.
You should now be able to use the Salesforce integration along with the webhook triggers if you configured the required permissions above.
Emit new event when a record of the selected object type is deleted. See the documentation
Emit new event (at regular intervals) when a record of arbitrary object type (selected as an input parameter by the user) is deleted. See the docs for more information.
Emit new event when a new outbound message is received in Salesforce.
Emit new event when a record of the selected object type is created. See the documentation
Adds an existing contact to an existing campaign. See the documentation
Adds an existing lead to an existing campaign. See the documentation
Converts a SOAP XML Object received from Salesforce to JSON
Creates an Attachment on a parent object. See the documentation
If you're having issues connecting your Salesforce account on Pipedream, please ensure that IP Restrictions are not enabled for Pipedream. To learn more about what this means, please see the Salesforce documentation here.
To modify these settings:
If you happen to stumble on the error: UNKNOWN_EXCEPTION: admin operation already in progress
when creating an Instant trigger, you can follow the steps below to use the Salesforce Flow Builder to be able to use webhooks with Pipedream. This is a known error in Salesforce.
{{steps.trigger.event.body}}
.Below is a list of potential HTTP response status codes with their corresponding causes:
The request couldn't be understood, usually because the JSON or XML body contains an error.
The session ID or OAuth token used has expired or is invalid. The response body contains the message and errorCode.
The request has been refused. Check that the logged-in user has appropriate permissions. If the error code is REQUEST_LIMIT_EXCEEDED, the API request limits in your org have been exceeded.
The requested resource couldn't be found. Check the URI for errors, and ensure there are no sharing issues.
The method specified isn’t allowed for the resource indicated in the URI.
The request couldn’t be completed due to a conflict with the current state of the resource. Ensure the API version is compatible with the resource requested.
The requested resource has been retired or removed. Update or delete references to the resource.
The request wasn't executed because it didn't meet one or more preconditions specified in the request headers.
The length of the URI exceeds the 16,384-byte limit.
The entity in the request is in a format that's not supported by the specified method.
Salesforce Edge doesn’t have routing information for the request host. Contact Salesforce Customer Support.
The request wasn’t executed because it wasn't conditional. Add a Conditional Request Header like If-Match to the request.
The combined length of the URI and headers exceeds the 16,384-byte limit.
An error within Lightning Platform has occurred, preventing request completion. Contact Salesforce Customer Support.
Salesforce Edge couldn’t communicate successfully with the Salesforce instance.
The server is currently unable to handle the request, typically due to maintenance or being overloaded.
Salesforce uses OAuth authentication. When you connect your Salesforce account, Pipedream will open a popup window where you can sign into Salesforce and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Salesforce API.
Pipedream requests the following authorization scopes when you connect your account:
GET
{{custom_fields.instancetype}}/services/oauth2/authorize
?
client_id={{oauth.client_id}}
&
redirect_uri={{oauth.redirect_uri}}
&
state={{oauth.state}}
&
response_type=code
&
scope={{oauth.space_separated_scopes}}
POST
{{custom_fields.instancetype}}/services/oauth2/token
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{oauth.client_id}}
&
client_secret={{oauth.client_secret}}
&
redirect_uri={{oauth.redirect_uri}}
&
grant_type=authorization_code
&
code={{oauth.code}}
POST
{{custom_fields.instancetype}}/services/oauth2/token
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{oauth.client_id}}
&
client_secret={{oauth.client_secret}}
&
grant_type=refresh_token
&
refresh_token={{oauth.refresh_token}}