@Kenny2 You won't be able to show a notification from the preloaded JS since that's executing in a sandboxed iFrame for security reasons. Can you refactor to a query that triggers on page run?
@Amanda but the script is to receive the realtime notification data from backend server via pusher. I won't know when the event trigger by backend, I can't loop the query all the time.
Our custom component will provide you the bridge needed between preload libraries running sandboxed in an iFrame and Retool data and APIs like utils.showNotification(), so that the two can talk to one another. This is done via the custom component's ability to update a data model which you can then set up a listener for.\
The listener to changes to customComponent1.model involves creating some query that triggers automatically when inputs change. I'll use a dummy select 1 for this with Query JSON with SQL, but the important part is the onSuccess handler. Additionally, I've added a showNotification "Only run when" configuration to prevent showing on page load.
Let me know if this makes sense!