cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PMavrich
Level: Powered On

Building an array to pull all the comments from a trello card

It would seem that Arrays or the solution to my issue has become my Kryptonite as I have not been able to figure out how to pull all the comments from my Trello Card and put them into a New Trello Card Description.  If there is a know solution, would @jlevesque be able to create a video on Youtube for this.  And  the solution be provided here. Any assistance would be appreciated.

2 ACCEPTED SOLUTIONS

Accepted Solutions
Super User
Super User

Re: Building an array to pull all the comments from a trello card

HI @PMavrich 

 

Please have a look at the screenshot below:

tersrs.png

This lists the comments of a card puts them into an array and finally while creating a new card adds the comments to the description separated by a ';'. 

expression used for the card description:

join(variables('test'),' ;')

Here, test is the array variable I created. 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Super User
Super User

Re: Building an array to pull all the comments from a trello card

@PMavrich 

 

Please have a look at the flow screenshot below:flotret.png

Expression used in the append to array variable next to Date:

formatDateTime(items('Apply_to_each')?['date'],'dd/MM/yyyy')

You can format the date time according to your requirements. 

In the initialise variable 2, hit an enter and save it. it should look like as shown in the screenshot. 

Expression used in the card description

join(variables('dd'),variables('space'))

We are using the variable 2 to join the array items and create the new line. 

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

13 REPLIES 13
Super User
Super User

Re: Building an array to pull all the comments from a trello card

HI @PMavrich 

 

Please have a look at the screenshot below:

tersrs.png

This lists the comments of a card puts them into an array and finally while creating a new card adds the comments to the description separated by a ';'. 

expression used for the card description:

join(variables('test'),' ;')

Here, test is the array variable I created. 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

PMavrich
Level: Powered On

Re: Building an array to pull all the comments from a trello card

@yashag2255 

 

It still returns the last comment.  There are 3 comments ...

 

List Comments For a card

 

[

{

   "id": "5cf7cf322d015b1dfe48b83c",

   "idMemberCreator": "5cd32a62ac66ba3080f8b449",

   "type": "commentCard",

   "date": "2019-06-05T14:18:26.948Z",

   "limits": {

     "reactions": {

       "perAction": {

         "status": "ok",

         "disableAt": 1000,Capture.JPG

         "warnAt": 900

       },

       "uniquePerAction": {

         "status": "ok",

         "disableAt": 17,

         "warnAt": 16

       }

     }

   },

   "memberCreator": {

     "id": "5cd32a62ac66ba3080f8b449",

     "avatarHash": null,

     "avatarUrl": null,

     "fullName": "Patricia Mavrich",

     "idMemberReferrer": null,

     "initials": "PM",

     "nonPublic": {},

     "nonPublicAvailable": false,

     "username": "patriciamavrich"

   },

   "text": "This has to work"

},

{

   "id": "5cf7cf247fa4e242f0a83c90",

   "idMemberCreator": "5cd32a62ac66ba3080f8b449",

   "type": "commentCard",

   "date": "2019-06-05T14:18:12.027Z",

   "limits": {

     "reactions": {

       "perAction": {

         "status": "ok",

         "disableAt": 1000,

         "warnAt": 900

       },

       "uniquePerAction": {

         "status": "ok",

         "disableAt": 17,

         "warnAt": 16

       }

     }

   },

   "memberCreator": {

     "id": "5cd32a62ac66ba3080f8b449",

     "avatarHash": null,

     "avatarUrl": null,

     "fullName": "Patricia Mavrich",

     "idMemberReferrer": null,

     "initials": "PM",

     "nonPublic": {},

     "nonPublicAvailable": false,

     "username": "patriciamavrich"

   },

   "text": "Testing comment transfer"

},

{

   "id": "5cf7cf1a85f5c02fc6be8b73",

   "idMemberCreator": "5cd32a62ac66ba3080f8b449",

   "type": "commentCard",

   "date": "2019-06-05T14:18:02.96Z",

   "limits": {

     "reactions": {

       "perAction": {

         "status": "ok",

         "disableAt": 1000,

         "warnAt": 900

       },

       "uniquePerAction": {

         "status": "ok",

         "disableAt": 17,

         "warnAt": 16

       }

     }

   },

   "memberCreator": {

     "id": "5cd32a62ac66ba3080f8b449",

     "avatarHash": null,

     "avatarUrl": null,

     "fullName": "Patricia Mavrich",

     "idMemberReferrer": null,

     "initials": "PM",

     "nonPublic": {},

     "nonPublicAvailable": false,

     "username": "patriciamavrich"

   },

   "text": "Testing Comment transfer\n"

}

]

 

