How to create an Automation

Question:
I only sell one product, and I want to create an automation that sends customers who’ve purchased more than 5 times, an email with a coupon code for their next purchase?

Product:
Wix Editor

What are you trying to achieve:
I want to send repeat customers a coupon.

What have you already tried:
I tried to set up the automation but I wasn’t able to, additionally, I read the community forum but couldn’t find the answer.

Additional information:
N/A