Allows team members to interact with data from Podio by using commands within a Slack channel.
Any team member can easily retrieve information, or make updates without ever opening a browser.
Even team members without a Podio account now have the ability to interact with Podio right from within a Slack channel.
- Download and run
npm install
- Rename
sample.env
to.env
- Fill out the
.env
file with the right credentials. - Run with
npm start
SlackNPodio/
├── bot //Bot App directory
│ ├── bot.js //Handles logic related to the bot
│ ├── cmds //Yargs commands directory
│ │ ├── files.js //Command to get list of files
│ │ ├── get.js //Command to get field data
│ │ ├── set.js //Command to set field data
│ │ └── url.js //Command to get item link
│ ├── helper.js //Helper functions to deal with data
│ ├── podio.js //Handles Podio api requests
│ └── slack.js //Handles Slack events
├── LICENSE
├── package.json
├── Procfile //Run command for Heroku
├── README.md
├── sample.env //API keys and secrets
└── test //Test are run here
├── files.js //Sample response object for files
├── item.js //Sample response object for items
└── test-bot.js //Test for the app
All functions and code related to the bot goes here. This includes but is not limited to logic that specifues which functions to run based on the user input.
Functions that do not directly deal with any api requests go here. This includes but is not limited to pure functions, and functions that deal with objects.
Any functions or code directly related to the podio api goes here.
Functions that deal directly with the slack api goes here. Normally functions to handle events, like when a message arrives and to send data to the slack chat.
All test for the app go here.
If you want to contribute to the project, you have to keep in mind certain guidelines.
- We use as much functional programming as possible. Try to use pure functions whenever possible. This means the functions do one thing and one thing only. However, in some cases that will not be the case, you might have to call another function to get a value inside another and so on.
- Functions that require interaction with the Podio API must go on the
bot/bot.js
file. - Functions that require interaction with the slack api must go on the
bot/slack.js
file. - Functions that do not interact with podio or slack directly, but rather an object or other data is a "helper function" and must go on
bot/helper.js
. - For every function you create, please also create a suitable test for it at
test/test-bot.js
. We also provide sample Podio API responses in case you need to work with it. - Please provide proper documentation for the function.
/**
* Retrieves the ID for a field value.
* @param {Array} options
* @param {String} name
* @return {Number}
**/
const getFieldValueID = exports.getFieldValueID = (options, value) => {
return filterFields(options, value).id;
}
- Please notice that for the functions created, they have a specific declaration that allows to be used in other files via
module.exports
. This is very important and what allows us to use the helper functions inside and outside of the file, along with testing them.
const getFieldValueID = exports.getFieldValueID = (options, value) => filterFields(options, value).id;
-
Always run
npm run lint
to lint and make sure there are not things to fix. -
Always run
npm run test
and make sure all test pass before submining a pull request. 9. -
Last but not least, we use ES6 and beyond. So please respect that.
If you have any questions please open an issue. You can also reach me at .
The following is what is needed in the .env
file to have things working out properly.
Make sure there is no space in between the =
.
botToken='key'
clientId='key'
clientSecret='key'
appToken='key'
appID='key'
Github | FreeCodeCamp | CodePen | LinkedIn | Portfolio | E-Mail
If you like the project, please start it to receive updates and help make it more noticeable.
If you would like to help out with financial support, you are welcome to do so via paypal.
I'm currently looking to get my career started so any amount helps. If you would like to hire me for a position or work on a project then you may also contact me about that.