Run (Teletype), action='') is used to execute code following a run command from Teletype. It takes the function to be executed and the name of the action to trigger the function.


  • func: Function function to be executed when action is passed to the run command from Teletype.
  • action: String name of the action to trigger func.

Usage example:

const { app } = require('detalib'); => 'Willkommen in Berlin.'); => 'Willkommen in Kreuzberg!', 'kreuzberg'); => 'Willkommen in Steglitz!', 'steglitz');

module.exports = app;

Command (Teletype)



'Wilkommen in Berlin!';

Command (Teletype Studio)

run kreuzberg


'Wilkommen in Kreuzberg!';

You can also stack run and cron together.

const { app } = require('detalib');

const printTime = event => `it is ${(new Date).toTimeString()}`, 'time');

module.exports = app;

event attributes

  • event.json: Object provides the JSON payload as an object.
  • event.body: String provides the raw JSON payload.
  • event.type: String will be instantiated to 'run'.
  • event.action: String bears the action provided by the user or an empty string if no action is provided.