{"id":18674863,"url":"https://github.com/suwa-sh/lambda-slack-notification","last_synced_at":"2025-10-10T00:07:53.722Z","repository":{"id":94189835,"uuid":"287428229","full_name":"suwa-sh/lambda-slack-notification","owner":"suwa-sh","description":"aws lambda function for slack notification","archived":false,"fork":false,"pushed_at":"2020-08-18T12:48:07.000Z","size":229,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-11T08:17:48.320Z","etag":null,"topics":["aws-lambda","slack"],"latest_commit_sha":null,"homepage":"","language":"Python","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/suwa-sh.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-14T02:48:28.000Z","updated_at":"2020-08-18T12:48:09.000Z","dependencies_parsed_at":"2023-03-22T13:03:23.617Z","dependency_job_id":null,"html_url":"https://github.com/suwa-sh/lambda-slack-notification","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/suwa-sh/lambda-slack-notification","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suwa-sh%2Flambda-slack-notification","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suwa-sh%2Flambda-slack-notification/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suwa-sh%2Flambda-slack-notification/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suwa-sh%2Flambda-slack-notification/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/suwa-sh","download_url":"https://codeload.github.com/suwa-sh/lambda-slack-notification/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suwa-sh%2Flambda-slack-notification/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002366,"owners_count":26083355,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["aws-lambda","slack"],"created_at":"2024-11-07T09:20:48.391Z","updated_at":"2025-10-10T00:07:53.708Z","avatar_url":"https://github.com/suwa-sh.png","language":"Python","readme":"# AWS Lambda function for Slack notification\n\n## Overview\n\nSlackにメッセージを投稿するlambda functionです。\n\n![slack_notif](images/slack_notif.png)\n\n## Install\n\n### [Slack App](https://api.slack.com/apps)\n\n- OAuth \u0026 PermissionsのScope設定\n  - Scope\n    - `channels:read`\n    - `channels:write`\n    - `chat:write`\n    - `groups:write`\n- OAuth \u0026 PermissionsのTokenをコピー\n  - OAuth Access Token\n  - Bot User OAuth Access Token\n\n### Lambda 関数\n\n- [最新のlambda.zip](https://github.com/suwa-sh/lambda-slack-notification/releases/latest) をダウンロード\n- [Lambda関数の作成](https://ap-northeast-1.console.aws.amazon.com/lambda/home?region=ap-northeast-1#/create/function)\n  - 関数名: `lambda-slack-notification`\n  - ランタイム: `Python 3.8`\n  - 関数コード.アクション → zipファイルをアップロード: `ダウンロードした最新のlambda.zip`\n  - 環境変数\n    - SLACK_TOKEN: `Slack App の OAuth Access Token`\n    - SLACK_BOT_TOKEN: `Slack App の Bot User OAuth Access Token`\n    - SLACK_BOT_ICON: `任意`\n    - SLACK_BOT_NAME: `任意`\n    - Slack の public channel に通知する場合\n      - SLACK_CHANNEL_NAME: `public channel名`\n    - Slack の private channel に通知する場合\n      - SLACK_CHANNEL_ID: `private channel ID`\n\n## Event Data\n\n### Layout\n\n| 項目 | タイプ | 必須 | 説明 | デフォルト値 |\n|:---|:---|:---|:---|:---|\n| text | string | true | メッセージ | none |\n| attachment | object | false | - | - |\n| attachment.status | enum | true | success \\| warning \\| error | none |\n| attachment.fields | list | false | フィールドリスト | - |\n| attachment.fields[].is_short | boolean | false | 短いフィールドか？ | true |\n| attachment.fields[].title | string | true | フィールド名 | none |\n| attachment.fields[].value | string | true | フィールド値 | none |\n| attachment.links | list | false | リンクリスト | - |\n| attachment.links[].text | string | true | リンクボタンのテキスト | none |\n| attachment.links[].url | string | true | リンクボタンのURL | none |\n\n### Sample\n\n```json\n  {\n    \"text\": \"1行目のメッセージ\\n2行目のメッセージ\",\n    \"attachment\": {\n      \"status\": \"error\",\n      \"fields\": [\n        {\n          \"is_short\": true,\n          \"title\": \"field-1\",\n          \"value\": \"field-1 value\"\n        },\n        {\n          \"is_short\": true,\n          \"title\": \"field-2\",\n          \"value\": \"field-2 value\"\n        },\n        {\n          \"is_short\": false,\n          \"title\": \"field-3\",\n          \"value\": \"field-3 value\"\n        }\n      ],\n      \"links\": [\n        {\n          \"text\": \"link-1\",\n          \"url\": \"http://link-1.example.local\"\n        },\n        {\n          \"text\": \"link-2\",\n          \"url\": \"http://link-2.example.local\"\n        }\n      ]\n    }\n  }\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuwa-sh%2Flambda-slack-notification","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuwa-sh%2Flambda-slack-notification","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuwa-sh%2Flambda-slack-notification/lists"}