{"id":21158249,"url":"https://github.com/simbo/msteams-message-card-action","last_synced_at":"2025-07-09T12:33:55.319Z","repository":{"id":57954190,"uuid":"529325930","full_name":"simbo/msteams-message-card-action","owner":"simbo","description":"A simple and lightning-fast GitHub action to send notifications as message cards to an MS Teams webhook.","archived":false,"fork":false,"pushed_at":"2024-06-03T17:22:56.000Z","size":1273,"stargazers_count":10,"open_issues_count":5,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-14T13:04:22.381Z","etag":null,"topics":["action","cards","github-actions","message","msteams","notifications"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/ms-teams-message-card","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/simbo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2022-08-26T16:14:40.000Z","updated_at":"2024-03-06T20:04:24.000Z","dependencies_parsed_at":"2024-09-27T12:47:35.316Z","dependency_job_id":"0343be2a-d692-43f8-9de6-67d532d465da","html_url":"https://github.com/simbo/msteams-message-card-action","commit_stats":{"total_commits":33,"total_committers":1,"mean_commits":33.0,"dds":0.0,"last_synced_commit":"7e2c23be2db82225d68dd194f212c2c16a12727c"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simbo%2Fmsteams-message-card-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simbo%2Fmsteams-message-card-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simbo%2Fmsteams-message-card-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simbo%2Fmsteams-message-card-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simbo","download_url":"https://codeload.github.com/simbo/msteams-message-card-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225551710,"owners_count":17487281,"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":["action","cards","github-actions","message","msteams","notifications"],"created_at":"2024-11-20T12:19:02.083Z","updated_at":"2024-11-20T12:19:02.666Z","avatar_url":"https://github.com/simbo.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# simbo/msteams-message-card-action\n\nA simple and lightning-fast GitHub action to send notifications as message cards\nto an MS Teams webhook by using the\n[actionable message card JSON format](https://docs.microsoft.com/en-us/outlook/actionable-messages/message-card-reference).\n\nIt does not add any custom design. That's all up to you.\n\nYou can add buttons by using simple strings with labels followed by URLs (see\n[Options](#options)).  \nI decided for this simple format to define buttons because this way you can\neasily set buttons using workflow variables which can also be invalid and\nomitted on purpose.\n\nYou can also define complete sections in YAML format following the\n[section fields definition](https://learn.microsoft.com/en-us/outlook/actionable-messages/message-card-reference#section-fields)\nfor actionable message cards.\n\n## Usage\n\nAdd `simbo/msteams-message-card-action@v1` to your workflow.\n\n### Simple Example\n\n```yml\njobs:\n  notify:\n    runs-on: ubuntu-latest\n    steps:\n      - name: 📣 Send teams notification\n        uses: simbo/msteams-message-card-action@latest\n        with:\n          webhook: ${{ secrets.TEAMS_WEBHOOK }}\n          message: Hello world!\n```\n\n…will produce a message card like this:\n\n![simple example output](./example-simple.png)\n\n### Advanced Example\n\n```yml\njobs:\n  notify:\n    runs-on: ubuntu-latest\n    steps:\n      - name: 🪣 Set env vars\n        run: |\n          echo \"MY_SPECIAL_BUTTON=Cool https://this-is-so.cool/\" \u003e\u003e $GITHUB_ENV\n\n      - name: 📣 Send teams notification\n        uses: simbo/msteams-message-card-action@latest\n        env:\n          MY_AWESOME_BUTTON: Awesome http://this-is-so.awesome/\n        with:\n          webhook: ${{ secrets.TEAMS_WEBHOOK }}\n          title: Hello world!\n          message: \u003cp\u003eThis is my \u003cstrong\u003eawesome message!\u003c/strong\u003e\u003c/p\u003e\n          color: ff69b4\n          buttons: |\n            Click here! https://whatever.com/foo/\n            Or here… https://somewhere.com/bar/\n            This button will not be shown as it has no target URL\n            https://no-label-no-button.com/\n            ${{ env.MY_SPECIAL_BUTTON }}\n            ${{ env.MY_AWESOME_BUTTON }}\n```\n\n…will produce a message card like this:\n\n![advanced example output](./example-advanced.png)\n\n### Sections Example\n\n```yml\njobs:\n  notify:\n    runs-on: ubuntu-latest\n    steps:\n      - name: 📣 Send teams notification\n        uses: simbo/msteams-message-card-action@latest\n        with:\n          webhook: ${{ secrets.TEAMS_WEBHOOK }}\n          title: Hello world!\n          message: \u003cp\u003eThis is my \u003cstrong\u003eawesome message!\u003c/strong\u003e\u003c/p\u003e\n          color: ff69b4\n          buttons: |\n            Click here! https://whatever.com/foo/\n            Or here… https://somewhere.com/bar/\n          sections: |\n            -\n              activityTitle: David Claux\n              activitySubtitle: 9/13/2016, 3:34pm\n              activityImage: https://connectorsdemo.azurewebsites.net/images/MSC12_Oscar_002.jpg\n              facts:\n                -\n                  name: \"Board:\"\n                  value: Name of board\n                -\n                  name: \"List:\"\n                  value: Name of list\n                -\n                  name: \"Assigned to:\"\n                  value: (none)\n                -\n                  name: \"Due date:\"\n                  value: (none)\n              text: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n```\n\n…will produce a message card like this:\n\n![advanced example output](./example-sections.png)\n\n## Options\n\n| Option     | Required | Default | Description                                                                                                                                                                                                              |\n| ---------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| `webhook`  | yes      | `''`    | The MS Teams webhook URL to send the notification to. Obviously required.                                                                                                                                                |\n| `message`  | yes      | `''`    | The message content. Supports HTML up to a certain level (interpreted by MS Teams). Can also be empty.                                                                                                                   |\n| `title`    | no       | `''`    | The title of your card. Will be omitted by MS Teams if left empty.                                                                                                                                                       |\n| `color`    | no       | `''`    | The border color code of name of the message card (parsed by [`color-name-to-code`](https://www.npmjs.com/package/color-name-to-code)). Will fallback to MS Teams' default color if empty.                               |\n| `buttons`  | no       | `''`    | A multiline string where every line defines an action button for the message card. Each line should contain a label text followed by a HTTP(S) URL. If the line does not match this format, it will be silently omitted. |\n| `sections` | no       | `''`    | A multline string representing a YAML definition of [section objects](https://learn.microsoft.com/en-us/outlook/actionable-messages/message-card-reference#section-fields)                                               |\n\n## Development\n\n### Creating a new Version\n\nUse `./release.sh \u003cmajor|minor|patch\u003e` which will update `package.json` and\ncreate a git tag for the respective version.\n\nA release workflow will pick up the tag when pushed to GitHub, create a release\nand move major, minor and latest tags accordingly.\n\nTo publish the release into the GitHub marketplace open\n[releases](https://github.com/simbo/msteams-message-card-action/releases) and\nupdate the release for marketplace publishing.\n\n## License and Author\n\n[MIT \u0026copy; Simon Lepel](http://simbo.mit-license.org/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimbo%2Fmsteams-message-card-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimbo%2Fmsteams-message-card-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimbo%2Fmsteams-message-card-action/lists"}