Trello Card – How to Create from Slack with Custom Command

slacktrello

We are using Trello as our bug tracker at my workplace. I want it to be easy to add new issues from Slack.

The ideal: User types in Slack: /bug [bug title] or /trello bug [bug title] and a new card is created at the end of list "Bugs" on our product board.

The Trello App for Slack does not appear to be able to do this.

2 Problems:

  • Our list "Bugs" is NOT the first list on the board. By default, the app's "create new card" command adds cards to the first list on a board. I don't believe this is configurable?
  • The default Slack command to create a new card is /trello add [card name]. This is a bit generic. I'd hope to create a distinct command for only the bug workflow.

Is my ideal doable with the default Slack & Trello integration? Do I need to use a third party service?

Best Answer

I accomplished this with the third party service Zapier. Zapier lets you build a 'Zap' which is a series of actions between your connected accounts. I named mine TrelloBugBot:

enter image description here

The steps:

  1. Slack: Trigger - New Mention. Listen for mentions of the string trellobug.
  2. Trello: Search - Find Member. Tries to match the Slack user to an existing Trello user
  3. Formatter by Zapier: Action - Transform to Lowercase. Grabs the full Slack message that contains trellobug and turns it into lowercase.
  4. Formatter by Zapier: Action - Split text. Grabs the full Slack message that contains trellobug and parses out the title of the bug.
  5. Trello: Action - Create Card. Makes a new card in a specified Board/List. The card is named with the parsed Slack message, the message thread is linked, and the matched user is added to the card.

Zapier is free for 2 step Zaps. To set up this Zap you'll have to pay.