logo

The ConnectWise Control forum has moved to ConnectWise University! This forum has been locked and is in read-only mode. Click here for instructions on how to access the new forum.

Welcome Guest! You can not login or register.

Notification

Icon
Error

Options
Go to last post Go to first unread
shawnkhall  
#1 Posted : Friday, January 5, 2018 8:01:47 AM(UTC)
shawnkhall


Rank: Advanced Member

Medals: Level 1: Random Act of Kindness! Received One Thanks!

Joined: 2/6/2014(UTC)
Posts: 316
Man
United States

Thanks: 6 times
Was thanked: 33 time(s) in 29 post(s)
I've been using triggers for months to notify me on various devices via Integromat. For the last couple weeks - since installing 6.4.15787.6556 - the triggers no longer fire. This was the perfect solution for immediate notification of chat messages, and now it's not working at all.

I continue to use an email trigger that is also configured (the Integromat hook is action#2), but email is not immediate, and isn't nearly as responsive as clicking a link in a popup and getting on the client machine in 2 seconds flat.

To setup the Integromat hook:

1) Setup an account with Integromat.

2) Create a new scenario. Use a "webhook" template.

3) Add a Router from the Webhook.

4) Add a "Webhook response" and a "Google Chrome notification"

5) Set the webhook response value to 200 and any text response.

6) Install the Integromat chrome extension

7) Set the chrome notification to the ID of your extension installation

8) Go back to you CC installation, Admin, Triggers.

9) Add a new trigger with an HTTP action. Set the filter to "Event.EventType = 'SentMessage' AND Connection.ProcessType = 'Guest'"

10) Set the URL of the action to the hook URL generated for your Webhook object.

11) Add parameters as you like. I recommend:
HTTP Method: POST
Content Type: application/x-www-form-urlencoded
Body: GUID={Session.SessionID}&Name={Session.Name}&EventType=Message&Body={Event.Data}

12) In the Google Chrome Notification set the following parameters (change the domain name to yours, of course):
Body: {{1.EventType}}: {{1.Body}}
URL address: https://example.com/Host#Access/All//{{1.GUID}}
Icon: {{1.Icon}}

13) Save.

Now from one of your devices send a message. You should get a Chrome notification via Integromat directly if Chrome is open. If not, it'll appear the second you open Chrome.

You can setup multiple devices in step 7 above, so it can notify each of your computers, staff and so on.

You can also filter them based on additional values. For example, if you only want certain staff to be alerted when a message is from a device in the Contoso organization, create an additional trigger and add "Session.CustomProperty1 = 'Contoso'" to the filter. Assign all the staff Integromat IDs in step 7 that work with Contoso and you're done.
thanks 1 user thanked shawnkhall for this useful post.
ebell on 1/17/2018(UTC)

shawnkhall  
#2 Posted : Friday, January 5, 2018 8:19:38 AM(UTC)
shawnkhall


Rank: Advanced Member

Medals: Level 1: Random Act of Kindness! Received One Thanks!

Joined: 2/6/2014(UTC)
Posts: 316
Man
United States

Thanks: 6 times
Was thanked: 33 time(s) in 29 post(s)
I recreated the trigger completely in order to validate that it was neither integromat nor my server at fault. The action hook isn't firing: it's not even POSTing to itself or another domain on the same IP. Looks like a bug.
shawnkhall  
#3 Posted : Friday, January 5, 2018 8:33:38 AM(UTC)
shawnkhall


Rank: Advanced Member

Medals: Level 1: Random Act of Kindness! Received One Thanks!

Joined: 2/6/2014(UTC)
Posts: 316
Man
United States

Thanks: 6 times
Was thanked: 33 time(s) in 29 post(s)
recreated it completely again, still no joy. another trigger with an HTTP action, no filter, and only "{*:xml}" in the body is working fine, though, so it looks like it might be related to either the filter or body.
shawnkhall  
#4 Posted : Tuesday, January 9, 2018 3:12:45 AM(UTC)
shawnkhall


Rank: Advanced Member

Medals: Level 1: Random Act of Kindness! Received One Thanks!

Joined: 2/6/2014(UTC)
Posts: 316
Man
United States

Thanks: 6 times
Was thanked: 33 time(s) in 29 post(s)
I created a bug report and heard back from Ben Burner.
http://control.product.c...dy-fails-on-64157876556/

I tried url-encoding the information, and it still didn't work.

