Loading…
Loading…
about 20 minutes of your workNo experience assumed: the guide starts at "install Python".
Using an AI assistant? Let it do the busywork.
Claude Code, Cursor, Copilot: paste this prompt and your own AI handles the installing, checking and scheduling, on your machine. You keep the key steps.
The prompt forbids your assistant from asking for keys in chat, and from ever touching the push side: you create credentials yourself, and changes always need your typed YES.
Unzip the toolkit into a folder you can find back, for example in your Documents. Inside you will find two folders that do very different things.
Fetching data can never accidentally change your store. That is why pull and push are separate, each with its own API key.
The toolkit runs on Python, a free program. Get it at python.org, version 3.9 or newer.
On Windows, do not skip the Add python.exe to PATH checkbox in the installer. Without it your terminal will not know what python means.
On Mac and Linux the commands are pip3 and python3. On Windows they are pip and python. This guide shows both where they differ.
You will type the commands in a terminal, and it matters which folder that terminal is standing in. Here is the trick for each system.
A one-time install. Open a terminal in the pull folder and run the command below. Then do the same in the push folder.
In the pull folder, then again in the push folder
pip install -r requirements.txtYou create two separate apps in the Shopify Dev Dashboard: a read app for pull and a write app for push. First the pull app. Note that the app and your store must be in the same Shopify organization.
Choose permissions with the visual picker, never by pasting a list of scope names. One wrong name makes Shopify reject the whole list.
Tick read_all_orders too if you want order history older than 60 days. Without it Shopify silently limits orders to the last 60 days.
Repeat the same steps for the push app (for example your-store-push). This time also tick WRITE permissions.
Release first, then install. An installed app only has the permissions of its released version.
Key lost or leaked? Go to the app's Settings and generate a new secret, then update your .env file. Want to stop everything at once? Uninstall the app from your store; the other app keeps working.
Open the pull folder. Copy the file .env.example and name the copy exactly .env, in the same folder. Open .env with Notepad (Windows) or TextEdit (Mac), fill in your .myshopify.com address plus the Client ID and Client secret of your PULL app, and save. Then do the same in the push folder, with the keys of your PUSH app.
Common trap: filling in your normal web address as the store domain. The scripts need the address that ends in .myshopify.com. You find it in Shopify admin -> Settings -> Domains.
Never share the .env file with anyone and never email it.
Time for the first real test. In a terminal in the pull folder, run verify_auth. A good result starts with OK | credentials valid and shows your shop name, domain, plan and the number of granted scopes. Then run the same command in the push folder. A good result there starts with OK | credentials valid | WRITE scope confirmed, with an OK line per capability group.
In the pull folder, then again in the push folder
python verify_auth.pyThe most likely failure is FAILED | token exchange returned HTTP 401. That means a wrong Client ID or secret, or the app is not installed on your store. Re-copy the keys from the Dev Dashboard and check the app is installed.
On the push side, capabilities marked MISSING just mean you have not granted that scope. That is fine if you do not plan to use them.
In a terminal in the pull folder, start with the smoke run: a mini test (2 rows per list) to see that everything works. Then run the full pull. The full run takes a few minutes and ends with a line like Done. 47 CSVs written, 0 fail/empty.
Mini test run first
python pull_shopify_admin.py --smokeThen the full pull
python pull_shopify_admin.pyRate-limit waits are normal. The script waits and retries by itself, so a run that pauses now and then is healthy, not stuck.
The pull side is safe to run on a schedule, because it can only read. On Windows you use Task Scheduler, on Mac and Linux you use cron.
Only ever automate the PULL script. Never automate push: a change to your live store always deserves human eyes, and the YES question blocks schedulers on purpose.
Where your CSVs land. Every run writes dated CSV files into the output folder inside the pull folder, right next to the pull script. One file per dimension per run, never overwritten, and every row carries its snapshot date, so files from different days stack cleanly. Open them in Excel or any spreadsheet tool.
Stuck on any step? Mail us at support@toqool.com and a founder answers.