đź”§ Automate LINE & Google account linking with OAuth2 authentication

⚡ 93 views · 🔧 Miscellaneous

Description

LINE x Google Account Linking Workflow

This workflow automates the process of linking a new user on your LINE Official Account to their Google Account. When a user adds your LINE account as a friend, this workflow automatically sends them a message with a unique authentication link. After the user approves the connection, their Google profile information is fetched, and a confirmation message is sent, completing the loop.

Prerequisites

Before you begin, ensure you have the following:

Setup Instructions

Follow these steps to configure the workflow.

Step 1: Configure LINE Developers Console

  1. Log in to the LINE Developers Console.
  2. Navigate to your provider and select your Messaging API channel.
  3. Go to the Messaging API tab.
  4. Issue a Channel access token (long-lived) and copy the value.
  5. In the Webhook URL field, paste the Test URL from the LINE Webhook node in your n8n workflow.
  6. Enable Use webhook.

Step 2: Configure Google Cloud Platform (GCP)

  1. Log in to the Google Cloud Console and select your project.
  2. Navigate to APIs & Services > OAuth consent screen. Configure it if you haven’t already, ensuring you add your own Google account as a test user.
  3. Go to APIs & Services > Credentials.
  4. Click + CREATE CREDENTIALS and select OAuth 2.0 Client ID.
  5. For Application type, choose Web application.
  6. Under Authorized redirect URIs, click + ADD URI and paste the Test URL from the Google Auth Callback node in your n8n workflow.
  7. Click Create. Copy your Client ID and Client Secret.

Step 3: Configure the n8n Workflow

Import the workflow JSON into your n8n canvas and follow these steps to set it up.

1. Configure n8n Credentials

First, set up the credentials that the HTTP Request nodes will use.

2. Update Node Parameters

Now, update the parameters in the following nodes:

Step 4: Activate and Test

  1. Save the workflow by clicking the Save button.
  2. Activate the workflow using the toggle in the top-right corner.
  3. On your phone, add your LINE Official Account as a friend. You should receive a message with a link.
  4. Follow the link to authorize with your Google account. After successful authorization, you should receive a completion message in LINE and be redirected.

> Note: When you are ready for production, remember to replace the “Test” webhook URLs in the LINE and GCP consoles with the “Production” URLs from the n8n webhook nodes.

đź”— Nodes Used

HTTP Request, Webhook

📥 Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup