- powered by TypeScript
npm i -g @google/clasp # install clasp command
yarn # install dependencies
clasp login # login to Google
clasp create backlog-to-slack --rootDir src # create GAS Project
mv src/.clasp.json .
clasp push # push script to Google
clasp open # open project page in browser
Secrets like access tokens and slack webhook urls are injected via GAS's script properties.
const scriptProperties = PropertiesService.getScriptProperties();
const secret = scriptProperties.getProperty("propertyName");
slackHook
: Webhook url of your slack apps https://api.slack.com/appsbacklogApiKey
: API key of backlog. You can generate it at your backlog personal settings page.backlogUrl
: Project URL of backlog. e.g. https://example.backlog.combacklogProjectId
: Project ID (digits), which is found in API responses. Trycurl "https://example.backlog.jp/api/v2/projects?apiKey=$BACKLOG_API_KEY"
.