LINE: Array of objects expected in parameter "messages"

Hello makers,

I’ve been delving into the world of automation for almost a month now, and I’m still amazed every day by its wonders. However, I must apologize for my poor English, and I hope this doesn’t affect my ability to express myself ><

I want to send a flex message in LINE, but this feature isn’t available in the dropdown menu. Therefore, I’m thinking of trying to use the map button to directly call it. (Idk if it will work out or not, just trying;)


This is my first attempt:

I use [ ] as array and { } as collection, but it failed, after doing some research, I have found that this field must be used with the array format from within make

Below is my json script, I got this from Line’s Official Document of using API to send flex msg, and it worked if use terminal to call line’s api and send flex msg

Reference website: Call the Messaging API to send a Flex Message

[{
"type": "flex",
"altText": "this is a flex message",
"contents": {
  "type": "bubble",
  "body": {
  "type": "box",
  "layout": "vertical",
  "contents": [
    {
          "type": "text",
          "text": "hello"
    },
        {
          "type": "text",
          "text": "world"
        }
      ]
    }
  }
}]

Second Attempt:

I use Create JSON followed by Array Aggregator

And this is the output of Create JSON

Then I throw the output to Array Aggregator, and it starts to go wrong because it outputs a key named JSON String, but I want the JSON file to be transformed into the ‘make’ format so that I can use it with the map function in Line.

I’ve tried all the methods I could think of, but I still can’t solve it QQ

Thanks for your patience><

If there’s anything in my expression that is unclear, please let me know!!!

Hello :wave:t5:,

Unfortunately the “Line - Send a Reply Message” does not support “Flex” messages and mapping the JSON code in the “messages” array manually won’t work.

This manual mapping is useful when you map/create multiple messages from different modules with the use of an “Array Aggregator” as in the picture below.


In your case, you might try to use the "Line - Make an API Call" module with a custom API call according to the mentioned Line API docs.

Cheerio :cat_roomba:

2 Likes