Built-in Variables – Reference

The following reference contains descriptions of all the built-in variables that can be used as placeholders in text parameters of workflow actions.

You can also define custom variables in your workflows by using the Set Variable action.

Variable

  • Input – The output of the previous action.
  • Repeat: Range – This is only available if there is at least one repeat block in the workflow. It is set automatically to the range of the current iteration in the format from:to (two character indexes, separated by a colon).
  • Repeat: Text – This is only available if there is at least one repeat block in the workflow. It is set automatically to the text of the current iteration, which is either a line in the input, or a match of a regular expression.

Editor / Browser

  • Selected Text – The text that is currently selected in the main text editor.
  • File Name – The file name (without extension) of the file that is currently open for editing.
  • File Extension – The file extension of the current document (e.g. txt or md).
  • Sel. Range: Start – The zero-based character index of the first selected character.
  • Sel. Range: End – The zero-based character index of the end of the selection. This will be the same as Sel. Range: Start if the selection is empty.
  • Syntax Mode – The currently selected editor mode, regardless of the filename extension, e.g. “markdown”, “taskpaper”...
  • Browser Title – The title of the page that is currently loaded in the browser panel (empty if no page is loaded).
  • Browser URL – The URL of the page that is currently loaded in the browser panel (empty if no page is loaded).
  • Browser Selection – Selected text in the browser panel. Note that the selection is lost when you start editing text, so this works best in workflows that are triggered from the browser’s bookmarks menu.

Date

There are various built-in variables for formatting the current date. For example Month: January will be replaced with the full name of the current month (January is just an example to illustrate the format, the variable will of course contain the actual month when it’s expanded).

Time

The Time variables are similar to the ones in the Date section. They expand to the various numeric components of the current time. There are options for 12 and 24 hour clocks and for numbers with or without leading zero.

Other

  • Clipboard – Expands to the current contents of the text clipboard. If anything else (e.g. an image) is in the clipboard, the result will be empty.