I’m trying to get nested values from a particular bundle from Slack.
Hi @Vasislav
You can use get and map functions to extract those information. If you can share the output bundle we could further assist you.
Check out this cool topic to learn Map() function and apply easily.
Best regards,
Msquare Automation
Platinum Partner of Make
@Msquare_Automation
Thanks for the help I was tried to check out the thread that you linked but I could not figure it out.
Here is the output of the module:
[ { "user": "U07VCTMDPDK", "type": "message", "ts": "1731431268.920929", "client_msg_id": "32db8371-4363-4218-80f0-c2a7be54510c", "text": "asd", "team": "T08048RRB8U", "blocks": [ { "type": "rich_text", "block_id": "CWXU3", "elements": [ { "type": "rich_text_section", "elements": [ { "type": "text", "text": "asd" } ] } ] } ], "date": "2024-11-12T17:07:48.000Z" }, { "user": "U07VCTMDPDK", "type": "message", "ts": "1731431269.152059", "client_msg_id": "bec1c46e-98cb-4c17-994d-41bb70504e66", "text": "as", "team": "T08048RRB8U", "blocks": [ { "type": "rich_text", "block_id": "s4GrD", "elements": [ { "type": "rich_text_section", "elements": [ { "type": "text", "text": "as" } ] } ] } ], "date": "2024-11-12T17:07:49.000Z" }, { "user": "U07VCTMDPDK", "type": "message", "ts": "1731431269.350459", "client_msg_id": "7ccd553a-9a59-459a-8ab0-b94c665e9c38", "text": "d", "team": "T08048RRB8U", "blocks": [ { "type": "rich_text", "block_id": "L9jeR", "elements": [ { "type": "rich_text_section", "elements": [ { "type": "text", "text": "d" } ] } ] } ], "date": "2024-11-12T17:07:49.000Z" }, { "user": "U07VCTMDPDK", "type": "message", "ts": "1731431345.054319", "client_msg_id": "c3b83f48-3166-459a-9d70-a414935d5b64", "text": "asdas", "team": "T08048RRB8U", "blocks": [ { "type": "rich_text", "block_id": "GIJFs", "elements": [ { "type": "rich_text_section", "elements": [ { "type": "text", "text": "asdas" } ] } ] } ], "date": "2024-11-12T17:09:05.000Z" }, { "user": "U07VCTMDPDK", "type": "message", "ts": "1731431345.250869", "client_msg_id": "b74be86b-14ff-4f44-b14f-235a0b98b2c5", "text": "d", "team": "T08048RRB8U", "blocks": [ { "type": "rich_text", "block_id": "L9jeR", "elements": [ { "type": "rich_text_section", "elements": [ { "type": "text", "text": "d" } ] } ] } ], "date": "2024-11-12T17:09:05.000Z" } ]
I managed to get some values using some sort of . variable for different type of module, but I`m not sure how to replicate it in the future.
Hi @Vasislav
I could see there is only one element in the array. If it is always one element you can directly map the value like this.
Output:
Otherwise we will have to use iterator or get and map function.
Best regards,
Msquare Automation
Platinum Partner of Make
@Msquare_Automation
Thank you for the help!
Is that the variable that you use? {{1.blocks:elements.:elements:text}}
Also how to do it if there are multiple elemtnets in the array and is it possible to get only one result, for example if I want to get only the value in bundle 3 and nothing else?