Catch events in Shotgrid pipeline config

Hello there!

Is there a way to catch a CustomEntity events within the Shotgrid Pipeline Configuration to do some local event handling?

We’re using distributed config, if that matters.

I know about the existence Shotgrid Event Framework, however is it possible to make event handling in the Pipeline Config without merging the Event Framework into it?

Thanks in advance!

Yes and no…

you could use some of the core hooks to run some code.
Depending on the hook its run frequently or more sporadically.

However you might run into the situation where multiple toolkits are processing the same event at the same time.
You also need to store the next event id to process.

Having an event handler is better as it will not run into this issue and its controllable.

But in the end it all depends on what exactly you want to achieve.
In the workfiles app hooks for example you could do things like "set task status to In Progress if file is opened"

Something that is an event.

My goal is to notify the desktop user with a pop-up notification if a custom entity is changed.
For this, I’d like to catch the custom entity change events in the pipeline config, and do the notification.

This can be achieved with the ShotGrid Event Handler program, or with Web hooks.

How are you notifying them?

ShotGrid has a built in notification inbox and you can edit the global follow settings for example to achieve some of this.

With the eventr handler you could do things like set someone as a follower of a specific entity or generate a note on the entity or in their inbox to notify them.

Also think about being able to notify pople through your favorite messaging tool like Slack, Discord, Teams or Google Chat.

1 Like

My idea is to notify them with a desktop toast notification, similar to the default Windows notifications.
The main goal is to notify them immediately. So an email or a shotgrid inbox message won’t be enough.

The Slack/Discord/etc is a good idea, but I’m not sure if that’s visible enough. Since people already get a lot of messages on these, I’m afraid that the notifications about the CustomEntity changes would not look important enough.

If you are running windows, do you run Active Directory?
In that case you can use Group Policy Objects to ensure a list of programs is started on login of a user.

Then I would imagine you can create a tiny python app that loops and listens for a specific type of event in SG and then instructs the Windows API or command line to display a notification.

The Event handler in this case may be a bit overkill and running many of thse could overload the API endpoint on your site.
So I would do a custom one and have a random/delay so the machines aren’t checking SG for events every few seconds.