Skip to main content

Zapier Integration

This guide shows how to set up a Zapier automation that automatically generates a pattern PDF when a new order arrives in your store.

Example workflow

Trigger: New WooCommerce order Action: Generate pattern PDF with PixCraft API Action: Email PDF to the customer

Step 1: Create a new Zap

  1. Log in to zapier.com
  2. Click Create Zap
  3. Choose your trigger app (WooCommerce, Shopify, or any app that provides orders)

Step 2: Configure the trigger

For WooCommerce:
  • App: WooCommerce
  • Event: New Order
  • Account: Connect your WooCommerce store
  • Test: Fetch a sample order to use in the next steps

Step 3: Add PixCraft API action

  1. Click + to add a new step
  2. Choose Webhooks by Zapier
  3. Select Custom Request
  4. Configure:

Request body

Replace {{order_item_image_url}} with the actual Zapier field from your trigger.

Step 4: Generate PDF (optional)

Add another Webhooks step: The response will be a PDF binary. You can:
  • Save it to Google Drive or Dropbox
  • Attach it to an email

Step 5: Email the result

Add a final step:
  1. Choose Gmail or Email by Zapier
  2. Set the recipient to the customer’s email from the order
  3. Include pattern details from Step 3 in the email body:

Alternative: Use Code by Zapier

For more control, use the Code by Zapier action (JavaScript):

Tips

  • Check usage before processing: Call GET /api/v1/usage at the start of your Zap to verify you have credits remaining
  • Validate first: Use POST /api/v1/validate to check image quality before spending a generation credit
  • Handle errors: Add a Zapier Paths step to handle API errors gracefully (send a notification instead of failing silently)