{
  "name": "Automate LINE & Google account linking with OAuth2 authentication",
  "nodes": [
    {
      "id": "26a73587-8928-4e52-8dbf-d2268a1ac0c9",
      "name": "Redirect to LINE OA",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        352,
        96
      ]
    },
    {
      "id": "3e9598b9-66c4-4f00-b6e6-e3eccc103e88",
      "name": "Get Google Access Token",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -320,
        96
      ]
    },
    {
      "id": "29e9c3d9-8fd5-4922-bbe6-bf0f6e6dc589",
      "name": "Get Google User Info",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -96,
        96
      ]
    },
    {
      "id": "ef6a41c4-f6d4-4a0c-aaeb-2725a6d7fd04",
      "name": "Send Completion Message to LINE",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        128,
        96
      ]
    },
    {
      "id": "93f3b1b0-203c-452b-aa54-05671d82f179",
      "name": "If Follow Event",
      "type": "n8n-nodes-base.if",
      "position": [
        -320,
        -320
      ]
    },
    {
      "id": "f00fe94b-9860-45d6-8e82-13f8ea8c4bcf",
      "name": "Create Google Auth URL",
      "type": "n8n-nodes-base.set",
      "position": [
        -96,
        -320
      ]
    },
    {
      "id": "9a8ff025-4e28-4cd6-a842-9a032aa97e5c",
      "name": "Send Auth Link to LINE",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        128,
        -320
      ]
    },
    {
      "id": "d63e7528-aaae-4c8b-92b9-045ce4bc119e",
      "name": "LINE Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -544,
        -320
      ]
    },
    {
      "id": "91b77beb-10e2-4398-a5c2-3988ee07d192",
      "name": "Google Auth Callback",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -544,
        96
      ]
    },
    {
      "id": "c78d8f0c-4189-467c-bdb2-7f1a32a4f7ac",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -592,
        -480
      ],
      "parameters": {
        "width": 1136,
        "height": 336,
        "content": "### Workflow 1: LINE Follow Event & Authentication Start\n\nThis workflow activates when a user adds your LINE Official Account. It listens for the \"follow\" event, generates a unique Google OAuth2 authe"
      }
    },
    {
      "id": "206575c3-9369-4bc6-bfc8-8778e0ad176d",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -592,
        -32
      ],
      "parameters": {
        "width": 1136,
        "height": 336,
        "content": "### Workflow 2: Google Auth Callback & Linking Completion\n\nThis workflow serves as the redirect URI for Google's OAuth2 flow. It receives the authorization code, exchanges it for an access token, and "
      }
    },
    {
      "id": "bb596e53-c8f6-423f-81c4-e58dc16813cc",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1760,
        -480
      ],
      "parameters": {
        "width": 1056,
        "height": 784,
        "content": "# LINE x Google Account Linking Workflow\n\nThis 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 frien"
      }
    }
  ],
  "connections": {
    "LINE Webhook": {
      "main": [
        [
          {
            "node": "If Follow Event",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Follow Event": {
      "main": [
        [
          {
            "node": "Create Google Auth URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Google User Info": {
      "main": [
        [
          {
            "node": "Send Completion Message to LINE",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Auth Callback": {
      "main": [
        [
          {
            "node": "Get Google Access Token",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Google Auth URL": {
      "main": [
        [
          {
            "node": "Send Auth Link to LINE",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Auth Link to LINE": {
      "main": [
        []
      ]
    },
    "Get Google Access Token": {
      "main": [
        [
          {
            "node": "Get Google User Info",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Completion Message to LINE": {
      "main": [
        [
          {
            "node": "Redirect to LINE OA",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}