Templates / Better Oauth2.0 workflow for Pipedrive CRM with Supabase

Better Oauth2.0 workflow for Pipedrive CRM with Supabase

Ready for 3.0

by Priya Jain · 2,067 views · created 2024-07-06 · Engineering

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This workflow has 20 nodes and runs when an HTTP GET request hits its webhook URL (plus 2 other triggers). Along the way it connects Supabase. It also calls oauth.pipedrive.com over HTTP.

How it runs

Trigger: When an HTTP GET request hits its webhook URL (plus 2 other triggers).

  1. convert clientId and secret to base (Code): runs custom JavaScript code
  2. Supabase: get
  3. Get Pipedrive Token (Supabase): get
  4. Generate Refresh Token from authcode (HTTP Request): calls oauth.pipedrive.com (POST)
  5. combine client id and secret (Edit Fields (Set)): sets 1 field: authheader
  6. Get contact from Pipedrive (HTTP Request): calls an HTTP API
  7. Look for the related record in Supabase (Supabase): get
  8. Get Pipedrive acess token (HTTP Request): calls oauth.pipedrive.com (POST)
  9. Access Token Invalid (If): checks a condition and branches into true / false
  10. If: checks a condition and branches into true / false

…plus 7 more steps. See the full node list below.

Services it uses

Supabase

HTTP calls to: oauth.pipedrive.com

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Nodes used (8)

From the author

This workflow provides an OAuth 2.0 auth token refresh process for better control. Developers can utilize it as an alternative to n8n's built-in OAuth flow to achieve improved control and visibility. In this template, I've used Pipedrive API, but users can…

Excerpt from Priya Jain's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.