Script to notify user of newly created entity with direct link or redirect

If a user creates an automation button what creates a new entity, this results in a confirmation, but the result is not visible or clickable. I would like to try these solutions:

(1) create a script that notifies the user of the created entity, and shows a direct link to the created entity.

(2) create a script that redirects the user to the newly created entity display.

(3) create a script that opens the newly created entity display in a new panel.

Can anyone help me out with his? Thanks

1 Like

Fibery Automations and scripts unfortunately have no ability to control the UI - the most they can do is display a “result message” (and Button scripts can also send info to the browser’s debug console). Automations can also create Notifications, but that is not quite the same.

I doubt a script could create a clickable link in a Button result message, since these messages do not support any HTML or formatting.

2 Likes

We currently use automation buttons to convert one item into another, clean the old one and provide some extra information when needed.

For example

  • We have a ‘braindump’ item > it only has a title + description
  • We have a button to convert that into a task and provide data such as deadline, planning, project, etc.

We would also be very happy if user has the option to open the entity that has just been created :smile:

2 Likes

Maybe one of the developers can help out here since such feature (html in automation script messages) would be so helpful.

2 Likes

I’m not sure if this is still relevant to anyone, but it turns out you can create user notifications using Graphql mutations and execute them using fibery.graphql() in scripts and automations. I’ve been able to generate user notifications with both automations and buttons. There are some good examples here: . | Fibery.

3 Likes

I don’t see how to GraphQL generated messages can support HTML? How does it relate to this topic?

Given that you provide an entity to send the notification about, I figured that you could filter for the new entity that was created and send confirmation as a notification. When you click on the notification it opens the entity in question. I realize it’s not a direct link in the traditional sense but it does provide the user with easy access to the new entity.

Yes, thats the workaround that I use also (without script) but it fills up big amount of screen real estate.

This would be okay if Fibery implements Field Visibility Rules as part of their future entity view improvements. Then such field could appear and disappear when it contains content.