Giter Site home page Giter Site logo

osticket-slack's Introduction

Slack

osTicket-slack

An plugin for osTicket which posts notifications to a Slack channel.

Originally forked from: https://github.com/thammanna/osticket-slack.

Info

This plugin uses CURL and was designed/tested with osTicket-1.10.1

Requirements

  • php_curl
  • A slack account

Install


  1. Clone this repo or download the zip file and place the contents into your include/plugins folder.
  2. Now the plugin needs to be enabled & configured, so login to osTicket, select "Admin Panel" then "Manage -> Plugins" you should be seeing the list of currently installed plugins.
  3. Click on Slack Notifier and paste your Slack Endpoint URL into the box (Slack setup instructions below).
  4. Click Save Changes! (If you get an error about curl, you will need to install the Curl module for PHP).
  5. After that, go back to the list of plugins and tick the checkbox next to "Slack Notifier" and select the "Enable" button.

Slack Setup:

  • Navigate to https://api.slack.com/ select "Start Building"
  • Name your App osTicket Notification, select your Workspace from the drop-down
  • Select "Incoming Webhooks"
  • Activate the Webhooks with the link (it defaults to Off, just click Off to change it to On)
  • Scroll to the bottom and select "Add a new Webhook to Workspace"
  • Select the endpoint of the webhook, (ie, channel to post to)
  • Select "Authorize"
  • Scroll down and copy the Webhook URL entirely, paste this into the osTicket -> Admin -> Plugin -> Slack config admin screen.

If you want to add the Department as a field in each slack notice, tick the Checkbox in the Plugin config.

The channel you select will receive an event notice, like:

Aaron [10:56 AM] added an integration to this channel: osTicket Notification

You should also receive an email from Slack telling you about the new Integration.

Discord Setup:

Note: This works very well, but may not be as smooth as Slack is natively.

  • Open Discord
  • Right-click on the channel you wish to send the notifications too
  • Select "Webhooks"
  • Create a Webhook by clicking 'Create Webhook'
  • Scroll down to the bottom and copy the Webhook URL in it's entireity
  • Go to the osTicket -> Admin -> Plugin -> Slack config admin screen and paste the URL, at the end add /slack
  • Example: https://discordapp.com/api/webhooks/{webhook.id}/{webhook.token}/slack

Test!

Create a ticket!

You should see something like the following appear in your Slack channel:

slack-new-ticket

When a user replies, you'll get something like:

slack-reply

Notes, Replies from Agents and System messages shouldn't appear, usernames are links to the user's page in osTicket, the Ticket subject is a link to the ticket, as is the ticket ID.

Adding pull's from original repo:

+0.2 - 17 december 2016 +[feature] "Ignore when subject equals regex" by @ramonfincken

osticket-slack's People

Contributors

axadiw avatar clonemeagain avatar dc9-dev avatar jenseb avatar magisksec avatar perryk avatar thammanna avatar wildernesstechie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

osticket-slack's Issues

Postfix config.

Hello, can you say me which the best postfix configuration to connect the API ??
I have a internal mail server with Debian using the 25 port for smtp.
can´t connect with slack.

multiple instances failures

Although I can create multiple instances only the settings of the first instance are actually reviewed.

I have 2 different instances set up. Both use filtering. Instance 2 has a different filter and points to a different channel than instance 1.

Instance,channel,filter
1,1,1
2,2,2

If instance 1 is the only instance enabled anything that satisfies the filter in 1 results in two slack notifications to channel 1.
If instances 1 and 2 are enabled anything that satisfies the filter in 1 results in two slack notifications to channel 1.
If instance 2 is the only instance enabled anything that satisfies the filter in 2 does not result in a slack notification being sent.

I have confirmed that my filter in instance 2 is not the issue by testing it in instance 1 of the plugin.
I have confirmed that my slack endpoint in instance 2 is not the issue by testing it in instance 1 of the plugin.

Looking at the code the bootstrap() function is always going to return the first active plugin instance because it's passing a null value to getPluginInstance.

Installation-Bug

