actualNoteContentPart: # Plugin API Reference Documentation: Actions
  Plugin actions are the interaction points that define how a plugin's code gets called. Actions functions that return values can either return the value directly, or return a Promise that resolves to the value when ready. All action functions are passed an [App Interface](/help/developing_amplenote_plugins#App_Interface)  object as the first argument.
  
  Each action can optionally define a check function that will be called before displaying the plugin to the user in the context of the specific action. The check function receives the same arguments as the plugin action (run) function, and returns a boolean indicating whether the plugin should be displayed or not. Returning a promise that resolves to the boolean is supported, and will show a loading indicator to the user in most cases. Note, however, that the user may no longer be viewing the plugin action context when an asynchronous check completed (e.g. if the user dismisses the menu the plugin action would be listed in).
  
  ## appOption
  Adds app-wide options that can be invoked from the "jump to note" (web) or quick search (mobile app) dialogs.
  Arguments
  	app [App Interface](/help/developing_amplenote_plugins/app_interface)  
  Returns
  	Nothing
  ```
  {  appOption(app) {    app.alert("hello");  }}
  ```
  
  
  
  
  
  
  ## dailyJotOption
  Adds an option to the suggestions shown below today's daily jot note in jots mode, with a button to run the plugin action. Implementing a check function is advisable to conditionally show the option, otherwise it will always be shown to the user.
  Arguments
  	app [App Interface](/help/developing_amplenote_plugins/app_interface)  
  	noteHandle [noteHandle](/help/developing_amplenote_plugins/appendix_i#noteHandle)  of the daily jot note that the option is being shown in
  Returns
  	Nothing
  ```
  {  dailyJotOption(app, noteHandle) {    app.alert("Hello");  }} 
  ```
  
  
  
  
  
  To customize the text shown on the "Run" button, return a non-empty string from the plugin action's check function:
  ```
  {  dailyJotOption: {    check(app, noteHandle) {      return "Do something"; // Return `null`, `false`, or `""` to not show plugin    },    run(app, noteHandle) {      app.alert("Hello");    }  }} 
  ```
  
  
  
  
  ## eventOption
  Adds an option to the popup menu shown for events (tasks and scheduled bullets) on the calendar.
  Arguments
  	app [App Interface](/help/developing_amplenote_plugins/app_interface)  
  	taskUUID String identifier for the task or scheduled bullet the menu is being shown for.
  Returns
  	Nothing
  ```
   {   async eventOption(app, taskUUID) {     const task = await app.getTask(taskUUID);     if (task.startAt) {       // Change scheduled start time by one hour       await app.updateTask(taskUUID, { startAt: task.startAt + 3600 });     }   } }
  ```
  
  ## imageOption
  Adds an option to the drop-down menu on each image in a note.
  Arguments
  	app [App Interface](/help/developing_amplenote_plugins/app_interface)  
  	image [image](/help/developing_amplenote_plugins/appendix_i#image)  object describing the selected image
  Returns
  	Nothing
  See also
  	[app.context.updateImage](/help/developing_amplenote_plugins/app_interface#app.context.updateImage)  to update the properties of the image
  ```
  {  async imageOption(app, image) {    await app.alert("image: " + image.src);  }} 
  ```
processedNoteContent: ---
  title: Actions: Ways to invoke/initiate plugin execution
  tags: 
  headers: # Plugin API Reference Documentation: Actions
  ---
  Plugin API Reference Documentation: Actions
  Plugin actions are the interaction points that define how a plugin's code gets called. Actions functions that return values can either return the value directly, or return a Promise that resolves to the value when ready. All action functions are passed an [App Interface](/help/developing_amplenote_plugins#App_Interface)
    object as the first argument. Each action can optionally define a check function that will be called before displaying the plugin to the user in the context of the specific action. The check function receives the same arguments as the plugin action (run) function, and returns a boolean indicating whether the plugin should be displayed or not. Returning a promise that resolves to the boolean is supported, and will show a loading indicator to the user in most cases. Note, however, that the user may no longer be viewing the plugin action context when an asynchronous check completed (e.g. if the user dismisses the menu the plugin action would be listed in). 
  appOption
  Adds app-wide options that can be invoked from the "jump to note" (web) or quick search (mobile app) dialogs.
  Arguments
  app [App Interface](/help/developing_amplenote_plugins/app_interface)
  
  Returns
  Nothing {  appOption(app) {    app.alert("hello");  }}
  
  dailyJotOption
  Adds an option to the suggestions shown below today's daily jot note in jots mode, with a button to run the plugin action. Implementing a check function is advisable to conditionally show the option, otherwise it will always be shown to the user.
  Arguments
  app [App Interface](/help/developing_amplenote_plugins/app_interface)
  
  noteHandle [noteHandle](/help/developing_amplenote_plugins/appendix_i#noteHandle)
    of the daily jot note that the option is being shown in
  Returns
  Nothing {  dailyJotOption(app, noteHandle) {    app.alert("Hello");  }} 
  To customize the text shown on the "Run" button, return a non-empty string from the plugin action's check function: {  dailyJotOption: {    check(app, noteHandle) {      return "Do something"; // Return `null`, `false`, or `""` to not show plugin    },    run(app, noteHandle) {      app.alert("Hello");    }  }} 
  
  eventOption
  Adds an option to the popup menu shown for events (tasks and scheduled bullets) on the calendar.
  Arguments
  app [App Interface](/help/developing_amplenote_plugins/app_interface)
  
  taskUUID String identifier for the task or scheduled bullet the menu is being shown for.
  Returns
  Nothing  {   async eventOption(app, taskUUID) {     const task = await app.getTask(taskUUID);     if (task.startAt) {       // Change scheduled start time by one hour       await app.updateTask(taskUUID, { startAt: task.startAt + 3600 });     }   } }
  
  imageOption
  Adds an option to the drop-down menu on each image in a note.
  Arguments
  app [App Interface](/help/developing_amplenote_plugins/app_interface)
  
  image [image](/help/developing_amplenote_plugins/appendix_i#image)
    object describing the selected image
  Returns
  Nothing
  See also
  [app.context.updateImage](/help/developing_amplenote_plugins/app_interface#app.context.updateImage)
    to update the properties of the image {  async imageOption(app, image) {    await app.alert("image: " + image.src);  }}
noteTitle: Actions: Ways to invoke/initiate plugin execution