With "Show notification" mode for Action and other settings as shown below, I could show a notification message on the top right corner of the screen:
This is the notification message on the top right corner of the screen:
Now, with "Run script" mode for Action as shown below, I want the same notification message as shown above:
Are there any ways to do that?
You can use "utils.showNotification()" function with one object which contains 4 values "title", "description", "notificationType" and "duration".
utils.showNotification({
title: "something",
description: "something",
notificationType: "info", // "info", "success", "warning" or "error" is available
duration: 5 // If "duration" isn't set, 4.5 is set.
});
This is the code to show the same notification message with "Run script" mode for Action:
utils.showNotification({
title: "This is title.",
description: "This is description",
notificationType: "info",
duration: 5
});
Then, you can show the same notification message with "Run script" mode for Action: