https://www.notion.so/codestates/5684ae67a84246cea900d6aedb6a816e

예상 시나리오

  1. 유저(내부 크루)는 slash command로 특정 요청을 보낸다. ex) /입실상태조회

  2. 슬랙은 연결된 redirect URL로 COZ 서버에 요청을 보낸다.

  3. 서버는 포맷팅 된 슬랙 메세지를 보내준다.

    Screen Shot 2022-09-16 at 12.14.53 PM.png

  4. 특정 값을 입력한 후 버튼을 누르면 COZ 서버에 요청을 보낸다.

  5. 서버에서 해당 요청에 따른 처리를 한다.

  6. 성공/실패에 따른 포맷팅 된 슬랙 메세지를 보내준다.

Install App

  1. https://api.slack.com/apps 방문

  2. Create New App

    Screen Shot 2022-09-16 at 10.00.43 AM.png

  3. From scratch

  4. App Name, Workspace 등록

    1. App Name: attendance test
    2. Workspace: Code states
  5. Basic Information 등록

    1. Display Information: App name에는 알파벳, 스페이스만 가능
  6. OAuth & Permissions 등록

    1. Redirect URLs
      1. 일단 qa 서버만 등록 - https://qa-lms-integrate-server.urclass.io/attendance-slack-app/attendance
    2. Scopes: 일단 기본적인 Scope로만 등록
      1. chat:write
      2. chat:write.public
      3. incoming-webhook
      4. channels:read
      5. commands
  7. Install App

    1. 어디에 앱을 설치할 건지 channel 연동

    Screen Shot 2022-09-16 at 10.07.15 AM.png