← All N8N workflows
Automation & utilitiesCodeHtmlHTTP RequestIfRespond To Webhook

OIDC client workflow

Configured with Html, HTTP Request, Respond To Webhook, Webhook. Review the connections and setup before adapting this template.

Workflow preview
TriggerWebhookWebhookCodeCodeCodeWeb / APIuser infoHTTP RequestWeb / APIsend back login pageRespond To WebhookRoutingIF token is presentIfTransformWelcome pageHtmlWeb / APIsend back welcome pageRespond To WebhookRoutingIF user info okIfTransformlogin formHtmlTransformSet variables : auth,token, userinfo, client…Edit FieldsRoutingIF we have code in URIand not in PKCE modeIfWeb / APIget access_token from/token endpoint with…HTTP Request

Node categories in this workflow

  • Trigger
  • Code
  • Web / API
  • Routing
  • Transform

Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.

Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.

How it works

The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.

Workflow node names, types, and operations
NodeCategoryTypeOperation
WebhookTriggerWebhookSee node parameters
CodeCodeCodeSee node parameters
user infoWeb / APIHTTP RequestSee node parameters
send back login pageWeb / APIRespond To WebhookSee node parameters
IF token is presentRoutingIfSee node parameters
Welcome pageTransformHtmlSee node parameters
send back welcome pageWeb / APIRespond To WebhookSee node parameters
IF user info okRoutingIfSee node parameters
login formTransformHtmlSee node parameters
Set variables : auth, token, userinfo, client id, scopeTransformEdit FieldsSee node parameters
IF we have code in URI and not in PKCE modeRoutingIfSee node parameters
get access_token from /token endpoint with codeWeb / APIHTTP RequestPOST

Setup

  1. Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
  2. Connect your own credentials through n8n’s credential store. Replace REPLACE_WITH_* values with your resource identifiers.
  3. Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
  4. Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.

Requirements

An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.

Credential types declared in the source

None declared. HTTP requests and Code nodes may still need configuration.

Workflow notes

Sticky Note

In this set, you have to retrieve from your identity provider :

  • auth url
  • token url
  • userinfo url
  • the client id you created for this flow
  • scopes to use, at least "openid" scope if you do not want to use PKCE, you have to fill :
  • client_secret
  • redirect_uri (which is the webhook uri)
Sticky Note1

At this point the user is authenticated, you have access to his profile from the user info result and you continue doing things

Quick setup with Keycloak

Quick setup with Keycloak

  1. Open your Keycloak
  2. Go to Realm settings and opn OpenID Endpoint Configuration
  3. This will opene a new tab. Copy out the authorization_endpoint, token_endpoint and the userinfo_endpoint and add it to the Set variables node
  4. Go go Clients and click Create client. In there pick a name of choice.
  5. Go to the next step, Capability config, disable Client authentication. Only Standard flow should be checked.
  6. Go to the next step Login settings. In there copy the Webhook URL of this workflow into the Valid redirect URIs field
  7. Enter the clientID to the Set variables node

Now you can activate the workflow and visit the webhook URL to test. You can find a more detailed setup guid in the description.

OIDC client workflow

OIDC client workflow

Purpose and structure

This folder contains the OIDC client workflow workflow. Its executable nodes use code, html, httpRequest, if, respondToWebhook, set, webhook. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.

Setup

Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.

Entry points

Webhook

Verification

Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.

Attribution

https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Code/2034_Code_Webhook_Automate_Webhook.json MIT; preserve source notices.

More in Automation & utilities