hi there, welcome.
this is specific to mailchimp, but might show some approaches that could be a useful starting point: