Block 1 - Stop and Error
- Type / Role
- n8n-nodes-base.stopAndError - stopAndError
- Config choices
- Version 1
This workflow is provided as-is. Please review and test before using in production.
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 visibilit...
n8n-nodes-base.stopanderror, n8n-nodes-base.stickynote, n8n-nodes-base.supabase, n8n-nodes-base.httprequest, n8n-nodes-base.if, n8n-nodes-base.respondtowebhook, n8n-nodes-base.code, n8n-nodes-base.set
This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Priya Jain.
Original n8n.io sourceThis 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 apply it with any app that requires the authorization_code for token access.
This resolves the issue of manually refreshing the OAuth 2.0 token when it expires, or when n8n's native OAuth stops working.
Here's a quick video on setting up the Supabase table.
Create a client app for your chosen application that you want to access via the API.
After duplicating the template:
a. Add credentials to your database and connect the DB nodes in all 3 workflows.
Enable/Publish the first workflow, "1. Generate and Save Pipedrive tokens to Database."
Open your client app and follow the Pipedrive instructions to authenticate.
Click on Install and test.
This will save your initial refresh token and access token to the database.
Workflow 1. Create a workflow to capture the authorization_code, generate the access_token, and refresh the token, and then save the token to the database.
Workflow 2. Develop your primary workflow to fetch or post data to/from your application. Observe the logic to include an if condition when an error occurs with an invalid token. This triggers the third workflow to refresh the token.
Workflow 3. This workflow will handle the token refresh. Remember to send the unique ID to the webhook to fetch the necessary tokens from your table.
Detailed demonstration of the workflow: https://youtu.be/6nXi_yverss
This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.
Showing the first 24 of 29 workflow blocks. Download the JSON for the full node graph.
| Workflow | Better Oauth2.0 workflow for Pipedrive CRM with Supabase |
|---|---|
| Complexity | advanced |
| Nodes | 29 |
| Categories | Engineering |
| Author | Priya Jain |
| Published | 06 Jul 2024 |
Use the JSON export at /data/workflows/2319/2319.json as the source template for this automation.
Open n8n, import the downloaded JSON, and review each node before activating the workflow.
Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.
Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.
Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.
Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.
Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.
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 visibilit...
Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.
Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Engineering use case.