Skip to content

despark/despark-idea-slack-command

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Despark's Idea Slack Command

Despark's Idea Slack Command is a slash command for Slack, with which you can easily add your thoughts to your Trello Organization Board.

Usage

    /commandName [Title][Description(Leave empty if you don't want any)]
    

The idea will be automatically added to the Trello board you provided in the config.php, under a list with the name of the Slack channel, in which you initiated the command.

Requirements

  • PHP >= 5.6
  • MySQL (required only for full functionallity)
  • Trello and Slack Accounts

Installation

  1. Clone/download this repo:
  git clone git@github.com:despark/despark-idea-slack-command.git
  
  1. Create a config.php file with the data from config_example.php and update appropriately to match your setup.
   <?php
    $config = [
        // Set True If You Want To Subscribe The User To The Created Idea
        'subscribeUser' => false,
        // Database
        'servername' => '127.0.0.1',
        'username' => 'username',
        'password' => 'password',
        'db' => 'database',
        // Trello
        // Admin Auth Token For Using The API
        'trelloAuthToken' => 'trelloAuthToken',
        // Admin API Key For Using The API
        'trelloApiKey' => 'trelloApiKey',
        // Trello Board ID Where The Ideas Will Be Created
        'trelloBoardId' => 'trelloBoardId',
        // ID Of The Label That Should Be Applied On The Idea. Set NULL If You Don't Want To Apply Any
        'trelloLabelId' => null,
        // Slack
        // Confirm Token Given From The Slash Command App
        'slackConfirmToken' => 'slackConfirmToken',
    ];
  1. Add the slash command to your Slack Team:
  • Go to: https://{your-team-name}.slack.com/apps and find the Slash Commands menu.

  • Click the Add Configuration button and register the new command's name.

  • Fill up the blanks

    URL: The URL address to your index.php file you've just clonned/downloaded.

    Method: POST

    Customize Name: Your desired name.

    Descriptive Label: Some description about the slash command.

  • Paste the Token string in the config file.

  1. Get your Trello API key and Auth Token:
  • Login with your account here and paste the generated API key in the config file.
  • Get your Auth Token from here and paste it in the config file.
  1. Create a new Trello Board where your ideas will be stored and add your users to it.

  2. (Optional) Create a new label for your Idea Cards.

  3. Get the Board and Label IDs:

  • Copy the board URL and paste it in a new window with .json at the end.
  • The first element is the Trello Board ID. Paste it in the config file.
  • (Optional) Search for the labels array. Find and paste it in the config file, the ID, corresponding to the name of the label you've just created.
  1. Only if you want to assign people to the cards:
  • Change the subscribeUser to true in the config file.
 ...
// Set True If You Want To Subscribe The User To The Created Idea
      'subscribeUser' => true,
 ...
  • Update the config file with your database settings.
 ...
// Database
      'servername' => '127.0.0.1',
      'username' => 'username',
      'password' => 'password',
      'db' => 'database',
 ...
  • Run the database_example.sql (Change the database name to your desired one).
CREATE DATABASE `database`;

USE `database`;

DROP TABLE IF EXISTS `ids`;

CREATE TABLE `ids` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`slack_id` varchar(255) NOT NULL DEFAULT '',
`trello_id` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

Copyright and License

Despark's Idea Slack Command was written by Despark and is released under the MIT License. See the LICENSE file for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages