ComposioHQ / composio

Composio equip's your AI agents & LLMs with 100+ high-quality integrations via function calling
https://docs.composio.dev
Other
8.75k stars 3.24k forks source link

Guide for creating Slack bot app #205

Closed SambhavSetia closed 2 months ago

SambhavSetia commented 3 months ago

User description

fixes#161


PR Type

documentation


Description


Changes walkthrough ๐Ÿ“

Relevant files
Documentation
slack_bot_app.mdx
Added guide for creating and setting up a Slack bot app   

docs/guides/slack_bot_app.mdx
  • Added a comprehensive guide for creating a Slack bot app using
    Composio.
  • Included steps for setting up Slack app, bot user, OAuth &
    permissions.
  • Provided instructions for developing the bot with Node.js and
    integrating Composio.
  • Detailed steps for setting up triggers in Composio and testing the
    bot.
  • +124/-0 

    ๐Ÿ’ก PR-Agent usage: Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    codiumai-pr-agent-pro[bot] commented 3 months ago

    PR Reviewer Guide ๐Ÿ”

    โฑ๏ธ Estimated effort to review [1-5] 2
    ๐Ÿงช Relevant tests No
    ๐Ÿ”’ Security concerns No
    โšก Key issues to review None
    codiumai-pr-agent-pro[bot] commented 3 months ago

    PR Code Suggestions โœจ

    CategorySuggestion                                                                                                                                    Score
    Security
    Add a security note to remind users to keep their OAuth access token and other credentials secure ___ **Add a note to remind users to keep their OAuth access token and other credentials secure
    and not to share them publicly.** [docs/guides/slack_bot_app.mdx [40]](https://github.com/ComposioHQ/composio/pull/205/files#diff-ad64817e0dfbc75822067a572ab41e6ae77cca6b26e4ed3a2ea8500c9d32e894R40-R40) ```diff 3:Install App: Scroll up to the OAuth Tokens & Redirect URLs section and click Install App to Workspace. This will generate an OAuth access token which will be used to authenticate your bot. +> **Note:** Keep your OAuth access token and other credentials secure and do not share them publicly. + ``` - [ ] **Apply this suggestion**
    Suggestion importance[1-10]: 8 Why: Adding a security note is crucial to ensure users are aware of the importance of keeping credentials secure. This suggestion addresses a significant security concern.
    8
    Best practice
    Include a step to install the dotenv package for managing environment variables ___ **Include a step to install the dotenv package to manage environment variables more securely
    and conveniently.** [docs/guides/slack_bot_app.mdx [56-57]](https://github.com/ComposioHQ/composio/pull/205/files#diff-ad64817e0dfbc75822067a572ab41e6ae77cca6b26e4ed3a2ea8500c9d32e894R56-R57) ```diff npm install @slack/bolt npm install composio-sdk +npm install dotenv ``` - [ ] **Apply this suggestion**
    Suggestion importance[1-10]: 7 Why: Installing the `dotenv` package is a best practice for managing environment variables securely and conveniently, enhancing the project setup.
    7
    Add a step to require and configure the dotenv package at the beginning of the index.js file ___ **Add a step to require and configure the dotenv package at the beginning of the index.js
    file to load environment variables from the .env file.** [docs/guides/slack_bot_app.mdx [63-64]](https://github.com/ComposioHQ/composio/pull/205/files#diff-ad64817e0dfbc75822067a572ab41e6ae77cca6b26e4ed3a2ea8500c9d32e894R63-R64) ```diff +require('dotenv').config(); const { App } = require('@slack/bolt'); const composio = require('composio-sdk'); ``` - [ ] **Apply this suggestion**
    Suggestion importance[1-10]: 7 Why: This suggestion promotes best practices by ensuring environment variables are loaded securely and is essential for maintaining the functionality of the application when using `.env`.
    7
    Readability
    Use bullet points instead of numbered lists for the prerequisites section ___ **To improve readability and consistency, use bullet points instead of numbered lists for
    the prerequisites section.** [docs/guides/slack_bot_app.mdx [8-10]](https://github.com/ComposioHQ/composio/pull/205/files#diff-ad64817e0dfbc75822067a572ab41e6ae77cca6b26e4ed3a2ea8500c9d32e894R8-R10) ```diff -1:Slack Workspace: You need to have a Slack workspace where you have administrative privileges. -2:Composio Account: Sign up for an account on Composio (if required). -3:Basic Programming Knowledge: Familiarity with JavaScript and Node.js is beneficial. +- Slack Workspace: You need to have a Slack workspace where you have administrative privileges. +- Composio Account: Sign up for an account on Composio (if required). +- Basic Programming Knowledge: Familiarity with JavaScript and Node.js is beneficial. ``` - [ ] **Apply this suggestion**
    Suggestion importance[1-10]: 6 Why: Changing to bullet points improves readability and consistency, but it's a minor stylistic change rather than a functional improvement.
    6
    utkarsh-dixit commented 3 months ago

    Summary of Changes:

    This pull request adds a new guide to the project. The guide is focused on creating a Slack bot app using Composio and setting up triggers for specific events or commands. The file docs/guides/slack_bot_app.mdx has been added with the following content:

    Type of PR:

    Important Change File:

    This guide will help users to easily create and set up a Slack bot app and integrate it with Composio for automated triggers and responses based on specific events or commands in Slack.

    utkarsh-dixit commented 2 months ago

    Closing this pull request, primarily because

    Feel free to reopen this pull-request if you have fixed these issues