System: osTicket PLUS (v1.14.2 / Patch-3) — Deutsche Version
PHP-Version: 7.3.22
Error by Installation of Plugin:

[INSERT INTO ost_plugin SET installed=NOW() , install_path='plugins/osticket-slack-master', name='Slack notifier', isphar='', version=0.2]

Unknown column 'version' in 'field list'<br />
<br />
---- Ablaufverfolgung ----<br />
#0 (root)/include/mysqli.php(200): osTicket->logDBError('DB Error #1054', '[INSERT INTO os...')<br />
#1 (root)/include/class.plugin.php(358): db_query('INSERT INTO ost...')<br />
#2 (root)/scp/plugins.php(51): PluginManager->install('plugins/osticke...')<br />
#3 {main}

v1.14.2 osTicket Compatibility

I am having issues every time I create a new ticket the site can't complete the request. I've disabled this plugin and the site works. Is there any known fix to this or an updated slack plugin?

Not Working

Hi,
I installed the plugin as described and created a slack app.
I'm experiencing the problem that the osTicket (1.10) doesn't send any notifications and logs are not generated.
I have also checked the php-curl, but the php curl is working and the plugin also turned on.
How to debug it?
Pls provide the solutions for it

not working....

I installed the plugin as described and created a slack app. Checked that it is working by issuing a notification via curl. However osTicket (1.10) never sends any notifications. The logs are empty any idea?

Slack posting issue!

I'm using OSticket v1.14.2 and plugin slack notifier v0.2. Every once in a while when a customer sends an email, slack won't get notified and I'll get an email from alerts that says:
Subject: Slack posting issue!
Error sending to: https://hooks.slack.com/services/T498U9066/B01... Http code: 400 curl-error: 0

When I click on the link provided I go to it and the page just says, invalid_payload

In the system logs I get the following error:
API Unexpected Data
thread_entry_recipients/to/1: Unexpected data received in API request

1.11 Compatability ?

We are running 1.11 latest and sometimes it will work, other times it will generate a Slack posting issue!

Error sending to: <slack endpoint> Http code: 400 curl-error: 0

Osticket 1.14.3

Can not install into OST 1.14.3. Any chance we could get this updated for the latest release?

Selection priority or help topic

Messages should only be sent to Slack if they are assigned to a defined priority or a specific help topic.
How is this possible?

Adding responses as thread messages?

It would be fun to have ticket responses show up as threaded messages under their opening notification. All you need to do is pass the ts of the original posted slack message.

I'm wondering if there's a way for the plugin to store this information on a ticket?

Via Email: custom form errors

From an email:

If my customers create tickets with self-defined forms they just get errors on their browser. In Internet Explorer a page shows up: "this page cannot be displayed" and Chrome just says: "Something went wrong". I set my Osticket Installation to Debug mode and it logged this:

Slack posting issue!
Error sending to: https://hooks.slack.com/services/....MYID..

Http code: 400 curl-error: 0

it doesnt depend on the browser, its an reproducable error if i use a topic which has self-defined forms. Curl is enabled in PHP Options. I am using Osticket 1.10.2 on Apache 2.4 with PHP 7 with a german language pack.

Could you please check on this or help me by troubleshooting this issue?

Hmm, I wouldn't have thought that would affect anything, but let's dig in and see!

No detail ticket in slack notice

hi i just install osticket 1.14.3, and add slack notification plugin.
slack notification running well, but no detail ticket on slack message.
can you help me to show detail ticket on slack message ?

Screen Shot 2020-11-04 at 23 30 23

Issue - Task id \ Ticket id

Hello
the system works, but we have noticed that when a new Task is inserted and the id already corresponds to that of an existing ticket, in Slack the ticket with the corresponding id is inserted. An example, it is difficult to explain, a Task is created today with id in mysql 69 (tasks.php? Id = 69) if there is already a ticket with this id (tickets.php? Id = 69), in Slack, erroneously, the ticket is inserted, as if it had just been added.

get errormail for every new ticket

Basically the connection to slack works. But now I get a mail with every new ticket:


Subject: "CronJob /path/to/osticket/mail_cron.sh"
message: "didn't trigger"

