After a few hours I figured this out. I posted the answer here on a related post. If there’s a better way, please let me know.