Link Apps Script to PipeDrive through OAuth

oauth
#1

Hello,

I’m trying to use a webhook to trigger an Apps Script project based on the provided JSON.
Although I have gotten this to work, I want to be able to authenticate through OAuth for some proper security.
Unfortunately this appears to be unavailable?
I have noticed that PipeDrive does support OAuth, but only through PipeDrive Apps.

Essentially my question is this: How can I get data from PipeDrive to an external Apps Script project while utilising both events and OAuth?

Any tips are greatly appreciated :slight_smile:

#2

Hi Sam.
You need to make your Apps Script project act as the client.

First, you need to create an app, as described here: https://pipedrive.readme.io/docs/marketplace-creating-a-proper-app

Once you create your app (which can be private), you get the client_id and client_secret which you can use within your Apps Script project to authenticate the requests.

About this last point, you can probably find what you need on the Apps Script documentation.

It looks like Apps Script has a library to manage external APIs with OAuth. Here’s a couple links I found which might help:

  1. https://developers.google.com/apps-script/guides/services/external
  2. https://github.com/gsuitedevs/apps-script-oauth2
1 Like