Q&A

Line bot designer json not working

I have download line bot designer for create bubble & carousel message for working with dialogflow but when i copy json code generate from program. I saw nothing in chat, First time i think it happen because dialogflow but it not. So what wrong?

{
"line": {
  "type": "carousel",
  "contents": [
    {
      "type": "bubble",
      "hero": {
        "type": "image",
        "url": "https://scdn.line-apps.com/n/channel_devcenter/img/fx/01_5_carousel.png",
        "size": "full",
        "aspectRatio": "20:13",
        "aspectMode": "cover"
      },
      "body": {
        "type": "box",
        "layout": "vertical",
        "spacing": "sm",
        "contents": [
          {
            "type": "text",
            "text": "Arm Chair, White",
            "weight": "bold",
            "size": "xl",
            "wrap": true,
            "contents": []
          },
          {
            "type": "box",
            "layout": "baseline",
            "contents": [
              {
                "type": "text",
                "text": "$49",
                "weight": "bold",
                "size": "xl",
                "flex": 0,
                "wrap": true,
                "contents": []
              },
              {
                "type": "text",
                "text": ".99",
                "weight": "bold",
                "size": "sm",
                "flex": 0,
                "wrap": true,
                "contents": []
              }
            ]
          }
        ]
      },
      "footer": {
        "type": "box",
        "layout": "vertical",
        "spacing": "sm",
        "contents": [
          {
            "type": "button",
            "action": {
              "type": "uri",
              "label": "Add to Cart",
              "uri": "https://linecorp.com"
            },
            "style": "primary"
          },
          {
            "type": "button",
            "action": {
              "type": "uri",
              "label": "Add to wishlist",
              "uri": "https://linecorp.com"
            }
          }
        ]
      }
    },
    {
      "type": "bubble",
      "hero": {
        "type": "image",
        "url": "https://scdn.line-apps.com/n/channel_devcenter/img/fx/01_6_carousel.png",
        "size": "full",
        "aspectRatio": "20:13",
        "aspectMode": "cover"
      },
      "body": {
        "type": "box",
        "layout": "vertical",
        "spacing": "sm",
        "contents": [
          {
            "type": "text",
            "text": "Metal Desk Lamp",
            "weight": "bold",
            "size": "xl",
            "wrap": true,
            "contents": []
          },
          {
            "type": "box",
            "layout": "baseline",
            "flex": 1,
            "contents": [
              {
                "type": "text",
                "text": "$11",
                "weight": "bold",
                "size": "xl",
                "flex": 0,
                "wrap": true,
                "contents": []
              },
              {
                "type": "text",
                "text": ".99",
                "weight": "bold",
                "size": "sm",
                "flex": 0,
                "wrap": true,
                "contents": []
              }
            ]
          },
          {
            "type": "text",
            "text": "Temporarily out of stock",
            "size": "xxs",
            "color": "#FF5551",
            "flex": 0,
            "margin": "md",
            "wrap": true,
            "contents": []
          }
        ]
      },
      "footer": {
        "type": "box",
        "layout": "vertical",
        "spacing": "sm",
        "contents": [
          {
            "type": "button",
            "action": {
              "type": "uri",
              "label": "Add to Cart",
              "uri": "https://linecorp.com"
            },
            "flex": 2,
            "color": "#AAAAAA",
            "style": "primary"
          },
          {
            "type": "button",
            "action": {
              "type": "uri",
              "label": "Add to wish list",
              "uri": "https://linecorp.com"
            }
          }
        ]
      }
    },
    {
      "type": "bubble",
      "body": {
        "type": "box",
        "layout": "vertical",
        "spacing": "sm",
        "contents": [
          {
            "type": "button",
            "action": {
              "type": "uri",
              "label": "See more",
              "uri": "https://linecorp.com"
            },
            "flex": 1,
            "gravity": "center"
          }
        ]
      }
    }
  ]
}
}
  • 0
  • 1
  • 1584
  • twitter facebook

Hello, have you checked Dialogflow's documentation for LINE custom payload responses?

If you haven't you could see it here: https://cloud.google.com/dialogflow/es/docs/integrations/line#custom_payload_responses

It says that LINE flex message types are currently not supported.

However, (if i am not wrong) if you dont use the flex property, flex messages are completely fine to use on Dialogflow. Thank you.

  • 1

関連する質問

    関連する質問はありません

本当によろしいですか? question.vm