Now you can build interactive forms in Slack that do all sorts of things. File a ticket, add assignees, gather feedback, take attendance, and much more.
- A simple PHP package for sending messages to Slack, with a focus on ease of use and elegant syntax.
- Markdown is a lightweight markup language for creating formatted text using a plain-text editor. John Gruber and Aaron Swartz created Markdown in 2004 as a markup language that is appealing to human readers in its source code form. Markdown is widely used in blogging, instant messaging, online.
- This integration allows you to create and schedule Flow tasks and quickly loop in your teammates directly from Slack.
- php >=5.5.0
- guzzlehttp/guzzle ~6.0|~5.0|~4.0
- ext-mbstring *
- php >=5.4.0
- guzzlehttp/guzzle ~6.0|~5.0|~4.0
- ext-mbstring *
- php >=5.4.0
- guzzlehttp/guzzle ~6.0|~5.0|~4.0
- ext-mbstring *
- php >=5.4.0
- guzzlehttp/guzzle ~5.0|~4.0
- ext-mbstring *
- php >=5.4.0
- guzzlehttp/guzzle ~5.0|~4.0
- ext-mbstring *
- php >=5.4.0
- guzzlehttp/guzzle ~5.0|~4.0
- ext-mbstring *
- php >=5.4.0
- guzzlehttp/guzzle ~5.0|~4.0
- ext-mbstring *
- php >=5.4.0
- guzzlehttp/guzzle ~5.0|~4.0
- ext-mbstring *
- php >=5.4.0
- guzzlehttp/guzzle ~5.0|~4.0
- ext-mbstring *
- php >=5.4.0
- guzzlehttp/guzzle ~5.0|~4.0
- ext-mbstring *
- php >=5.4.0
- guzzlehttp/guzzle ~4.0
- ext-mbstring *
- php >=5.4.0
- guzzlehttp/guzzle ~4.0
- ext-mbstring *
- php >=5.4.0
- guzzlehttp/guzzle ~4.0
- ext-mbstring *
- php >=5.4.0
- illuminate/support 4.*
- guzzlehttp/guzzle ~4.0
- php >=5.3.0
- illuminate/support 4.1.*
- guzzlehttp/guzzle ~4.0
Please enable JavaScript to view the comments powered by Disqus.comments powered by Disqus
A simple PHP package for sending messages to Slack with incoming webhooks, focussed on ease-of-use and elegant syntax. Note: this package is no longer being actively maintained.
- Laravel integration: Slack for Laravel
- Symfony integration: NexySlackBundle
Requirements
- PHP 5.5, 5.6, 7.0 or HHVM
Installation
You can install the package using the Composer package manager. You can install it by running this command in your project root:
Then create an incoming webhook on your Slack account for the package to use. You'll need the webhook URL to instantiate the client (or for the configuration file if using Laravel).
Basic Usage
Instantiate the client
Settings
The default settings are pretty good, but you may wish to set up default behaviour for your client to be used for all messages sent. All settings are optional and you don't need to provide any. Where not provided, we'll fallback to what is configured on the webhook integration, which are managed at Slack, or our sensible defaults.
Field | Type | Description |
---|---|---|
channel | string | The default channel that messages will be sent to |
username | string | The default username for your bot |
icon | string | The default icon that messages will be sent with, either :emoji: or a URL to an image |
link_names | bool | Whether names like @regan or #accounting should be linked in the message (defaults to false) |
unfurl_links | bool | Whether Slack should unfurl text-based URLs (defaults to false) |
unfurl_media | bool | Whether Slack should unfurl media-based URLs, like tweets or Youtube videos (defaults to true) |
allow_markdown | bool | Whether markdown should be parsed in messages, or left as plain text (defaults to true) |
markdown_in_attachments | array | Which attachment fields should have markdown parsed (defaults to none) |
Sending messages
Sending a basic message (preview)
Sending a message to a non-default channel
Sending a message to a user
Sending a message to a channel as a different bot name (preview)
Sending a message with a different icon (preview)
Send an attachment (preview)
Send an attachment with fields (preview)
Send an attachment with an author (preview)
Advanced usage
Markdown
By default, Markdown is enabled for message text, but disabled for attachment fields. This behaviour can be configured in settings, or on the fly:
Send a message enabling or disabling Markdown
Send an attachment specifying which fields should have Markdown enabled
Explicit message creation
For convenience, message objects are created implicitly by calling message methods on the client. We can however do this explicitly to avoid hitting the magic method.
Attachments
When using attachments, the easiest way is to provide an array of data as shown in the examples, which is actually converted to an Attachment object under the hood. You can also attach an Attachment object to the message:
Each attachment field is also an object, an AttachmentField. They can be used as well instead of their data in array form:
You can also set the attachments and fields directly if you have a whole lot of them:
Contributing
If you're having problems, spot a bug, or have a feature suggestion, please log and issue on Github. If you'd like to have a crack yourself, fork the package and make a pull request. Please include tests for any added or changed functionality. If it's a bug, include a regression test.
How do you remove Slack formatting toolbar?
I rarely add formatting to messages, and would rather the chat box in Slack only be a chat box like in Messenger (and like it was before). Instead now it's double as large and has formatting options I'll never use. How can you turn off Slack's formatting options?
Question
What do you think of Slack's new WYSIWYG editor?Answer
There's an option to turn it off - Preferences > Advanced > Input Options and toggle 'Format messages with markup'.
Share
Choose how you'd like to format messages by going to Preferences > Advanced > Input Options
We recently released a WYSIWYG editor to help you format messages in Slack. To the users who preferred the text markdown from before, we heard you. 🙇
Starting today, you can choose how you’d like to format messages by going to Preferences > Advanced > Input Options. #changelog
There are several ways to disable Slack's rich text editor
If you just want to hide the 'kitchen sink' formatting toolbar, you can disable it as @maguay described below.
If you want to actually move back to the old Markdown-style formatting options, here's how you can do it:
Chrome
If you use Slack in Chrome, this extension will revert the text formatting for you.
Firefox
If you use Slack in Firefox, this extension will revert the text formatting for you.
Desktop
Disabling the new text editor in the desktop app is a bit trickier but totally doable if you're willing to wade into some code. @kfahy outlined these instructions on Github (source):
1) Open the slack app in Developer mode
- On Mac OS X: export SLACKDEVELOPERMENU=true && open -a /Applications/Slack.app
- On Windows in a Powershell window (per user install): $env:SLACKDEVELOPERMENU='true'; & '$($env:LOCALAPPDATA)Slackslack.exe'
- On Windows in a Powershell window (machine wide install): $env:SLACKDEVELOPERMENU='true'; & '$($Env:ProgramFiles)Slack Deploymentslack.exe'
- On Ubuntu with Gnome (using Slack launcher):edit /usr/share/applications/slack.desktopreplace Exec=/usr/bin/slack %U with Exec=env SLACKDEVELOPERMENU=true /usr/bin/slack %U
- On other OS's: ensure the SLACKDEVELOPERMENU environment variable is set to true before opening the Slack app.
2) Right-click in the app and Inspect element
3) Copy the contents of index.js
4) Paste into the Console tab
5) Repeat each time you reload slack or switch to a team for the first time
Click the Aa button in the lower right of Slack's chat box
You can't fully disable Slack's formatting options, but you can hide the Slack formatting toolbar. Click the Aa
button in the lower right of Slack's chat box, and Slack will hide the toolbar. You can still use keyboard shortcuts to add formatting, or select text to see a hover toolbar with formatting options, but that'll at least save space and keep Slack looking a bit more like it used to.
We currently use Quickbooks Online but the options for invoice customization are limited and the interface is horrendous.We're looking for something that can:- link up with our banking- accept ...
I've been using Confluence since 2013, and in my opinion, it's the best document collaboration tool. Lately, I've seen that Notion is getting trendy. Any Notion heavy user around?
Odds are your team doesn’t use the same tool to manage projects and assign work as you use to manage your personal life. Even your calendar appointments likely live on separate Google Calendars, on...
Markdown In Slacks
Markdown In Slack Login
We're currently discussing Slack and 894 other software products. Join in the conversations: