Skip to content

Weekly

Get last week's orders as a CSV

Every Monday you get all of last week's orders in one file, with customer, total and status.

Runs
Weekly
Apps
Shopify
AI
Not needed
Access
read_orders

Send this to your assistant

Create a ClickRuntime automation: every Monday at 8am, email me all Shopify orders from last week as a CSV with the order number, customer, total and status.

Paste it into your assistant. It tells you what it will send or change before it runs live.

First time? Adding ClickRuntime to your assistant takes about two minutes.

Why use it

Why teams use this automation

A bookkeeper closing the week, a warehouse planning Monday's pick lists, or an agency reconciling a client's store all ask the same thing: send me last week's orders. In Shopify that means opening Orders, setting a date range, exporting, waiting for the file and attaching it to an email. It takes ten minutes, and it only happens when someone remembers. When the owner is traveling, the request sits until Wednesday and the numbers get chased.

Once a week, ClickRuntime pages through every order created in the previous seven days, builds a CSV with order number, customer, total, financial status and fulfillment status, and emails it to the people who need it. Because it reads the date range through the Shopify API, it does not stop at the first page of results, so a busy week is complete rather than truncated.

It suits stores that hand data to someone outside the admin, such as an outside accountant or a 3PL, and do not want to hand out staff logins.

What you get out of it

  • Accountants stop waiting on you

    Your bookkeeper gets the same file at the same time every week, so month-end reconciliation starts from complete data instead of a chase email and a half-finished export from a Thursday afternoon.

  • Staff logins stay private

    An outside accountant or fulfillment partner can work from the emailed CSV and never needs a Shopify staff account, which means one less set of permissions to grant, review and later remember to revoke.

  • Busy weeks are not cut short

    Manual exports get abandoned halfway or filtered wrongly. Paging through the full date range each time means a week with 900 orders produces 900 rows, and totals tie out against payouts.

  • Every week leaves a dated file

    The emails pile up in a mailbox as a searchable archive. Months later, when a customer disputes a charge or a tax authority asks questions, you find the right week in seconds.

  • Ten minutes back each Monday

    Logging in, filtering, exporting and attaching is small work that never disappears. Handing it off returns roughly forty minutes a month to whoever used to do it, and removes a forgotten-export failure mode.

How it works

What happens, step by step

  1. Every Monday, ClickRuntime collects all of last week's Shopify orders, however many there are.

  2. It builds a CSV file with each order's number, date, customer, total, payment and fulfillment status.

  3. The file is emailed to you, with the date range and order count in the subject line.

Before it runs live

  • Connect Shopify

What you get

RunsWeekly
Get last week's orders as a CSVtoday, 9:00Succeeded
Email · Shopify orders 2026-10-12 to 2026-10-18: 86Order,Date,Customer,Total,Payment,Fulfillment #1042,2026-10-12,Dana Ruiz,84.00,PAID,FULFILLED

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • Your own rules

    Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.

  • Any number of apps

    One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.

  • AI where it helps

    Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.

  • On a schedule or on each event

    Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.

Changes you can ask for

  • Run it at a different time, more or less often, or only on weekdays
  • Add an AI step, for example to summarize, sort or draft a reply
  • Add another app, for example also send it to Slack
  • Combine it with other Shopify steps into one automation

Under the hood

The code that runs this automation

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
export_orders.pyexample
import csv, io
from datetime import date, timedelta
from clickruntime import on_trigger, credentials, http, notify

STORE = "your-store.myshopify.com"

def gql(query, variables=None):
    resp = http.post(f"https://{STORE}/admin/api/2025-07/graphql.json",
                     headers={"X-Shopify-Access-Token": credentials.connection("shopify", "store")},
                     json={"query": query, "variables": variables or {}})
    resp.raise_for_status()
    return resp.json()["data"]

QUERY = """query($q: String!, $after: String) { orders(first: 100, query: $q, after: $after) {
  pageInfo { hasNextPage endCursor }
  nodes { name createdAt displayFinancialStatus displayFulfillmentStatus
          customer { displayName } totalPriceSet { shopMoney { amount currencyCode } } } } }"""

@on_trigger
def run(event):
    start = date.today() - timedelta(days=7)
    rows, after = [], None
    while True:
        page = gql(QUERY, {"q": f"created_at:>={start} created_at:<{date.today()}", "after": after})["orders"]
        rows += [[o["name"], o["createdAt"][:10], (o["customer"] or {}).get("displayName", ""),
                  o["totalPriceSet"]["shopMoney"]["amount"], o["displayFinancialStatus"], o["displayFulfillmentStatus"]]
                 for o in page["nodes"]]
        if not page["pageInfo"]["hasNextPage"]:
            break
        after = page["pageInfo"]["endCursor"]
    out = io.StringIO()
    csv.writer(out).writerows([["Order", "Date", "Customer", "Total", "Payment", "Fulfillment"]] + rows)
    notify.email_me(f"Shopify orders {start} to {date.today() - timedelta(days=1)}: {len(rows)}", out.getvalue())
    return {"orders": len(rows)}

FAQ

Common questions

Which order fields end up in the CSV?
Each row carries the order number, creation date, customer name and email, order total, financial status such as paid or refunded, and fulfillment status. If your accountant also wants shipping country, discount codes or tags, say so when you set it up and those columns are added.
Does it include draft or cancelled orders?
Orders are read from the Shopify orders endpoint for the date range, and cancelled orders appear with their cancelled status so refunds and voids can be reconciled. Draft orders that were never completed are not real orders in Shopify, so they are not part of the export.
Can I send the file to more than one person?
Yes. List as many recipients as you like, for example your accountant and a business partner. Everyone gets the same attachment from the same run, so nobody is working from a different week or a differently filtered export.
What permissions does it need?
read_orders. Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's AI allowance.
How many runs does it use?
One run each time it runs (weekly). Checks that find nothing to do and stop right away aren't counted.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

Set up “Get last week's orders as a CSV” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.