@Cyril THIVIN this is very simple zap.
You need these steps in place.
- Trigger (New Order in Email).
- Parse the order (get the details from the order like - name, email, order id etc.) a simple code in python can help you with this ( you can use Chatgpt as well), you can use formatter steps as well in place to extract data from your email.
- Action: Create an order in Shopify.
If you can share a sample email of your order, I can give your more apporipriate answer
Hello,
Thanks for your answer. This is precisely what I am trying to do :)
Please find example of an email order I receive from a marketplace.
@Cyril THIVIN can you share it in a pdf format
Thanks @Cyril THIVIN you can start working on the zap now - and you can use this code
use the code below ( you can use a Code by Zapier step after your triger step and use Pyhon code module)
******Here is code*******
email = input_datat“email”]
# Extract order details
order_number = re.search(r"N° de commande : (\d+-A)", email).group(1)
buyer_name = re.search(r"Nom de l'acheteur : (e\w\s]+)", email).group(1)
order_date = re.search(r"Date de la commande : (\d{2}/\d{2}/\d{4})", email).group(1)
product_name = re.search(r"Nom de l'article : (c\w\s\-]+)", email).group(1)
product_condition = re.search(r"Etat de l'article : (\w+)", email).group(1)
product_price = re.search(r"Prix de l'article : (c\d,]+ €)", email).group(1)
quantity = re.search(r"Quantité : (\d+)", email).group(1)
internal_ref = re.search(r"Référence interne : (\w+)", email).group(1)
# Extract shipping details
address = re.search(r"The delivery address recorded for this order is:(s\w\s\d\.,'-]+)FRANCE", email).group(1). strip()
shipping_mode = re.search(r"Delivery method chosen by the buyer: (\w+ \(\w+\))", email).group(1) ship_by_date = re.search(r"the order
must be shipped before (\d{2}/\d{2}/\d{4})", email).group(1)
# Extract order tracking link
tracking_link = re.search(r"the evolution of this order at the following address: (g\w:/.-]+)", email).group(1).strip()
# Outputs
print(order_number, buyer_name, order_date, product_name, product_condition, product_price, quantity, internal_ref, address, shipping_mode, ship_by_date, tracking_link)
Hi there @Cyril THIVIN!
Were you able to get this solved using a Python Code action as @communitymember suggested?
Want to make sure you’re all set so do let us know if you’re still running into issues here!