Your Lair can be configured with triggers that can execute processes through internal or external events. The WayScript team plans to add additional triggers based on user request. Please visit our feedback page to vote for your favorites!
Internal triggers
  • cron - invoke process on schedule
  • deploy - invoke process when Lair is deployed
External triggers
  • http - invoke process when a request is made to a HTTP endpoint
  • (coming soon) slack
  • (coming soon) s3

Adding a trigger to your Lair

Triggers are configured through the .triggers file stored within your Lair’s root directory. Open the .triggers file from your file system and select “+ New Trigger” to add a new trigger.
Choosing a trigger will open a configuration modal. Along with custom fields specific to the intended functionality, triggers have the following basic configuration elements:
  • Choose a name for your trigger.
  • Set a run command to invoke a process for your trigger.
  • (Optional) Select a JSON file that contains a test event object. See Events for more details.
After editing your trigger’s configuration, press “Save” to add your configuration to the .triggers file. You will also have to “Push” your workspace’s file system to update this configuration on your remote Lair.
Configured triggers only invoke processes in production Lair environments. However, you can test your triggers by manually running them through the configuration modal or using the generated development endpoints. See Hosted environments for more details on development vs. production environments.

Manually invoking your trigger

After opening the .triggers file, select an existing trigger to open the configuration modal. Press “Run” to execute your trigger’s run command and start the process execution. See Processes for more details on how to view and manage processes.

Accessing your trigger’s events

Your triggers can pass data payloads, called events in WayScript X, to your processes. See Events for more details on how these events can be accessed.
Last modified 1mo ago