A Google Sheets add-on for Crossly, the multi-marketplace crossposting platform for resellers. Pull your inventory, listings, orders and sales into a spreadsheet, bulk-edit stock and prices in cells, and push the changes back to Crossly. Crossly then syncs them to every marketplace the item is live on (eBay, Poshmark, Mercari, Depop and the rest).
- Pull inventory, listings, orders or sales into their own tab. Pull walks every page.
- Bulk-edit: change
quantityAvailableon the Inventory tab orpriceon the Listings tab. The editable column has a yellow header. - Push sends only the rows you changed. Stock goes out in one batched call per 5,000 items, and each price is one call per listing. Afterwards the tab is pulled again, so it shows what Crossly now holds.
- Your token stays out of the spreadsheet. See Where your token is stored.
- Rate limits are respected. The add-on waits when the quota is spent and retries a
429afterRetry-After. See Rate limits.
You need Node 20+ and a Google account.
- Install clasp and log in:
If you have never used the Apps Script API, enable it once at https://script.google.com/home/usersettings.
npm install -g @google/clasp clasp login
- Get the code:
Or download
git clone https://github.com/crossly-dev/crossly-sheets.git cd crossly-sheetscrossly-sheets-<version>.zipfrom Releases and unzip it. Each zip carries a build-provenance attestation, so you can check it withgh attestation verify crossly-sheets-v0.1.0.zip -R crossly-dev/crossly-sheets. - Pick the Apps Script project to push into. You have two options:
- A new spreadsheet with its own bound script. clasp writes
.clasp.jsonfor you:clasp create --type sheets --title "Crossly" --rootDir .
- An existing spreadsheet. Open it, go to Extensions → Apps Script, copy the script ID from
Project Settings, then:
cp .clasp.json.example .clasp.json # then put your scriptId in it
- A new spreadsheet with its own bound script. clasp writes
- Push the code:
clasp push..claspignorelimits the push toappsscript.jsonandsrc/. - Reload the spreadsheet. The menu shows up under Extensions → Crossly. Bound scripts are listed there under the project's title, so name the project "Crossly".
- Run Extensions → Crossly → Set API token… and paste your token. The first run asks you to authorize the three scopes listed below.
In Crossly, open Settings → API & webhooks and create a Personal Access Token
(crossly_pat_…). Give it the scopes your workflow needs:
| You want to… | Scopes |
|---|---|
| Pull inventory / push stock | inventory:read, inventory:write |
| Pull listings / push prices | listings:read, listings:write |
| Pull orders | orders:read |
| Pull sales | sales:read |
| Command | What it does |
|---|---|
| Set API token… | Checks the token with GET /v1/me, then saves it to your UserProperties. A rejected token is not saved, and you see the API's error message. |
| Pull inventory | Writes every inventory item to Crossly Inventory. |
| Pull listings | Writes every listing to Crossly Listings. |
| Pull orders | Writes every order to Crossly Orders. |
| Pull sales | Writes every sale to Crossly Sales. |
| Push stock changes (Inventory) | Sends each edited quantityAvailable as the item's new available stock. |
| Push price changes (Listings) | Sends each edited price to the listing, which updates it everywhere it is live. |
| Clear API token | Removes the token from your Google account. |
Every column is a field name from the API response, so a header means exactly what the API reference says it means.
| Tab | Columns |
|---|---|
| Crossly Inventory | id, sku, defaultTitle, brand, size, condition, status, quantity, quantityAvailable, quantityReserved, quantitySold, originalPrice, costBasisCents, warehouseLocation, updatedAt |
| Crossly Listings | id, sku, title, price, currency, status, quantity, quantityAvailable, brand, size, condition, updatedAt |
| Crossly Orders | id, platform, platformOrderId, status, channel, salePrice, platformFee, sku, quantity, buyerUsername, trackingNumber, carrier, shippedAt, deliveredAt, createdAt |
| Crossly Sales | id, platform, platformOrderId, salePrice, platformFee, shippingCost, costOfGoods, netProfit, currency, detectedBy, detectedAt, orderId |
Each pull also writes the editable column to a hidden tab (_crossly_snapshot_inventory or
_crossly_snapshot_listings), keyed by id. On push, the add-on compares the visible tab with that
snapshot and sends only rows whose value changed. You can sort, filter or reorder the columns first,
because rows are matched by id and columns by their header.
- Stock must be a whole number of 0 or more. It is the available stock; reserved units on open orders are kept.
- A price must be a number above 0. It is rounded to cents, and
$and,are allowed. - An invalid cell is skipped and counted in the summary, and nothing is sent for that row.
- Don't rename the
idcolumn or the editable column's header.
The token goes into PropertiesService.getUserProperties(). That store belongs to your Google account
and this script, and nobody else who opens the spreadsheet can read it, collaborators included. The
token is never written to a cell, a note, a document property or a log. Clear API token deletes it.
Crossly counts requests per minute for each token. Reads get 1,200 a minute. Writes depend on your plan: Free 15, Starter 60, Pro 240, Business 1,000, Scale 2,000 (see Rate limits). Writes are the scarce bucket, so the add-on handles them like this:
- It batches stock: one
POST /v1/inventory/bulk-quantityfor up to 5,000 items. - After every response it reads
X-Quota-Remaining. When that reaches0, it waitsX-Quota-Resetseconds before the next call. - It retries a
429afterRetry-Afterseconds, up to 5 attempts. A429 retry_stormis not retried, because it means the same request keeps failing for a real reason. - It retries
502/503/504with exponential backoff. - Errors show the API's
error.message,error.codeandcorrelationId. Quote thecorrelationIdwhen you contact support.
An Apps Script run stops after 6 minutes. On the Free plan that is enough for about 80 price edits in one push, and the rows that didn't go out still differ from the snapshot. To finish, push again.
Every endpoint, parameter and field comes from the public OpenAPI spec
(https://crossly.net/openapi/seller.json). Base URL https://crossly.net/api, auth
Authorization: Bearer crossly_pat_….
| Menu command | Method | Path | operationId | Notes |
|---|---|---|---|---|
| Set API token… | GET |
/v1/me |
getMe |
Token check |
| Pull inventory | GET |
/v1/inventory?page=&limit=100 |
listInventory |
{ data, pagination } |
| Pull listings | GET |
/v1/listings?page=&limit=100 |
listListings |
Response has no total; the add-on stops at a short page |
| Pull orders | GET |
/v1/orders?page=&limit=100 |
listOrders |
Response has no total |
| Pull sales | GET |
/v1/sales?page=&limit=100 |
listSales |
Response has no total |
| Push stock changes | POST |
/v1/inventory/bulk-quantity |
createInventoryBulkQuantity |
{ mode: "set", items: [{ id, quantity }] }, 1–5,000 items |
| Push price changes | PATCH |
/v1/listings/{id} |
updateListing |
{ changes: { price } }, pushed to every platform where it's live |
There is no build step. Two plain script files run unchanged in Apps Script, where every file shares one global scope, and in Node:
src/core.jsholds the pure logic: URLs, pagination, row mapping, edit detection, batching, backoff decisions and error parsing. It never touches an Apps Script global, and it exports itself withmodule.exportswhenmoduleexists.src/main.jsis the Apps Script glue: menu, UrlFetchApp, PropertiesService and sheet I/O. It reads the Apps Script globals in exactly one function,crosslyEnv_().
The tests use only Node built-ins (node:test, node:assert, node:vm). test/harness.js loads both
files into a vm context with in-memory fakes of SpreadsheetApp, UrlFetchApp,
PropertiesService and Utilities, then drives the real menu functions from end to end.
npm install
npm run lint
npm test
npm run bundle # dist/crossly-sheets-<version>.zipEvery release on a v* tag runs these steps:
- Lint and test.
- Zip the clasp project.
- Attest the zip's build provenance with
actions/attest-build-provenance. - Attach the zip to a GitHub Release.
To have it also clasp push into a real Apps Script project, set the repository variable
CLASP_PUSH=true and add these secrets:
CLASPRC_JSON: the contents of~/.clasprc.jsonafterclasp login, for an account that can edit the script.SCRIPT_ID: the target script.
You can only publish through Google's consoles, and you do it once per listing:
- Google Cloud project. Create a standard GCP project. In Apps Script, go to Project Settings → Google Cloud Platform project and switch the script to that project's number.
- OAuth consent screen. Configure it as External, with the app name, support email, homepage,
privacy policy and terms URLs, and the three scopes from
appsscript.json:spreadsheets.currentonly(this spreadsheet only),script.external_request(callshttps://crossly.net/only, enforced byurlFetchWhitelist) andscript.container.ui(the menu and dialogs).spreadsheets.currentonlyis a non-sensitive scope. Google may still review the app before it goes public, so expect brand verification and possibly a scope justification video. - Versioned deployment. In the Apps Script editor, go to Deploy → New deployment →
Add-on (or
clasp deploy) and note the version number. - Marketplace SDK. Enable the Google Workspace Marketplace SDK in the GCP project. Under App configuration, choose Sheets add-on, enter the script ID and deployment version, and list the same OAuth scopes. Under Store listing, add the name, descriptions, icons, screenshots, category, and the support, privacy and terms links.
- Test. Before you submit, use Test deployments in the Apps Script editor to install the add-on on a test spreadsheet.
- Submit. Choose Public or Private (your Workspace domain only) visibility and submit for review. A private listing within one Workspace domain skips the public review.
The add-on is an editor add-on. It uses onOpen / onInstall with createAddonMenu(), not
Workspace add-on cards, so appsscript.json has no addOns section on purpose. Adding one would turn
the project into a card-based Workspace add-on, which needs a homepage trigger and card UI.
- Crossly API docs
@crossly/sdk: the TypeScript SDK- crossly-recipes: ready-to-import automations