End-of-Life (EoL)

Create a Post-Processing Script

automation Follow these steps to create a post-processing script after an incident has been remedied.
This procedure describes how to create a post-processing script after an incident has been remedied.
  1. Select
    Automation
    New Automation
    .
  2. Type a name for the post-processing script and click
    Save
    .
  3. In the
    Tags
    field, from the drop down list select
    Post-processing
    .
  4. Add fields as required.
  5. Click
    Save
    .
The following script example requires the user to verify all
To Do
tasks before closing an incident. Before you start, you need to configure a Cortex XSOAR REST API instance.
inc_id = demisto.incidents()[0].get('id') tasks = list(demisto.executeCommand("demisto-api-get", {"uri": "/todo/{}".format(inc_id)})[0]['Contents']['response']) if tasks: for task in tasks: if not task.get("completedBy"): return_error("Please complete all ToDo tasks before closing the incident") break

Recommended For You