PMavrich
Level: Powered On

Re: Building an array to pull all the comments from a trello card

@yashag2255 

 

List Comments For a card

 

[

{

   "id": "5cf7cf322d015b1dfe48b83c",

   "idMemberCreator": "5cd32a62ac66ba3080f8b449",

   "type": "commentCard",

   "date": "2019-06-05T14:18:26.948Z",

   "limits": {

     "reactions": {

       "perAction": {

         "status": "ok",

         "disableAt": 1000,

         "warnAt": 900

       },

       "uniquePerAction": {

         "status": "ok",

         "disableAt": 17,

         "warnAt": 16

       }

     }

   },

   "memberCreator": {

     "id": "5cd32a62ac66ba3080f8b449",

     "avatarHash": null,

     "avatarUrl": null,

     "fullName": "Patricia Mavrich",

     "idMemberReferrer": null,

     "initials": "PM",

     "nonPublic": {},

     "nonPublicAvailable": false,

     "username": "patriciamavrich"

   },

   "text": "This has to work"

},

{

   "id": "5cf7cf247fa4e242f0a83c90",

   "idMemberCreator": "5cd32a62ac66ba3080f8b449",

   "type": "commentCard",

   "date": "2019-06-05T14:18:12.027Z",

   "limits": {

     "reactions": {

       "perAction": {

         "status": "ok",

         "disableAt": 1000,

         "warnAt": 900

       },

       "uniquePerAction": {

         "status": "ok",

         "disableAt": 17,

         "warnAt": 16

       }

     }

   },

   "memberCreator": {

     "id": "5cd32a62ac66ba3080f8b449",

     "avatarHash": null,

     "avatarUrl": null,

     "fullName": "Patricia Mavrich",

     "idMemberReferrer": null,

     "initials": "PM",

     "nonPublic": {},

     "nonPublicAvailable": false,

     "username": "patriciamavrich"

   },

   "text": "Testing comment transfer"

},

{

   "id": "5cf7cf1a85f5c02fc6be8b73",

   "idMemberCreator": "5cd32a62ac66ba3080f8b449",

   "type": "commentCard",

   "date": "2019-06-05T14:18:02.96Z",

   "limits": {

     "reactions": {

       "perAction": {

         "status": "ok",

         "disableAt": 1000,

         "warnAt": 900

       },

       "uniquePerAction": {

         "status": "ok",

         "disableAt": 17,

         "warnAt": 16

       }

     }

   },

   "memberCreator": {

     "id": "5cd32a62ac66ba3080f8b449",

     "avatarHash": null,

     "avatarUrl": null,

     "fullName": "Patricia Mavrich",

     "idMemberReferrer": null,

     "initials": "PM",

     "nonPublic": {},

     "nonPublicAvailable": false,

     "username": "patriciamavrich"

   },

   "text": "Testing Comment transfer\n"

}

 

Highlighted
PMavrich
Level: Powered On

Re: Building an array to pull all the comments from a trello card

@yashag2255 

 

List Comments For a card

 

[

{

   "id": "5cf7cf322d015b1dfe48b83c",

   "idMemberCreator": "5cd32a62ac66ba3080f8b449",

   "type": "commentCard",

   "date": "2019-06-05T14:18:26.948Z",

   "limits": {

     "reactions": {

       "perAction": {

         "status": "ok",

         "disableAt": 1000,

         "warnAt": 900

       },

       "uniquePerAction": {

         "status": "ok",

         "disableAt": 17,

         "warnAt": 16

       }

     }

   },

   "memberCreator": {

     "id": "5cd32a62ac66ba3080f8b449",

     "avatarHash": null,

     "avatarUrl": null,

     "fullName": "Patricia Mavrich",

     "idMemberReferrer": null,

     "initials": "PM",

     "nonPublic": {},

     "nonPublicAvailable": false,

     "username": "patriciamavrich"

   },

   "text": "This has to work"

},

{

   "id": "5cf7cf247fa4e242f0a83c90",

   "idMemberCreator": "5cd32a62ac66ba3080f8b449",

   "type": "commentCard",

   "date": "2019-06-05T14:18:12.027Z",

   "limits": {

     "reactions": {

       "perAction": {

         "status": "ok",

         "disableAt": 1000,

         "warnAt": 900

       },

       "uniquePerAction": {

         "status": "ok",

         "disableAt": 17,

         "warnAt": 16

       }

     }

   },

   "memberCreator": {

     "id": "5cd32a62ac66ba3080f8b449",

     "avatarHash": null,

     "avatarUrl": null,

     "fullName": "Patricia Mavrich",

     "idMemberReferrer": null,

     "initials": "PM",

     "nonPublic": {},

     "nonPublicAvailable": false,

     "username": "patriciamavrich"

   },

   "text": "Testing comment transfer"

},

{

   "id": "5cf7cf1a85f5c02fc6be8b73",

   "idMemberCreator": "5cd32a62ac66ba3080f8b449",

   "type": "commentCard",

   "date": "2019-06-05T14:18:02.96Z",

   "limits": {

     "reactions": {

       "perAction": {

         "status": "ok",

         "disableAt": 1000,

         "warnAt": 900

       },

       "uniquePerAction": {

         "status": "ok",

         "disableAt": 17,

         "warnAt": 16

       }

     }

   },

   "memberCreator": {

     "id": "5cd32a62ac66ba3080f8b449",

     "avatarHash": null,

     "avatarUrl": null,

     "fullName": "Patricia Mavrich",

     "idMemberReferrer": null,

     "initials": "PM",

     "nonPublic": {},

     "nonPublicAvailable": false,

     "username": "patriciamavrich"

   },

   "text": "Testing Comment transfer\n"

}

 

Super User
Super User

Re: Building an array to pull all the comments from a trello card

hey! can you share a screenshot of your flow? 

PMavrich
Level: Powered On

Re: Building an array to pull all the comments from a trello card

Capture.JPGThis is my flow@yashag2255 

Super User
Super User

Re: Building an array to pull all the comments from a trello card

@PMavrich 

 

You are creating the card inside of the "apply to each loop" This will not only create multiple cards but have the current card as text. Move that Create a card action outside of the loop and it should work. 

PMavrich
Level: Powered On

Re: Building an array to pull all the comments from a trello card

@yashag2255 

 

I need all the comments to populate the bottom of one card  As a series of information.

Super User
Super User

Re: Building an array to pull all the comments from a trello card

@PMavrich  Yes. The append to array action collects all the comments into the array and form one. With that as a collection, we are converting it to a string with the Join function and putting it in the description. Did you test it out by movig the create card action outside the loop?

PMavrich
Level: Powered On

Re: Building an array to pull all the comments from a trello card

ok, it works

 

now I need to add name and date

 

Date

Name

Comment 

 

as the structure... How would I be able to do that piece.

 

 

Super User
Super User

Re: Building an array to pull all the comments from a trello card

Hey @PMavrich 

 

Can you share more details on that? Name Date and comments from where? Is it from the source card? If you could share more details, I might be able to assist you better. 

 

Thanks, 

PMavrich
Level: Powered On

Re: Building an array to pull all the comments from a trello card

@yashag2255 

 

It is from the same source card.  It is the Date the comments were left and the person who left the comment.

Super User
Super User

Re: Building an array to pull all the comments from a trello card

@PMavrich 

 

Please have a look at the flow screenshot below:flotret.png

Expression used in the append to array variable next to Date:

formatDateTime(items('Apply_to_each')?['date'],'dd/MM/yyyy')

You can format the date time according to your requirements. 

In the initialise variable 2, hit an enter and save it. it should look like as shown in the screenshot. 

Expression used in the card description

join(variables('dd'),variables('space'))

We are using the variable 2 to join the array items and create the new line. 

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 118 members 3,941 guests
Please welcome our newest community members: