I am trying to figure out a way to use a Butler rule to automatically @mention the board admin(s) in a comment when a particular rule is triggered. I want to be able to do this dynamically for any board that the rule is enabled. I also want to avoid using @board so that I don't spam all of the board members... Does anyone have any idea on how this can be achieved with Butler.
@[deleted]
Probably need to use Butler Http Request to fetch the usernames of admin for the board and output {httpresponse.mention_list} where mention_list is "@admin1username, @admin2username,...etc"
You can embed it with your rules, but not the trigger for comment....since you need to construct the comment ahead of the trigger.
The mechanism to handle the above is here. Just need to finalise my scratch code before writing this.
trello_card = client.get_card(para['card_id'])
board = client.get_board(trello_card.board_id)
mention_list = []
for mbr in board.admin_members():
mention_list.append('@{}'.format(mbr.username))
sp_variables = json.dumps({"mention_list" : ', '.join(mention_list)})
Using a webhook on an update to a comment to inserted the before will probably result in a loop.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.