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.

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
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.
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.
Schedule
Schedule
Trigger workflows on an interval or cron schedule.
Google Drive
Google Drive
Google Drive is a file storage and synchronization service which allows you to create and share your work online, and access your documents from anywhere.
Google Sheets
Google Sheets
Use Google Sheets to create and edit online spreadsheets. Get insights together with secure sharing in real-time and from any device.
Filter
Filter
Specify a condition that your workflow must meet and whether you'd like to proceed or end workflow execution.
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.
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.
Data Stores
Data Stores
Use Pipedream Data Stores to manage state throughout your workflows.
GitHub
GitHub
Where the world builds software. Millions of developers and companies build, ship, and maintain their software on GitHub—the largest and most advanced development platform in the world.
Formatting
Formatting
Pre-built actions to make formatting and manipulating data within your workflows easier.
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.
Airtable (OAuth)
Airtable (OAuth)
Airtable is a low-code platform to build next-gen apps. Move beyond rigid tools, operationalize your critical data, and reimagine workflows with AI.
Zoom
Zoom
Zoom is the leader in modern enterprise video communications, with an easy, reliable cloud platform for video and audio conferencing, chat, and webinars.
Google Calendar
Google Calendar
With Google Calendar, you can quickly schedule meetings and events and get reminders about upcoming activities, so you always know what’s next.
Gmail
Gmail
Gmail offers private and secure email by Google at no cost, for business and consumer accounts.
Gmail (Developer App)
Gmail (Developer App)
Private and secure email by Google at no cost, for business and consumer accounts. Use this app to connect your own developer account credentials.
Email
Email
Trigger workflows on new emails, and send emails to yourself as part of a Pipedream workflow.
Delay
Delay
Delay, pause, suspend, or have the execution of your workflow wait for as little as one millisecond, or as long as one year.
Go
Go
Anything you can do in Go, you can do in a Pipedream Workflow. You can use any of Go packages available with a simple import.
Premium
Zoom Admin
Zoom Admin
Video conferencing (includes account-level scopes) for Zoom Admins.
Twilio
Twilio
Twilio is a cloud communications platform for building SMS, Voice & Messaging applications on an API built for global scale.
Bash
Bash
Run any Bash in a Pipedream step within your workflow, including making curl requests.

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 Account with Salesforce (REST API) API on New Requests from HTTP / Webhook API
HTTP / Webhook + Salesforce (REST API)
 
Try it
Create Account with Salesforce (REST API) API on New Item in Feed from RSS API
RSS + Salesforce (REST API)
 
Try it
Create Account with Salesforce (REST API) API on New Message from Discord API
Discord + Salesforce (REST API)
 
Try it
Create Account with Salesforce (REST API) API on New Message In Channels from Slack API
Slack + Salesforce (REST API)
 
Try it
Create Account with Salesforce (REST API) API on New Message in Channel from Discord Bot API
Discord Bot + 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}}