{"id":18866959,"url":"https://github.com/flatfisher/slack-image-saver","last_synced_at":"2025-08-01T04:07:57.879Z","repository":{"id":35721490,"uuid":"165833496","full_name":"flatfisher/slack-image-saver","owner":"flatfisher","description":"slack-media-saver saves media uploaded on Slack to Google Photos.","archived":false,"fork":false,"pushed_at":"2023-03-07T07:46:50.000Z","size":462,"stargazers_count":7,"open_issues_count":10,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T03:32:26.855Z","etag":null,"topics":["firebase","firebase-firestore","firebase-functions","google-photos","pubsub","scheduler","typescript"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flatfisher.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-15T10:43:03.000Z","updated_at":"2024-09-18T04:20:17.000Z","dependencies_parsed_at":"2023-01-16T04:00:40.798Z","dependency_job_id":null,"html_url":"https://github.com/flatfisher/slack-image-saver","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flatfisher%2Fslack-image-saver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flatfisher%2Fslack-image-saver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flatfisher%2Fslack-image-saver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flatfisher%2Fslack-image-saver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flatfisher","download_url":"https://codeload.github.com/flatfisher/slack-image-saver/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248897122,"owners_count":21179542,"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":["firebase","firebase-firestore","firebase-functions","google-photos","pubsub","scheduler","typescript"],"created_at":"2024-11-08T05:08:04.000Z","updated_at":"2025-04-14T14:31:20.663Z","avatar_url":"https://github.com/flatfisher.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# slack-image-saver\nslack-image-saver saves media uploaded on Slack to Google Photos.\n\n## Prerequirement\n- [Slack API](https://api.slack.com)\n    - api token\n- [Google Photos API](https://developers.google.com/photos)\n    - authorization_code\n    - album_id\n- [Using OAuth 2.0 to Access Google APIs](https://developers.google.com/identity/protocols/OAuth2)\n    - client_id\n    - client_secret\n    - redirect_uri\n    - scope\n- [Google Cloud Scheduler](https://cloud.google.com/scheduler)\n- [Google Cloud Pub/Sub](https://cloud.google.com/pubsub/docs/overview)\n- [Firebase Functions](https://firebase.google.com/docs/functions/pubsub-events)\n- [Firebase Cloud Firestore](https://firebase.google.com/docs/firestore)\n\n## Installation\n\n```\n$ npm install --prefix functions/\n```\n\n## Lint\n\n```\n$ npm run lint --prefix functions/\n```\n\n## Set Environment\n\n```\n$ firebase functions:config:set slack.token=\"\"\n$ firebase functions:config:set slack.channel=\"\"\n$ firebase functions:config:set google.refresh_token=\"\"\n$ firebase functions:config:set google.client_id=\"\"\n$ firebase functions:config:set google.client_secret=\"\"\n$ firebase functions:config:set photos.album_id=\"\"\n$ firebase deploy --only functions\n$ firebase functions:config:get //Check current environment variables\n```\n\n## Build\n\n```\n$ npm run build --prefix functions/\n```\n\n## Deploy\n\n```\n$ npm run deploy\n```\n\n## Note\n\n### Creating and Configuring Cron Jobs\n\n```\n$ gcloud beta scheduler jobs create pubsub Saver --schedule \"0 */3 * * *\" --time-zone Asia/Tokyo --description \"Upload photo to GooglePhotos\" --topic slack-to-googlephotos --message-body \"{\"count\":1}\"\n```\n\n### Publish a pub/sub's topic\n\n```\n$ gcloud pubsub topics publish slack-to-googlephotos --message \"{\"count\":1}\"\n```\n\n### Delete Environment\n\n```\n$ firebase functions:config:unset $ENVIRONMENT_VARIABLE\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflatfisher%2Fslack-image-saver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflatfisher%2Fslack-image-saver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflatfisher%2Fslack-image-saver/lists"}