Is there a debugging mechanism for the triggers? Any way to see whether the server received the information and what information is actually sent or received?​ Did the underlying code relating to the trigger action behavior change in the 6.4.15787.6556​ release?

I setup a page on one of my sites to harvest the information as it was published and the CC trigger action is not using a user-agent. I'm not seeing any requirements on the integromat side that would prevent it from receiving the triggered request, but this could be responsible.

As a workaround I setup routine in the php page that I am using as part of my logging routine which collects the information. The new routine checks for SentMessage and NeedsAcknowledgment​, and performs a remote request to trigger the notification on its own. That is working fine.
shawnkhall  
#5 Posted : Tuesday, April 17, 2018 4:21:50 PM(UTC)
shawnkhall


Rank: Advanced Member

Medals: Level 1: Random Act of Kindness! Received One Thanks!

Joined: 2/6/2014(UTC)
Posts: 316
Man
United States

Thanks: 6 times
Was thanked: 33 time(s) in 29 post(s)
It turns out this issue was related to a security change on the Integromat side, where they basically dropped any connections that weren't using TLS 1.2+.

I used the .NET 'strongcrypto' registry fix on our server to force TLS 1.2 within .NET apps and that resolved the problem.
Code:
reg add "HKLM\SOFTWARE\Microsoft\.NETFramework\v4.0.30319" /v "SchUseStrongCrypto" /t REG_DWORD /d 1 /f
reg add "HKLM\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319" /v "SchUseStrongCrypto" /t REG_DWORD /d 1 /f


Once this was done it was triggering wonderfully again. :)
UnLo  
#6 Posted : Wednesday, January 23, 2019 7:55:40 PM(UTC)
UnLo


Rank: Guest

Joined: 1/23/2019(UTC)
Posts: 6
United States
Location: Ohio

Thanks: 3 times
First of all, thank you for the detailed guide.

I wasn't so sure about ConnectWise and triggers really, until I came across this post.

I was able to create a free account @ integromat.com

I was able to create the webhook, added it to the default trigger in CC dashboard.

I was also able to download the extension, enable it in chrome, and paste my Ref ID into the Chrome notification module.

I can trigger the event by sending a message, I get the email, I even HEAR the sound and get the popup Notification in chrome.

However, Your step 12 seems to suggest I should be getting parameters from the webhook? In any event, I'm unable to get the details from the device, or the message in my notification. I receive errors from Integromat when trying to run the scene with a copy pasta directly from your guide.

[12) In the Google Chrome Notification set the following parameters (change the domain name to yours, of course):
Body: {{1.EventType}}: {{1.Body}}
URL address: https://example.com/Host#Access/All//{{1.GUID}}
Icon: {{1.Icon}}]

ugh.. just as I was finishing up my post I realized my mistake.

Just to point out for anyone else. If you mess around with the scenario in integromate, your starting module may no longer be {1} in my case I had to edit the module number from 1 to 6. This can be avoided by starting from scratch and ensuring your first webhook is indeed module 1 or just note that the number in step 12 is referencing the module in integromate
shawnkhall  
#7 Posted : Thursday, January 24, 2019 6:22:56 AM(UTC)
shawnkhall


Rank: Advanced Member

Medals: Level 1: Random Act of Kindness! Received One Thanks!

Joined: 2/6/2014(UTC)
Posts: 316
Man
United States

Thanks: 6 times
Was thanked: 33 time(s) in 29 post(s)
You can also click them or drag & drop them from the Integromat context editor popup into the forms where you want them to be.

For people that come in the future, yes, this does provide details about the event including the actual message and a direct link to the device. It's pretty nifty.

Windows 10 has broken it to some degree by using their own system-wide notifications instead of the great Chrome notifications we were getting when I originally posted this, but you can switch those back to the default Chrome notifications by settings chrome://flags#enable-native-notifications to Disabled.
thanks 1 user thanked shawnkhall for this useful post.
UnLo on 1/25/2019(UTC)
UnLo  
#8 Posted : Friday, January 25, 2019 12:22:39 PM(UTC)
UnLo


Rank: Guest

Joined: 1/23/2019(UTC)
Posts: 6
United States
Location: Ohio

Thanks: 3 times
I added &Time={Event.Time}&User={Session.GuestLoggedOnUserName} to the body of the message.

User works well. Time is about 5 hours off. I'm not sure why this is. My instance is in the same time zone as the end device, I'm thinking something in Integromat is throwing the time off. Not sure how to fix it though.
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.