Skip to content

run()

Run code when the user selects a Flow tile or launches the script through Otto.

Updated View as Markdown
For humans
Flow functionFlow Pro scriptingBase functions

This article covers the following platforms

run executes when the user clicks the tile or runs the script from the Otto search bar.

Its return value controls how the Flow wheel closes:

  • Return a duration (in ms) to delay closing the Flow wheel by that amount.
  • Return true to leave Flow open.
  • Return false to close Flow immediately.
  • Return nothing and Flow closes after the default 500ms.
run((event) => {
    example_event = {
        from: 'wheel' // where was the command sent from. Can be 'wheel' 'otto' or 'debugger'
    }
    return 1500; 
});
Navigation

Type to search…

↑↓ navigate↵ selectEsc close