Coder Social home page Coder Social logo

slackbot-traduire-gpt's Introduction

Event-Driven Slack Application

This project demonstrates how to build a custom Slack application using serverless event-driven architectures on AWS to enable cross organizational communication within a multilingual teams by providing real-time message translation.

The interaction between deployed infrastructure and Slack is handled using the Javascript Bolt framework, which simplifies the process of building Slack apps by providing a simple and intuitive API for handling events and actions.

If you're interested in finding out more about how this works, read over this blog post -> Leveraging AWS Lambda and EventBridge for a Multilingual Slack Bot

This application can be downloaded to your Slack workspace using this link:

Overview

The application is triggered by Slack events that are routed through AWS EventBridge to relevant Lambda functions, which handle different actions like opening the app home, translating messages and setting language preferences. This setup allows for scaling without the complexity of managing a dedicated server, offering a robust solution for enhancing the functionality of Slack within an organization.

Architecture

The architecture of the application is as follows: Architecture

Setup & Deployment

Prerequisites

  • AWS account
  • Slack account with permissions to create apps in the workspace
  • Node.js and pnpm installed
  • AWS CLI installed and configured

Configuring Slack App

  1. Create a Slack app by following the Slack API Hello World tutorial
  2. Copy and past the manifest file from the slack-app-manifest.json file in this repository to the app settings.
  3. Note the SLACK_CLIENT_ID, SLACK_CLIENT_SECRET and the SLACK_SIGNING_SECRET from the Slack app settings.

Deploying the Backend

  1. Clone this repository.
  2. Navigate to the cloned directory and run pnpm install to install dependencies.
  3. Have your aws credentials configured in your environment.
  4. Deploy the application using using the command pnpm ci:deploy -c stage=dev.
  5. Note the api endpoint from the output of the deployment.

Linking Slack App to Backend

  1. In the App Manifest file, update the with the actual API endpoint.
  2. To install the app to your workspace, visit the site <api-endpoint>/slack/install in your browser. You will be redirected to Slack to authorize the app.

Usage

Once deployed and configured, the application will look something like this:

Home Page

You can submit or remove an OpenAI API key or update the language preference in the app home. You can add the app to a channel by running the command /invite @quipper in the channel. The app will automatically translate messages sent in channels based on the language preference set by the user. The language preferences will translate any language to your primary language. If the orginal message is in your primary language, it will be translated to the secondary language.

Translation

Contributing

Contributions are welcome! Feel free to open issues or submit pull requests to enhance the functionality of this Slack application.

Authors


Enjoy building your event-driven Slack applications!


slackbot-traduire-gpt's People

Contributors

jaduplessis avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.