what could be the reason? How can I fix it?
this mail starts after activating the plugin.

Thomas

Can we hide the subject in the message?

I have already removed the %{slack_safe_message} from the command.
However, since sometimes the subject will also show some confidential information, would that be possible to hide it when a new ticket message is sent?

Error on some new tickets

Hello,

I have the Slack plugin working and it sends a notification for some tickets but not all. We are using v1.11 of osTicket. Here is the error message I received in the Apache logs (edited for privacy) :

[Tue Apr 23 14:47:46.901934 2019] [:error] [pid 15059] [client x.x.x.x:58337] PHP Fatal error: Uncaught Error: Call to a member function getBody() on null in /var/www/osticket/include/plugins/osticket-slack-master/slack.php:41\nStack trace:\n#0 /var/www/osticket/include/class.signal.php(98): SlackPlugin->onTicketCreated(Object(Ticket), NULL)\n#1 /var/www/osticket/include/class.ticket.php(4047): Signal::send('ticket.created', Object(Ticket))\n#2 /var/www/osticket/open.php(42): Ticket::create(Array, Array, 'Web')\n#3 {main}\n thrown in /var/www/osticket/include/plugins/osticket-slack-master/slack.php on line 41, referer: https://helpdesk.*****.***/open.php

Links broken

When links to the tickets are posted in slack they show up with a missing /

an example
https://website.comscp/tickets.php?id=884

Request: Possible to Get Notified Agent Activity?

It would be nice to get an update if ticket was accepted or handled by an agent.

Maybe...

"Ticket #234345" with "Subject Title" replied to by "Agent Name"

and

""Ticket #234345" with "Subject Title" was marked "Closed or Resolved" by "Agent Name"

Error with ost-v1.17

Version 1.17 of osTicket introduced instances for plugins.
It seems that this plugin does not cope with this. Can you please check and update - thanks.

webhook is not pulling from osticket

I'm pretty sure I've done something completely wrong, but when I pasted the webhook in the config as below:
'slack-webhook-url' => new TextboxField(array(
'label' => $__('https://hooks.slack.com/services/xxxxx'),

I'm getting the plugin showing as installed and enabled in osticket, but it's not pulling to slack.
I've checked the webhook, channel authorisation etc. but that all seems fine.

Any idea what I'm doing wrong?

URL in Slack message is incorrect

Showing as https://scp/tickets.php?id=10710

Should be https:///cp/tickets.php?id=10710 [note insertion of the /]

I corrected manually by editing slack.php and inserting the '/' [line 66] from:

$heading = sprintf('%s CONTROLSTART%sscp/tickets.php?id=%d|#%sCONTROLEND %s'

to:

$heading = sprintf('%s CONTROLSTART%s/scp/tickets.php?id=%d|#%sCONTROLEND %s'

This solves my problem

Error 500 when creating a ticket

Hi,

When the plugin is enabled, Creating a ticket ends up with a http error 500 error. any ideas? its a fairly generic error code. when i disable the plugin and tickets create fine

Thanks,

Request: Filter by department

If there a way to have this only report a specific department to a specific slack channel? We have multiple groups that need some level of segregation to different channels and this would be immensely helpful.

Heck, even pointing in the right direction so I can hack it together myself would be amazing.

Include unofficial Discord support

Hi there,

It would be really cool to mention that this already supports Discord in the readme - I'd submit a wiki page with instructions if you want.. Discord has a "slack-compatible" webhook in it's API - so you can very easily turn this into a Discord notifier too.

Cheers,
Magic.

HTTP ERROR 500

Every time that I have the plugin active, I am receiving an error after creating a new ticket that says "(website) is currently unable to handle this request. HTTP ERROR 500" in Chrome, also receiving "(website) is currently unable to handle this request.
HTTP ERROR 500" in Edge. If I go back to the dashboard, it has created the ticket, but I never get any notifications in Slack and only get the error when the Slack plugin is enabled.

Any thoughts?

Plugin dont send messages

Good evening!

I have installed this plugin, but its not send msgs for the #slack using my webhook.

Using the Postman, the message is send.

I used version 1.10

Help me please. :D

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.