To automatically update the NOTIFICATIONS section of workflows to modify the list of people to notify, the following xqueries can be run:

for $x in collection('/db/DRIVER/WorkflowDSResources/WorkflowDSResourceType')
return update insert <EMAIL address="xxx@xxx.com" condition="COND" messageProfileId="329e15b8-de29-4b9a-8ef7-d5f8f089ecf5_RW1haWxEU1Jlc291cmNlcy9FbWFpbERTUmVzb3VyY2VUeXBl"/>
into $x[.//WORKFLOW_NAME = 'wf name']//NOTIFICATIONS

where:
- xxx@xxx.com is the email that will receive notifications
- COND is the sending criteria and must be one of the following values: ONLY_SUCCESS, ONLY_FAILED, ALWAYS, NEVER
- wf name is the name of the workflow. E.g. 'Publish', 'Aggregate Metadata (X3M)', 'CLARIN: Aggregate Metadata (X3M)'

