{"id":18862694,"url":"https://github.com/zk-phi/daily-habits-tracker","last_synced_at":"2026-04-19T15:01:26.374Z","repository":{"id":152679602,"uuid":"381905261","full_name":"zk-phi/daily-habits-tracker","owner":"zk-phi","description":"WIP track daily habits from within slack","archived":false,"fork":false,"pushed_at":"2021-07-01T04:08:42.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-30T12:45:36.373Z","etag":null,"topics":["gas","slack"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zk-phi.png","metadata":{"files":{"readme":"Readme.markdown","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-01T04:08:16.000Z","updated_at":"2022-11-04T03:29:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"898cbead-ec2e-454a-90ff-90709f02ad7e","html_url":"https://github.com/zk-phi/daily-habits-tracker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zk-phi/daily-habits-tracker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zk-phi%2Fdaily-habits-tracker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zk-phi%2Fdaily-habits-tracker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zk-phi%2Fdaily-habits-tracker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zk-phi%2Fdaily-habits-tracker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zk-phi","download_url":"https://codeload.github.com/zk-phi/daily-habits-tracker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zk-phi%2Fdaily-habits-tracker/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263833416,"owners_count":23517373,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gas","slack"],"created_at":"2024-11-08T04:35:30.644Z","updated_at":"2026-04-19T15:01:21.349Z","avatar_url":"https://github.com/zk-phi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# habit tracker\n\nTrack daily habits within a Slack channel.\n\n# Setup\n## Install `clasp`\n\nThis app can easily be deployed to your Google Drive with `clasp` (an official Google Apps Script API client).\n\nSee the repository page (https://github.com/google/clasp) for install instructions.\n\nAfter installing `clasp`, log-in to your Google account with `clasp login`.\n\n## Deploy the app to your Google Drive\n### Create an empty Google Apps Script with a Spreadsheet\n\nIn your Google Drive page, create a new item of the type `Google Spreadsheet` and open.\n\nThen click `Tools \u003e Script Editor` to create an empty Apps Script project associated to the sheet.\n\nCopy the app ID (not sheet ID) in the URL:\n\n```\nhttps://script.google.com/d/\u003cthe-app-id\u003e/edit\n```\n\nFOR SECURITY REASONS, YOU MUST NOT SHARE THE ITEM (especially with Edit permission) WITH OTHERS.\n\n### Deploy the app\n\nCreate a file named `.clasp.json` in the root directory of this repository, then register your app's ID as follows:\n\n```\n{\"scriptId\":\"\u003cthe-app-id\u003e\"}\n```\n\nAfter setting `scriptId`, you can use `clasp` to deploy the app.\n\n```\nclasp push   # upload the code\nclasp deploy # publish as a webapp\n```\n\nWhen the app is deployed, a public URL is given to the deployed app.\n\nIn the GAS app page, click `Publish` \u003e `Deploy as web app` and you'll see the URL. The URL will be used to connect to Slack later.\n\n\u003c!-- ## Connect Slack app to the GAS app --\u003e\n\u003c!-- ### Create a Slack app --\u003e\n\u003c!--  --\u003e\n\u003c!-- Open the Slack API page (https://api.slack.com/) and click `Your Apps` then `Create New App`. --\u003e\n\u003c!--  --\u003e\n\u003c!-- ### Authorize the GAS app to use Slack APIs --\u003e\n\u003c!--  --\u003e\n\u003c!-- In your Slack app page, --\u003e\n\u003c!--  --\u003e\n\u003c!-- - open `OAuth \u0026 Permissions` tab --\u003e\n\u003c!-- - from `Tokens for Your Workspace` section, copy the OAuth Access Token to the clipboard --\u003e\n\u003c!--  --\u003e\n\u003c!-- In your GAS app page, --\u003e\n\u003c!--  --\u003e\n\u003c!-- - click `File` \u003e `Project Properties` \u003e `Script Properties` and add a property as follows: --\u003e\n\u003c!--  --\u003e\n\u003c!-- ``` --\u003e\n\u003c!-- Key: SLACK_ACCESS_TOKEN --\u003e\n\u003c!-- Value: \u003cpaste the Slack OAuth Access Token\u003e --\u003e\n\u003c!-- ``` --\u003e\n\u003c!--  --\u003e\n\u003c!-- ### Enable interaction with the GAS app --\u003e\n\u003c!--  --\u003e\n\u003c!-- In your Slack app page, --\u003e\n\u003c!--  --\u003e\n\u003c!-- - open `Interactivity \u0026 Shortcuts` tab and turn on the feature, then copy-and-paste the GAS app's public URL to the `Request URL` field --\u003e\n\u003c!--  --\u003e\n\u003c!-- - open `Basic Information` tab and copy the `Verification Token` in `App Credentials` section --\u003e\n\u003c!--  --\u003e\n\u003c!-- In your GAS app page, --\u003e\n\u003c!--  --\u003e\n\u003c!-- - click `File` \u003e `Project Properties` \u003e `Script Properties` and add a property as follows: --\u003e\n\u003c!--  --\u003e\n\u003c!-- ``` --\u003e\n\u003c!-- Key: SLACK_VERIFICATION_TOKEN --\u003e\n\u003c!-- Value: \u003cthe Slack Verification Token\u003e --\u003e\n\u003c!-- ``` --\u003e\n\u003c!--  --\u003e\n\u003c!-- ### Add a slash command or a shortcut to the Slack app --\u003e\n\u003c!--  --\u003e\n\u003c!-- In your Slack app page, either (or both): --\u003e\n\u003c!--  --\u003e\n\u003c!-- - open `Slash Commands` tab and turn on the feature, then create a new command and copy-and-paste the GAS app's public URL to the `Request URL` field --\u003e\n\u003c!--  --\u003e\n\u003c!-- - open `Interactivity \u0026 Shortcuts` tab and create a new shortcut with callback id `add` --\u003e\n\u003c!--  --\u003e\n\u003c!-- ### Add an incoming webhook to the Slack app --\u003e\n\u003c!--  --\u003e\n\u003c!-- In your Slack app page, --\u003e\n\u003c!--  --\u003e\n\u003c!-- - open `Incoming Webhooks` tab and turn on the feature, then click `Add New Webhook to Workspace` --\u003e\n\u003c!--  --\u003e\n\u003c!-- In your GAS app page, --\u003e\n\u003c!--  --\u003e\n\u003c!-- - click `File` \u003e `Project Properties` \u003e `Script Properties` and add a property as follows: --\u003e\n\u003c!--  --\u003e\n\u003c!-- ``` --\u003e\n\u003c!-- Key: SLACK_WEBHOOKURL --\u003e\n\u003c!-- Value: \u003cthe Slack webhook URL created in the Slack app page\u003e --\u003e\n\u003c!-- ``` --\u003e\n\u003c!--  --\u003e\n\u003c!-- ``` --\u003e\n\u003c!-- Key: SLACK_CHANNEL_NAME --\u003e\n\u003c!-- Value: \u003cthe Slack channel name integrated with the app\u003e --\u003e\n\u003c!-- ``` --\u003e\n\u003c!--  --\u003e\n\u003c!-- In your Slack workspace, --\u003e\n\u003c!--  --\u003e\n\u003c!-- - invite the bot account for the slack app to the channel --\u003e\n\u003c!--  --\u003e\n\u003c!-- ## Initialize \u0026 authorize the GAS app to use Google APIs --\u003e\n\u003c!--  --\u003e\n\u003c!-- Open `main.gs` in the GAS app page and run `initialize` function manually from the menu `Execute` \u003e `Execute a function` \u003e `intialize`. --\u003e\n\u003c!--  --\u003e\n\u003c!-- You'll be asked to permit the app to use Google Spreadsheet API and outgoing hooks. --\u003e\n\u003c!--  --\u003e\n\u003c!-- After authorization, a message will be posted to your Slack channel. --\u003e\n\u003c!--  --\u003e\n\u003c!-- ## Setup triggers --\u003e\n\u003c!--  --\u003e\n\u003c!-- In your GAS app page, --\u003e\n\u003c!--  --\u003e\n\u003c!-- - click `Edit \u003e Current project's trigger` and add a trigger which runs `doTimer` function --\u003e\n\u003c!--  --\u003e\n\u003c!--   This function creates a spread sheet row to record today's drinks, and posts the summary of the yesterdays' to Slack --\u003e\n\u003c!--  --\u003e\n\u003c!-- My trigger look like this: --\u003e\n\u003c!--  --\u003e\n\u003c!-- ``` --\u003e\n\u003c!-- function: doTimer --\u003e\n\u003c!-- version: HEAD --\u003e\n\u003c!-- source: time-based --\u003e\n\u003c!-- type: date --\u003e\n\u003c!-- time: \u003ctime you usually wake up\u003e --\u003e\n\u003c!-- ``` --\u003e\n\u003c!--  --\u003e\n\u003c!-- # Development --\u003e\n\u003c!--  --\u003e\n\u003c!-- When you modify the app and want to update the deployment, you can use `-i` option to redeploy without changing the public URL. If `-i` is omitted, you'll have multiple deployments with different versions, in different URLs. --\u003e\n\u003c!--  --\u003e\n\u003c!-- ``` --\u003e\n\u003c!-- clasp push --\u003e\n\u003c!-- clasp deploy -i \u003cdeployment ID\u003e --\u003e\n\u003c!-- ``` --\u003e\n\u003c!--  --\u003e\n\u003c!-- You can see the list of deployments with `clasp deployments`: --\u003e\n\u003c!--  --\u003e\n\u003c!-- ``` --\u003e\n\u003c!-- $ clasp deployments --\u003e\n\u003c!-- 2 Deployments. --\u003e\n\u003c!-- - \u003cdev deployment ID\u003e @HEAD --\u003e\n\u003c!-- - \u003cdeployment ID\u003e @4 --\u003e\n\u003c!-- ``` --\u003e\n\u003c!--  --\u003e\n\u003c!-- The first deployment tagged `@HEAD` is a read-only deployment for dev use, which always runs the latest version of the app. So you'll usually want to redeploy the second deployment. --\u003e\n\u003c!--  --\u003e\n\u003c!-- After creating unneeded deployments, you can also delete the deployment with `clasp undeploy \u003cID\u003e` command. --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzk-phi%2Fdaily-habits-tracker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzk-phi%2Fdaily-habits-tracker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzk-phi%2Fdaily-habits-tracker/lists"}