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

Add Member to Trello card IF they exist

I'm building a Flow for my company to start using with our Trello board. We're using an Office Form for clients to submit projects directly to Trello. 

 

Right now most of our clients (which are all within the company) are on the Trello board. So I'm using an external spreadsheet to cross-reference their email address (which is captured by the form) to pass through their Trello Member ID number so that they are automatically added to the Trello card they submit. 

 

The problem I'm trying to solve before we implement this is if the client is not yet on Trello. I assumed it would see a blank value and notify me of an error and we could then add them to Trello and resolve it for next time, but when we did a test we saw that the Flow acts like it ran sucessfully but the Trello Card was never created. 

 

The solution I had in mind was to only try to add them IF they were on the spreadsheet. 

 

So earlier in the Flow I have a "List rows present in a table" and I'm running a query based on their email address that's captured by the form. So if they are not on this list the output data is blank. 

 

When the Trello card is created it is going to automatically add two members each time, these are project managers that will be on each card. The third member to auto-add is the requestor of the project. But only if they are on that spreadsheet. 

 

So basically:

 

If ['Trello Member ID'] is NOT blank then input the value of ['Trello Member ID'], otherwise skip this step. 

 

Here is the code when I click the "Switch to input entire array" where Flow is adding members: 

 

[
"########",    (deparment manager)

"########",    (project manager) 

@{items('Apply_to_each_2')?['Trello Member ID']}   (the requestor IF they are on the sheet, if not this skip this)

]

 

Where the first two "####" are is where the two members will be added every time. It's that third one that I only want it to do if the value for 'Trello Member ID' is NOT blank. 

 

I'm having a hard time figuring out how to format that section. I feel like it's just that one line of code I could edit instead of setting up a whole condition and having to have two versions of the "Create a card" operation. 

 

Any help with this would be greatly appreciated. 

 

Thank you! 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Add Member to Trello card IF they exist

Hi @ChrisBPayne_IGT ,

 

Your method is available, mainly to determine whether the List rows present in a table action has qualified rows after performing the filtering.

In addition, you can also consider using length() function to determine if there are eligible rows.

If the result is 0, there is no suitable rows; if it is not equal to 0, it means that there are qualified rows.

Expression reference:

length(body('List_rows_present_in_a_table')?['value'])

Image reference:

1.PNG

 

Please take a try.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
6 REPLIES 6
Community Support Team
Community Support Team

Re: Add Member to Trello card IF they exist

Hi @ChrisBPayne_IGT ,

 

Could you share a screenshot of your Flow configuration?

What I understand now is that you want to add the rows in the Excel table where the Trello Member ID field is not empty to Trello.

It will also add the attached deparment manager and project manager.

 

Your method seems to be correct. The Member Ids field needs to be populated with an array, and each element is the GUID of the corresponding person.

 

Please provide more details about your requirement and we would provide proper workaround for you.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
ChrisBPayne_IGT
Level: Powered On

Re: Add Member to Trello card IF they exist

Thanks for the response @v-bacao-msft!

 

Here's a OneDrive link to my screenshot: 

FLOW_MSForm-to-Trello

 

I did a test yesterday just removing the "Trello Member ID" entry into the Trello card's "Member ID Item - 3" and it still did not create the card. It doesn't give any kind of error message or anything, acts like it ran successfully but no card is created. 

 

However, if I take the "Create a card" step out of that "Apply to each 2" step and delete that "Apply to each 2" step, it works fine but we lose the ability to automatically add the requestor to their card. It seems like Flow just doesn't know what to do when that value is blank and can't just proceed without adding them to the card. 

Community Support Team
Community Support Team

Re: Add Member to Trello card IF they exist

Hi @ChrisBPayne_IGT ,

 

Thank for your reply.

Could you provide Flow run history?

From the screenshots you provided, the logic of the Flow configuration is no problem.

I speculate whether there is no qualifying rows when filtering Excel tables, so the actions in Apply to each 2 are not executed, and Flow will also show successful execution.

 

Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
ChrisBPayne_IGT
Level: Powered On

Re: Add Member to Trello card IF they exist

Hi @v-bacao-msft 

 

Here's a link to the details of the data the Flow is trying to send:

Form-to-Trello_RunData

 

I've added a screenshot and a CSV, let me know if there is a better way of sending you the info. 

 

That's correct that once it filters the Excel table there are no qualifying rows. So because that value is empty when it gets to the "Apply to each 2" step it just doesn't proceed with making a card. 

 

I think even if I have to add a condition and have two "Create a card" actions for the different outcomes I'd be happy. As long as it looks at the "Trello Member ID" value and says "if this is blank, make a card this way; if it's not blank, make a card that way". I just can't figure out how to configure that. 

 

EDIT:

 

I think I may have found the solution! 

I've added a screenshot labeled "SOLVED" in that link (above). Could you please take a look at that and tell me if you think this is a valid solution or if I just got lucky with something in my tests. 

 

I created a string to hold the member ID, and then used a condition to check if that string was empty or not. Then have two different methods of created a card based on whether or not we're able to add the requestor to the card from an existing Trello Member ID. 

Community Support Team
Community Support Team

Re: Add Member to Trello card IF they exist

Hi @ChrisBPayne_IGT ,

 

Your method is available, mainly to determine whether the List rows present in a table action has qualified rows after performing the filtering.

In addition, you can also consider using length() function to determine if there are eligible rows.

If the result is 0, there is no suitable rows; if it is not equal to 0, it means that there are qualified rows.

Expression reference:

length(body('List_rows_present_in_a_table')?['value'])

Image reference:

1.PNG

 

Please take a try.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
ChrisBPayne_IGT
Level: Powered On

Re: Add Member to Trello card IF they exist

@v-bacao-msft awesome thank you! 

 

I definitely like this solution better since it's cleaner and doesn't require creating a variable. 

 

Thank you for all your help! 

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand 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: 212 members 4,314 guests
Please welcome our newest community members: