Alerts can deliver to SNS/SQS, which can invoke a Lambda function running your custom script:
- https://docs.runpanther.io/setup/sqs
- https://docs.runpanther.io/setup/sns