Salesforce (REST API)

Web services API for interacting with Salesforce

Go to site
Explore
/
Apps
/
Salesforce (REST API)

Salesforce (REST API) API Integrations

Build and run workflows using the Salesforce (REST API) API. Use 1000s of source-available triggers and actions across 2,000+ apps. Or write custom code to integrate any app or API in seconds.

Overview

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.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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}`,
      },
    })
  },
})

Choose an API to Connect with Salesforce (REST API) API

1
-
24
of
2,000+
apps by most popular

HTTP / Webhook
HTTP / Webhook
Get a unique URL where you can send HTTP or webhook requests
Node
Node
Anything you can do with Node.js, you can do in a Pipedream workflow. This includes using most of npm's 400,000+ packages.
Python
Python
Anything you can do in Python can be done in a Pipedream Workflow. This includes using any of the 350,000+ PyPi packages available in your Python powered workflows.
OpenAI (ChatGPT)
OpenAI (ChatGPT)
OpenAI is an AI research and deployment company with the mission to ensure that artificial general intelligence benefits all of humanity. They are the makers of popular models like ChatGPT, DALL-E, and Whisper.
Salesforce (REST API)
Salesforce (REST API)
Web services API for interacting with Salesforce
HubSpot
HubSpot
HubSpot's CRM platform contains the marketing, sales, service, operations, and website-building software you need to grow your business.
Zoho CRM
Zoho CRM
Zoho CRM is an online Sales CRM software that manages your sales, marketing, and support in one CRM platform.
Stripe
Stripe
Stripe powers online and in-person payment processing and financial solutions for businesses of all sizes.
Shopify Developer App
Shopify Developer App
Shopify is a user-friendly e-commerce platform that helps small businesses build an online store and sell online through one streamlined dashboard.
WooCommerce
WooCommerce
WooCommerce is the open-source ecommerce platform for WordPress.
Snowflake
Snowflake
A data warehouse built for the cloud
MongoDB
MongoDB
MongoDB is an open source NoSQL database management program.
Supabase
Supabase
Supabase is an open source Firebase alternative.
MySQL
MySQL
MySQL is an open-source relational database management system.
PostgreSQL
PostgreSQL
PostgreSQL is a free and open-source relational database management system emphasizing extensibility and SQL compliance.
AWS
AWS
Amazon Web Services (AWS) offers reliable, scalable, and inexpensive cloud computing services.
Twilio SendGrid
Twilio SendGrid
Send marketing and transactional email through the Twilio SendGrid platform with the Email API, proprietary mail transfer agent, and infrastructure for scalable delivery.
Amazon SES
Amazon SES
Amazon SES is a cloud-based email service provider that can integrate into any application for high volume email automation
Klaviyo
Klaviyo
Email Marketing and SMS Marketing Platform
Zendesk
Zendesk
Zendesk is award-winning customer service software trusted by 200K+ customers. Make customers happy via text, mobile, phone, email, live chat, social media.
ServiceNow
ServiceNow
The smarter way to workflow
Notion
Notion
Notion is a new tool that blends your everyday work apps into one. It's the all-in-one workspace for you and your team.
Slack
Slack
Slack is a channel-based messaging platform. With Slack, people can work together more effectively, connect all their software tools and services, and find the information they need to do their best work — all within a secure, enterprise-grade environment.
Microsoft Teams
Microsoft Teams
Microsoft Teams has communities, events, chats, channels, meetings, storage, tasks, and calendars in one place.

Example Use Cases

  • Automate Lead Scoring: Trigger a Pipedream workflow whenever a new lead is created in Salesforce. The workflow can evaluate the lead quality using predefined criteria, update the lead score in Salesforce, and, if the score is high enough, notify the sales team via Slack or email.

  • Sync Salesforce Data with Google Sheets: Keep sales data in sync by using a workflow that runs on a schedule. It can fetch new and updated records from Salesforce and push them to a Google Sheets spreadsheet. This can be used to maintain live reports or share data with team members who don't have direct access to Salesforce.

  • Customer Onboarding Sequence: When a new opportunity is won in Salesforce, trigger a workflow that kicks off a customer onboarding sequence. This could involve creating tasks in project management tools like Asana, sending a welcome email sequence via SendGrid, and enrolling the customer in a specified nurture track in a marketing platform like Mailchimp.

Getting Started

You can install the Pipedream Salesforce app in the Accounts section of your Pipedream account, or directly in a workflow.

Prerequisite: Salesforce Edition with API Access

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

  • Enterprise Edition
  • Unlimited Edition
  • Developer Edition
  • Performance Edition
  • Professional Edition (API access available as an add-on)

Enabling API Access on Salesforce

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

  1. Navigate to your Salesforce instance, and click the Setup wheel in the top-right corner.
  2. Under the Administration tab on the lefthand sidebar, click Users --> Permission Sets.
  3. On the Permissions Set page, click New.
  4. Create a new permission set, give it a label, API name, and description. Example:
    Label: Pipedream API Access API Name: Pipedream Description: Adds a set of permissions required for Pipedream.

Add Permissions

  1. Now that the permission set is created, navigate to System Permissions.

  2. From System Permissions, click Edit.

  3. Select the following permission, and click Save.

  • API Enabled

If you'd like to utilize Pipedream's webhook triggers, you will need to add the following permissions to the permissions set as well:

  • Apex REST Services
  • Author Apex
  • View Roles and Role Hierarchy
  • Modify Metadata Through Metadata API Functions
  • View Setup and Configuration
  1. The list of added permissions (6) should look like this, and click save again.

Add Permission Set to User

  1. From the newly created Permission Set, click Manage Assignments, then Add Assignment.

  2. Select the user you'd like to assign this permission set to, and click Assign. The user should now show up under Current Assignments.

  3. You should now be able to use the Salesforce integration along with the webhook triggers if you configured the required permissions above.

Create Campaign with Salesforce (REST API) API on New Commit from GitHub API
GitHub + Salesforce (REST API)
 
Try it
Create Event with Salesforce (REST API) API on New Email Opened from Postmark API
Postmark + Salesforce (REST API)
 
Try it
Create Record with Salesforce (REST API) API on Custom Webhook Events from Stripe API
Stripe + Salesforce (REST API)
 
Try it
Update Contact with Salesforce (REST API) API on New Submission from Typeform API
Typeform + Salesforce (REST API)
 
Try it
SOQL Search with Salesforce (REST API) API on New Query Results from Snowflake API
Snowflake + Salesforce (REST API)
 
Try it
New Deleted Record (Instant, of Selectable Type) from the Salesforce (REST API) API

Emit new event immediately after a record of arbitrary object type (selected as an input parameter by the user) is deleted

 
Try it
New Deleted Record (of Selectable Type) from the Salesforce (REST API) API

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.

 
Try it
New Outbound Message (Instant) from the Salesforce (REST API) API

Emit new event when a new outbound message is received in Salesforce. See Salesforce's guide on setting up Outbound Messaging. Set the Outbound Message's Endpoint URL to the endpoint of the created source. The "Send Session ID" option must be enabled for validating outbound messages from Salesforce.

 
Try it
New Record (Instant, of Selectable Type) from the Salesforce (REST API) API

Emit new event immediately after a record of arbitrary object type (selected as an input parameter by the user) is created

 
Try it
New Record (of Selectable Type) from the Salesforce (REST API) API

Emit new event (at regular intervals) when a record of arbitrary object type (selected as an input parameter by the user) is created. See the docs for more information.

 
Try it
Add Contact to Campaign with the Salesforce (REST API) API

Adds an existing contact to an existing campaign. See Event SObject and Create Record

 
Try it
Add Lead to Campaign with the Salesforce (REST API) API

Adds an existing lead to an existing campaign. See Event SObject and Create Record

 
Try it
Convert SOAP XML Object to JSON with the Salesforce (REST API) API

Converts a SOAP XML Object received from Salesforce to JSON

 
Try it
Create Account with the Salesforce (REST API) API

Creates a Salesforce account, representing an individual account, which is an organization or person involved with your business (such as customers, competitors, and partners). See Account SObject and Create Record

 
Try it
Create Attachment with the Salesforce (REST API) API

Creates an attachment, which represents a file that a User has uploaded and attached to a parent object. See Attachment SObject and Create Record

 
Try it

Troubleshooting

Unable to connect your account

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:

  1. Navigate to Salesforce Setup.
  2. Under Apps, click Connected Apps, then Connected Apps OAuth Usage.
  1. If Pipedream is not yet installed, click Install, otherwise click Manage App Policies.
  2. Click Edit Policies.
  3. Under OAuth Policies, you should see the setting IP Relaxation. Set this to Relax IP Restrictions.

Instant trigger is not working

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.

  1. Create a New Workflow on Pipedream and add a HTTP trigger.
  2. Login and go to your Salesforce Setup Menu Page.
  3. On the left hand Quick Find Bar, search for Outbound Messages in Process Automation -> Workflow Actions.
  4. Click on the New Outbound Message button in the middle of the page.
  5. Select the Object Type and click Next.
  6. Fill in the Name, Unique Name, and Available Fields to Send fields in the form. On the Endpoint URL field, paste the URL endpoint generated by the HTTP trigger created earlier and then click Save.
  7. Back to the left hand Quick Find Bar, search for Flows in Process Automation.
  8. Click on New Flow button on the upper right hand corner and then select on Record-Trigged Flow and click on Create.
  9. Select the same Object Type as before and select the appropriate flow trigger.
  10. Optionally set Entry Conditions, keep Actions and Related Records selected, and click on Done.
  11. Click on the plus sign below the newly created trigger and click on Action.
  12. Search for Outbound Message and on the search bar select the trigger that was created previously.
  13. Insert a Label and an API Name and then click on Done.
  14. Save the flow by clicking on the Save button, insert a Flow Label and a Flow API Name and then click on Activate next to the Save button.
  15. Back to the Pipedream Workflow, create a new step with the Salesforce Convert SOAP Object action.
  16. In the XML Soap Object field, select the path from the trigger or type in {{steps.trigger.event.body}}.
  17. That's it! You can now deploy the workflow and you will receive instant updates from Salesforce.

Authentication

Salesforce (REST API) uses OAuth authentication. When you connect your Salesforce (REST API) account, Pipedream will open a popup window where you can sign into Salesforce (REST API) 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 (REST API) API.

Pipedream requests the following authorization scopes when you connect your account:

OAuth Request Configurations:
  1. authorization
    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}}
  2. accessToken
    POST{{custom_fields.instancetype}}/services/oauth2/tokencontent-type: application/x-www-form-urlencodedaccept: application/json
    client_id={{oauth.client_id}}&client_secret={{oauth.client_secret}}&redirect_uri={{oauth.redirect_uri}}&grant_type=authorization_code&code={{oauth.code}}
  3. refreshToken
    POST{{custom_fields.instancetype}}/services/oauth2/tokencontent-type: application/x-www-form-urlencodedaccept: application/json
    client_id={{oauth.client_id}}&client_secret={{oauth.client_secret}}&grant_type=refresh_token&refresh_token={{oauth.refresh_token}}