Hello @RajeshBhat My suggest would be to create a workflow to achieve this. If you will try to add queryDef within in the delivery template, it won't work. Any script/code added in delivery template should be executed within 5 seconds otherwise it will timeout.