Shippo — Auto-Create Shipping Labels

Automatically generate shipping labels in Shippo the moment an order is fulfilled in your store.

Prerequisites

  1. A Shippo account (free plan works)
  2. A Shippo API key
  3. At least one carrier account connected in Shippo (USPS, UPS, FedEx, DHL, etc.)

Get your Shippo API key

  1. Log into Shippo → Settings → API
  2. Copy your API Token (starts with shippo_test_ or shippo_live_)
Warning

Use your live API token (shippo_live_) for production stores. Test tokens create test shipments that aren't submitted to carriers.

Connect Shippo

  1. Go to Settings → Integrations → Shippo
  2. Paste your API token
  3. Click Save & Test

Available Shippo actions

Create Shipment

Creates a shipment object in Shippo with address and parcel details. This is typically followed by Create Label to get the actual shipping label.

Recommended trigger: order.fulfilled or fulfillment.created

Address mappings (from shipping_address):

Shippo fieldEvent field
address_to.nameorder.shipping_address.first_name + " " + order.shipping_address.last_name
address_to.street1order.shipping_address.address_1
address_to.cityorder.shipping_address.city
address_to.stateorder.shipping_address.province
address_to.ziporder.shipping_address.postal_code
address_to.countryorder.shipping_address.country_code
address_to.phoneorder.shipping_address.phone

From address — configure your warehouse address as a fixed value in the action configuration.

Create Label

Purchases and generates a shipping label from a shipment. Returns a label URL and tracking number.

Recommended trigger: use after Create Shipment, or directly on fulfillment.created if parcel dimensions are consistent.

Common configuration:

FieldValue
carrier_accountYour Shippo carrier account ID (find in Shippo → Carriers)
servicelevel_tokene.g. usps_priority, ups_ground, fedex_ground
label_file_type"PDF" or "PNG"

Example workflow: fulfillment → Shippo label

This is the most common pattern for stores with consistent parcel sizes.

order.fulfilled
  └─ Shippo: Create Shipment (from address, to address, parcel weight/dimensions)
  └─ Shippo: Create Label (carrier, service level)

Step-by-step

  1. Create a new workflow: "Auto Shippo Label"
  2. Add trigger: order.fulfilled
  3. Add action: Shippo → Create Shipment
    • Set address_from to your warehouse address (fixed values)
    • Map address_to fields from order.shipping_address
    • Set parcels[0].weight, parcels[0].length, parcels[0].width, parcels[0].height — use fixed values or map from order metadata
  4. Add action: Shippo → Create Label
    • Set carrier_account to your Shippo carrier account ID
    • Set servicelevel_token to your preferred service level
  5. Save and Activate

Variable parcel sizes

If your orders have different parcel sizes, you can store parcel dimensions in Medusa product metadata and map them in the workflow. For example:

order.items[0].variant.metadata.weight
order.items[0].variant.metadata.length

Tracking numbers

When a Shippo label is created, the response includes:

  • tracking_number — the carrier tracking number
  • tracking_url_provider — direct tracking URL
  • label_url — PDF/PNG label download URL

You can use these in a follow-up action (e.g. SendGrid email) to send the customer a tracking link automatically.

Checking label creation

  1. Go to Integrations → Execution History
  2. Find the execution for order.fulfilled
  3. Click to expand — you'll see the Shippo response including label URL and tracking number

You can also verify labels were created in Shippo → Shipments.

Common issues

IssueSolution
Invalid addressEnsure country_code is in ISO 2-letter format (e.g. US, not United States)
No carrier accountsAdd a carrier in Shippo → Carriers → Connect new carrier
Test vs live tokenMake sure you're using shippo_live_ in production
Parcel dimensions requiredShippo requires weight at minimum; length/width/height for some carriers

Next steps