Slack-Notify - Trigger Slack incoming webhooks


    use Slack::Notify;

    my $n = Slack::Notify->new(
      hook_url => '',

      text => "something happened",


This is a simple client for Slack incoming webhooks.

Create a Slack::Notify object with the URL of an incoming hook, then call the post method to trigger it.



    my $n = Slack::Notify->new;

This constructor returns a new Slack::Notify object. Valid arguments include:

  • hook_url

    The Slack incoming hook URL. Create one of these in the Slack integrations config.



      text => 'something happened',

Triggers the hook. There's several arguments you can supply, which are described in more detail in the incoming hook documentation.

  • text

    A simple, multi-line message without special formatting.

  • username

    Value to use for the username, overriding the one set in the hook config.

  • icon_url

    URL of an image to use for the icon, overriding the one set in the hook config.

  • icon_emoji

    An emoji code (eg :+1:) to use for the icon, overriding the one set in the hook config.

  • attachments

    An arrayref containing some attachment objects. See the attachment guide for details. At the moment this module supports attachment fields, but not buttons, menus and other interactive ocontent.


Bugs / Feature Requests

Please report any bugs or feature requests through the issue tracker at You will be notified automatically of any progress on your issue.

Source Code

This is open source software. The code repository is available for public review and contribution under the terms of the license.

  git clone


  • Rob N ★ <>


This software is copyright (c) 2017 by Rob N ★

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.