Frankly, my biggest struggle with AI is getting the correct actions to fire. Do I prompt call/do/execute…to get my action to fire? Nothing has been consistent.
I found “Dispatch the Show Notification action from the action section” in @MaximeBaker (thanks Maxime!) prompt and it has worked great.
Here is his full prompt:
1. In the **DATA** section, define only the `Delay` property with a milliseconds value.
2. On component load, automatically retrieve the `Delay` property. If the property is not set, use a default value of 100 milliseconds.
3. Use the retrieved `Delay` property to start a `setTimeout` function.
4. After the specified delay:
a. Dispatch the **Show Notification** action from the **action** section.
5. The **Show Notification** action must be defined in the **action** section.
6. There will be no visual elements, start, or stop button; the action will trigger automatically without any manual intervention.
7. Ensure that all code runs within the component's secure context to avoid violations of Content Security Policy (CSP) and prevent loading external scripts.
from this community note: ( Auto Action trigger )