handlers.conditionally_create_todo_handler

class ConditionallyCreateTodoHandler(handlers.eventhandler.EventHandler):

Whenever all conditions are fulfilled, we create a to-do.

Configuration:
condition: Code-based condition, only execute if it returns a True-like value.

name = 'Conditionally create a to-do'
description = 'Whenever certain conditions are fulfilled, create a to-do.'
conditions = {'event_types': ['FactSheetUpdatedEvent']}
supports_initial_sync = True
config_template = {'fs_types': ['Application'], 'todo_title': 'Title', 'todo_description': 'Description', 'todo_roles': 'System Owner', 'recreate_todo': False, 'condition': 'fs'}
def check_code_condition(cls, condition, variable_name):
def handle(self, event, fs, **kwargs):

Called automatically whenever a matching event comes in via webhook.