Some products and features are in the process of being renamed. Generative playbook and flow features are also being migrated to a single consolidated console. See the details.
Stay organized with collections
Save and categorize content based on your preferences.
Conversational Agents (Dialogflow CX)'s LINE integration lets you to easily create LINE bots with natural
language understanding based on Conversational Agents (Dialogflow CX) technology.
Set Up LINE
In order to set up the LINE integration for your agent, you'll need the
following:
To test your agent, follow LINE's guide
Adding friends via QR code
to add the bot to the conversation list. The QR code can be found on the
Messaging API tab in the
LINE Developers Console.
After that, you can send messages to the bot for testing.
Rich response messages
The rich response messages are supported via Custom Payload in
Fulfillment. Please see
LINE Message Objects
for the message format.
For example, the following custom payload provides a simple LINE text message:
{
"type": "text",
"text": "Hello, world"
}
The following custom payload provides a LINE template message:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eConversational Agents (Dialogflow CX)'s LINE integration allows you to build LINE bots with natural language understanding capabilities.\u003c/p\u003e\n"],["\u003cp\u003eSetting up the LINE integration requires a LINE account, the LINE app, and information from your LINE Developers Console, including the Channel access token, Channel ID, and Channel secret.\u003c/p\u003e\n"],["\u003cp\u003eWhen using this integration, data is shared with both Google and LINE, and each company's terms of service, SLA, pricing, and quotas apply to their handling of the data.\u003c/p\u003e\n"],["\u003cp\u003eYou can test your LINE bot by adding it as a friend via a QR code found in the LINE Developers Console, and billing must be enabled on your project before testing.\u003c/p\u003e\n"],["\u003cp\u003eRich response messages in the LINE bot can be implemented using Custom Payload in Fulfillment, following LINE's Message Objects format, and you can use channel-specific responses for LINE messages by defining the \u003ccode\u003eDF_CX_LINE\u003c/code\u003e channel.\u003c/p\u003e\n"]]],[],null,["# LINE\n\n| **Preview**\n|\n|\n| This product or feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA products and features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n\nConversational Agents (Dialogflow CX)'s LINE integration lets you to easily create LINE bots with natural\nlanguage understanding based on Conversational Agents (Dialogflow CX) technology.\n\n\n| **Note:** When using a third party integration, requests and end-user data are sent to both Google and the third party. The terms of service, SLA, pricing, and quotas [for your agent edition](/dialogflow/docs/editions) are applicable for Google's handling of these requests. The third party's terms of service, SLA, pricing, and quotas are applicable for the third party's handling of these requests.\n\n\u003cbr /\u003e\n\nSet Up LINE\n-----------\n\nIn order to set up the LINE integration for your agent, you'll need the\nfollowing:\n\n- A LINE account\n- The LINE app installed on a mobile device\n\n| **Note:** Account sign-up is completed through the mobile app.\n\n### Create a LINE bot\n\n1. Follow LINE's guide [Getting started with the Messaging API](https://developers.line.biz/en/docs/messaging-api/getting-started/) to create a provider and a **Messaging API** channel (if not created before).\n2. Copy the following information from the created channel in\n [LINE Developers Console](https://developers.line.biz/console/):\n\n - **Channel access token (long-lived)**\n - **Channel ID**\n - **Channel secret**\n\n### Set up Conversational Agents (Dialogflow CX)\n\n1. Click **Manage** tab on the left panel.\n2. Click **Integrations** in the left menu.\n3. Click the **Connect** button on the **Line** tile.\n4. Fill in the following information:\n - **Channel access token**\n - **Channel ID**\n - **Channel secret**\n5. Choose an environment, as applicable.\n6. Click **Start**.\n7. Copy the **Webhook URL**.\n\n### Enable webhook in LINE\n\nFollow LINE's guide\n[Set a Webhook URL](https://developers.line.biz/en/docs/messaging-api/building-bot/#setting-webhook-url)\nto finish the setup.\n\nTesting\n-------\n\n| **Note:** Make sure [billing is enabled](/dialogflow/cx/docs/quick/setup#billing) on your project before testing the integration.\n\nTo test your agent, follow LINE's guide\n[Adding friends via QR code](https://help.line.me/line/android/pc?lang=en&contentId=20000378)\nto add the bot to the conversation list. The QR code can be found on the\n**Messaging API** tab in the\n[LINE Developers Console](https://developers.line.biz/console/).\nAfter that, you can send messages to the bot for testing.\n\nRich response messages\n----------------------\n\nThe rich response messages are supported via **Custom Payload** in\n[Fulfillment](/dialogflow/cx/docs/concept/fulfillment). Please see\n[LINE Message Objects](https://developers.line.biz/en/reference/messaging-api/#message-objects)\nfor the message format.\n\nFor example, the following custom payload provides a simple LINE text message: \n\n```\n{\n \"type\": \"text\",\n \"text\": \"Hello, world\"\n}\n```\n\nThe following custom payload provides a LINE template message: \n\n```json\n{\n \"type\": \"template\",\n \"altText\": \"this is a buttons template\",\n \"template\": {\n \"type\": \"buttons\",\n \"thumbnailImageUrl\": \"https://example.com/bot/images/image.jpg\",\n \"title\": \"Menu\",\n \"text\": \"Please select\",\n \"actions\": [\n {\n \"type\": \"postback\",\n \"label\": \"Buy\",\n \"data\": \"action=buy&itemid=123\"\n },\n {\n \"type\": \"postback\",\n \"label\": \"Add to cart\",\n \"data\": \"action=add&itemid=123\"\n },\n {\n \"type\": \"uri\",\n \"label\": \"View detail\",\n \"uri\": \"http://example.com/page/123\"\n }\n ]\n }\n}\n```\n\nChannel specific responses\n--------------------------\n\nAfter you configure the [channel-specific responses](/dialogflow/cx/docs/concept/fulfillment#channel-specific), the channel `DF_CX_LINE` is automatically used when the agent responds to Line messages."]]