I got this to work in the end. If anyone is interested and would like to do something similar I’d be happy to share.