{"id":16911745,"url":"https://github.com/crazymanish/fastlane-plugin-slack_bot","last_synced_at":"2026-03-15T01:58:30.513Z","repository":{"id":45555550,"uuid":"267382605","full_name":"crazymanish/fastlane-plugin-slack_bot","owner":"crazymanish","description":"A Fastlane plugin to customize your automation workflow(s) with a Slack Bot 🤖🚀","archived":false,"fork":false,"pushed_at":"2025-01-11T15:17:33.000Z","size":75,"stargazers_count":38,"open_issues_count":2,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-09T01:45:36.708Z","etag":null,"topics":["bot","bot-api","fastlane","fastlane-plugins","slack"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/crazymanish.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-05-27T17:22:53.000Z","updated_at":"2025-01-11T15:17:36.000Z","dependencies_parsed_at":"2024-10-13T19:07:34.420Z","dependency_job_id":"5214babb-5c68-4627-9746-4ca8acc652e8","html_url":"https://github.com/crazymanish/fastlane-plugin-slack_bot","commit_stats":{"total_commits":56,"total_committers":5,"mean_commits":11.2,"dds":0.5,"last_synced_commit":"cb7aabbb5da4c513ac857e311c218bbd90adf804"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crazymanish%2Ffastlane-plugin-slack_bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crazymanish%2Ffastlane-plugin-slack_bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crazymanish%2Ffastlane-plugin-slack_bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crazymanish%2Ffastlane-plugin-slack_bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crazymanish","download_url":"https://codeload.github.com/crazymanish/fastlane-plugin-slack_bot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253176443,"owners_count":21866142,"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":["bot","bot-api","fastlane","fastlane-plugins","slack"],"created_at":"2024-10-13T19:07:26.217Z","updated_at":"2026-03-15T01:58:25.467Z","avatar_url":"https://github.com/crazymanish.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Fastlane `slack_bot` plugin\n\n[![fastlane Plugin Badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg)](https://rubygems.org/gems/fastlane-plugin-slack_bot)\n![![License]](https://img.shields.io/badge/license-MIT-green.svg?style=flat)\n[![Gem Version](https://badge.fury.io/rb/fastlane-plugin-slack_bot.svg)](https://badge.fury.io/rb/fastlane-plugin-slack_bot)\n![Gem Download Badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fgem-badge.onrender.com%2Fdownloads%2Ffastlane-plugin-slack_bot)\n[![Mail: @manish](https://img.shields.io/badge/contact-@manish-blue.svg?style=flat)](mailto:i.am.manish.rathi@gmail.com)\n\u003c!--![![RubyGem Download Badge]](https://ruby-gem-downloads-badge.herokuapp.com/fastlane-plugin-slack_bot?type=total)--\u003e\n\nA fastlane plugin to customize your automation workflow(s) with a **Slack Bot** 🤖 using the [Slack APIs](https://api.slack.com/)\n\n- [About](#about)\n- [Getting Started](#getting-started)\n- [Features](#features)\n- [Post a message](#examples-post-a-message) examples\n- [Update a message](https://github.com/crazymanish/fastlane-plugin-slack_bot/blob/master/lib/fastlane/plugin/slack_bot/actions/update_slack_message.rb#L115) examples\n- [Delete a message](https://github.com/crazymanish/fastlane-plugin-slack_bot/blob/master/lib/fastlane/plugin/slack_bot/actions/delete_slack_message.rb#L78) examples\n- [Upload a file](#examples-upload-a-message) examples\n- [About Fastlane](#about-fastlane)\n\n## About\n\nA fastlane plugin to post slack message and much more using Slack bot api token. 🚀\\\n**Note:** `Fastlane` comes with built-in `slack` action by default, which uses slack webhook url and have webhook limitations.  \ni.e Listing couple of slack **webhook url** limitations:\n- can't post a direct message to a slack user.\n- can’t post a message inside a slack thread.\n- can’t update a posted slack message.\n- can’t list and upload a file inside a slack channel.\n- many more, compare to a **Slack Bot** 🤖 using the [Slack APIs](https://api.slack.com/)\n\n## Getting Started\n\n1. [Generate `Slack token` for `Fastlane` bot](https://slack.com/intl/en-nl/help/articles/115005265703-Create-a-bot-for-your-workspace)\n    - Add a slack `Bot` user\n    - Choose a name for your bot, e.g. `\"fastlane\"`\n    - Save `API Token`\n\n2. Add plugin in your project\n\n```bash\nfastlane add_plugin slack_bot\n```\nIf you are using fastlane using Gemfile in your project, add it to your project by running:\n```bash\nbundle exec fastlane add_plugin slack_bot\n```\n\n3. Use `slack_bot` features inside your lane in `Fastfile` whenever you want.\n\n## Features\nUsing this `slack_bot` plugin, you can:\n\n- Post a message using [chat.postMessage](https://api.slack.com/methods/chat.postMessage) Slack API\n  - [x] Post a message to a _public_ channel\n  - [x] Post a message to a _private_ channel\n  - [x] Post a message to a _slack user_ (DM)\n  - [x] Post a message inside a _slack thread_ 🧵\n  - [x] Post a message with _custom Bot username and icon_\n\n- Update a message using [chat.update](https://api.slack.com/methods/chat.update) Slack API\n  - [x] update a message in a channel\n\n- Delete a message using [chat.delete](https://api.slack.com/methods/chat.delete) Slack API\n  - [x] delete a message in a channel\n\n- List of files in a channel using [files.list](https://api.slack.com/methods/files.list) Slack API\n  - [x] A list of files in a channel, It can be filtered and sliced in various ways.\n\n- Upload a file using [files.upload](https://api.slack.com/methods/files.upload) Slack API\n  - [x] Upload a file to a _public_ channel\n  - [x] Upload a file to a _private_ channel\n  - [x] Upload a file to a _slack user_ (DM)\n  - [x] Upload a file inside a _slack thread_ 🧵\n  - [x] Upload a file with _multiple channels/users_\n\n\n## Examples (Post a message)\n\nLet’s post a message to the default slack bot channel.\n\n```ruby\n# share on Slack\npost_to_slack(message: \"App successfully released!\")\n```\n\nLet’s post a direct message to a slack user that unit tests CI has been failed.\n\n```ruby\n# share on Slack\npost_to_slack(\n  message: \"CI: Your unit tests on #{ENV['CI_COMMIT_REF_NAME']} failed\",\n  channel: \"@SlackUsername\" # This can be Slack userID, instead of username i.e @UXXXXX\n)\n```\n\nLet’s post a slack message to the `#ios-team` channel about the new test-flight build.\n\n```ruby\nlane :beta do\n  gym # Build the app and create .ipa file\n  pilot # Upload build to TestFlight\n\n  version_number = get_version_number # Get project version\n  build_number = get_build_number # Get build number\n  beta_release_name = \"#{version_number}-#{build_number}-beta-release\"\n\n  # share on Slack\n  post_to_slack(\n    message: \"Hi team, we have a new test-flight beta build: #{beta_release_name}\",\n    channel: \"#ios-team\"\n  )\nend\n```\n\nLet’s post a slack message with custom payload.\n\n```ruby\n# share on Slack\npost_to_slack(\n  api_token: \"xyz\", # Preferably configure as ENV['SLACK_API_TOKEN']\n  message: \"App successfully released!\",\n  channel: \"#channel\",  # Optional, by default will post to the default channel configured for the Slack Bot.\n  success: true,        # Optional, defaults to true.\n  payload: {  # Optional, lets you specify any number of your own Slack attachments.\n    \"Build Date\" =\u003e Time.new.to_s,\n    \"Built by\" =\u003e \"Jenkins\",\n  },\n  default_payloads: [:git_branch, :git_author], # Optional, lets you specify an allowlist of default payloads to include. Pass an empty array to suppress all the default payloads.\n        # Don't add this key, or pass nil, if you want all the default payloads. The available default payloads are: `lane`, `test_result`, `git_branch`, `git_author`, `last_git_commit`, `last_git_commit_hash`.\n  attachment_properties: { # Optional, lets you specify any other properties available for attachments in the slack API (see https://api.slack.com/docs/attachments).\n       # This hash is deep merged with the existing properties set using the other properties above. This allows your own fields properties to be appended to the existing fields that were created using the `payload` property for instance.\n    thumb_url: \"http://example.com/path/to/thumb.png\",\n    fields: [{\n      title: \"My Field\",\n      value: \"My Value\",\n      short: true\n    }]\n  }\n)\n```\n\nLet’s post a slack message inside a slack thread 🧵\n\n```ruby\nlane :release do\n  # Start the release with slack release thread\n  release_thread = post_to_slack(\n    message: \"Good morning team, CI has started the AppStore release. You can find more information inside this thread 🧵\",\n    channel: \"#ios-team\"\n  )\n\n  # Important: Save this slack thread timestamp for futher slack messages\n  release_thread_ts = release_thread[:json][\"ts\"]\n\n  gym # Build the app and create .ipa file\n\n  # Post an update in release thread\n  post_to_slack(\n    message: \"App has been build successfully! 💪\",\n    channel: \"#ios-team\",\n    thread_ts: release_thread_ts\n  )\n\n  deliver # Upload build to AppStore\n\n  # Post an update in release thread\n  post_to_slack(\n    message: \"App has been uploaded to the AppStore and submitted for Apple's review! 🚀\",\n    channel: \"#ios-team\",\n    thread_ts: release_thread_ts\n  )\nend\n```\n\nLet’s post a message with custom slack bot username and icon\n\n```ruby\n# share on Slack\npost_to_slack(\n  message: \"App successfully released!\",\n  username: \"Release Bot\", # Overrides the bot's username\n  icon_url: \"https://fastlane.tools/assets/img/fastlane_icon.png\" # Overrides the bot's icon\n)\n```\n\n## Examples (Upload a file)\n\nLet’s Upload a file to a slack channel that main branch unit tests has been failed, see scan logs.\n\n```ruby\n# File upload on Slack\nfile_upload_to_slack(\n  initial_comment: \"CI: main-branch unit tests failed\",\n  file_path: \"scan.log\",\n  channels: \"#ios-team\" # Comma-separated list of slack #channel names where the file will be shared\n)\n```\n\nLet’s Upload a file to a slack user that your branch unit tests has been failed, see scan logs.\n\n```ruby\n# File upload on Slack\nfile_upload_to_slack(\n  initial_comment: \"CI: Your unit tests on #{ENV['CI_COMMIT_REF_NAME']} failed\",\n  file_path: \"scan.log\",\n  channels: \"@SlackUsername\" # This can be Slack userID, instead of username i.e @UXXXXX\n)\n```\n\nLet’s Upload a file inside a slack thread 🧵\n\n```ruby\nlane :release do\n  # Start the release with slack release thread\n  release_thread = post_to_slack(\n    message: \"Good morning team, CI has started the AppStore release. You can find more information inside this thread 🧵\",\n    channel: \"#ios-team\"\n  )\n\n  # Important: Save this slack thread timestamp for futher slack messages\n  release_thread_ts = release_thread[:json][\"ts\"]\n\n  gym # Build the app and create .ipa file\n\n  # Post an update in release thread\n  post_to_slack(\n    message: \"App has been build successfully! 💪\",\n    channel: \"#ios-team\",\n    thread_ts: release_thread_ts\n  )\n\n  deliver # Upload build to AppStore\n\n  # Post an update in release thread\n  post_to_slack(\n    message: \"App has been uploaded to the AppStore and submitted for Apple's review! 🚀\",\n    channel: \"#ios-team\",\n    thread_ts: release_thread_ts\n  )\n\n  # Spaceship logs file upload on Slack\n  file_upload_to_slack(\n    initial_comment: \"Deliver:: Spaceship logs\",\n    file_path: \"spaceship.log\",\n    channels: \"#ios-team\",\n    thread_ts: release_thread_ts\n  )\nend\n```\n\n## About Fastlane\n\n_fastlane_ is the easiest way to automate beta deployments and releases for your iOS and Android apps. To learn more, check out [fastlane.tools](https://fastlane.tools).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrazymanish%2Ffastlane-plugin-slack_bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrazymanish%2Ffastlane-plugin-slack_bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrazymanish%2Ffastlane-plugin-slack_bot/lists"}