Kollaborator Module Builder is a Burp Suite extension that empowers you to write your own Python script to handle collaborator interactions.
The beauty of this tool is it will automatically add the interaction data to the script wherever the placeholder for data is written.
You can write your Python script in the text area under the KMB tab. This script will be triggered once an interaction is received by the Collaborator.