Skip to main content

Here's the goal:
For each order placed and paid by a customer in Shopify, I need to export this order into a single txt file and send it automatically to an email adresse (to our 3PL).

This txt file needs to be formatted as follow:

header|536375|2024-04-21|name
detail|ZIS01430|2|UN
detail|ZIS01429|2|UN
detail|ZIS68416|2|UN
detail|ZIS68417|2|UN
detail|SW528|4|UN
detail|ST81102|6|UN

The first line is the header of the file. After the first pipe, it's the order number. After the second pipe, it's the order date, and after the third pipe it's the customer name.
Then, all the following lines that start with detail are the line items from the order. There's one product per line. After the first pipe it's the SKU number. After the second pipe it's the quantity ordered. After the third pipe it's the unit.

How can I get the data from Shopify and export it to a txt file with the desired format?

My current setup is:

Trigger: Shopify New Paid Order
+
Action: Code by Zappier → this is where I’m stuck…

Thanks all!

Hi there @lemike,

Welcome to the Community! 🎉

Have you tried using the Google Docs “Create Document from Text” action? This action creates .txt files.

https://zapier.com/apps/google-docs/integrations

8d0c31fb11567168812f62672c888319.png
(view larger)

Hopefully, this helps!