Skip to main content

How to receive your output automatically with webhooks

Receive your transformed files automatically — no manual download needed. Here's how to configure a webhook and verify deliveries.

Written by Stéphane Jauffret
Updated over 2 weeks ago

Once a transformation is complete, you need the output file. You could log into WeTransform and download it manually — or you could configure a webhook and have it delivered directly to your system the moment it's ready.

Webhooks are the backbone of any automated WeTransform workflow.

⚡ What is a webhook?

A webhook is an HTTP request that WeTransform sends to a URL you provide, as soon as a transformation is complete. The payload contains a direct download link to your transformed file.

Think of it as a reverse API: instead of your system asking "is it done yet?", WeTransform calls your system and says "here it is".

🔁 The webhook fires on every transformation — whether triggered manually, by a schedule, or via API. Configure it once and it works for every run.

📦 What the webhook sends

When your transformation is complete, WeTransform sends a POST request to your URL with this payload:

{
  "event": "file:ready-for-download",
  "download_url": "https://wetransform.com/download/...",
  "customer_id": "65bd6fc9...",
  "customer_email": "[email protected]",
  "template": "products_sync"
}

Your system receives this, verifies the signature, and downloads the file from download_url — fully automated.

⚙️ How to set up a webhook

  1. Go to Integrations → Webhooks in your WeTransform account

  2. Click "Create a Webhook"

  3. Enter your Callback URL — the endpoint on your server that will receive the POST request

  4. Set a Secret Key — used to sign the payload so you can verify it's genuinely from WeTransform

  5. Select the event: file:ready-for-download

  6. Use the Test Trigger to send a sample payload and confirm your endpoint responds with a 2XX status

🔒 Verifying the webhook signature

Every webhook request includes an X-Signature header. Always verify it before processing — this prevents unauthorized requests from reaching your system.

// PHP example
$secret = 'your_secret_key';
$body = file_get_contents('php://input');
$signature = $_SERVER['HTTP_X_SIGNATURE'];
$expected = hash_hmac('sha256', $body, $secret);if (hash_equals($expected, $signature)) {
    // Valid — process the file
}

For examples in other languages (Python, JavaScript, Go, etc.), see the full webhook documentation.

🔍 Debugging with webhook logs

WeTransform logs every delivery attempt — what was sent, what your server responded, and how long it took. If a delivery fails (404, 500, timeout), you can see the full HTTP exchange and replay the event with one click.

Access logs at Integrations → Webhook logs.

⚠️ Your endpoint must respond with a 2XX status within a few seconds. If it times out or returns an error, WeTransform will retry — check your logs if deliveries seem to be failing silently.

👉 What to do next

Did this answer your question?