Skip to content

k2tzumi/pic-search-slash-command

Repository files navigation

clasp ci

What is this?

This bot executes the slack slash command to search for images.
This bot runs as a web app within a Google app script.
You can make this bot work by registering it as a request URL for the Slack API slash command.

REQUIREMENTS

  • npm
  • clasp
    npm install -g @google/clasp
  • make

USAGE

To use it, you need to set up Google apps scripts, Custom Search API and Slack API.

Install Google apps scripts

  1. Enable Google Apps Script API
    https://script.google.com/home/usersettings
  2. make push
  3. make deploy
  4. Grant the necessary privileges
    make open
    Publish > Deploy as web app.. > Update
    Grant access

Register with the Slack API

Setting Script properties

In order to run the application and change its behavior, you need to set the following Google Apps scripts property.

Property name Required Setting Value Description
VERIFICATION_TOKEN Basic Information > App Credentials > Verification Token A token that easily authenticates the source of a hooked request
GOOGLE_API_KEY Create Credentials
CUSTOM_SEARCH_ENGINE_ID Enabling the Custom Search API. Getting the Custom Search Engine (CSE)
OVERUSE_MESSAGE default :anger: Search too much..
  1. Open Project
    $ make open
  2. Add Scirpt properties
    File > Project properties > Scirpt properties > Add row
    Setting Property & Value

Settings Slash Commands & Slack APP install

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published