Trouble Creating Shopify Customers from Thrivecart Webhook — Data Arrives, but No Customer Created

Hi everyone,
I’ve set up a Pipedream workflow that triggers from a Thrivecart order.success webhook and is supposed to create a new customer in Shopify using the Admin API.

Here’s what’s working:

  • The Thrivecart webhook is firing correctly (I see event: order.success in the logs).
  • The customer data (name, email, product) is arriving at Pipedream as expected.
  • I’m using axios.post to https://yourcolourcompass.myshopify.com/admin/api/2024-04/customers.json with the correct private app token.
  • The workflow ends with return response.data and $respond({ status: 200 }).

But here’s the issue:
No customer is created in Shopify, even though the workflow shows as “Succeeded.” There’s no error thrown by axios, and the payload looks clean.

What I’ve checked:

  • The API token has customers: write permission.
  • I’m using a fresh, unused email for testing to avoid duplication issues.
  • The payload is minimal: { customer: { first_name, last_name, email, tags } }.
  • I added logging before and after the axios call, but still no error or warning.

Any ideas on what could silently block Shopify from creating the customer? Could it be the format of the request or something Shopify-specific that I’ve missed?

Happy to share the full code if helpful. I’d also be open to hiring someone for a quick debug/fix.

Thanks in advance!

— Raquel

Hi @raquelrojo,

Hi Raquel,

Based on your description, the workflow is running without errors, but Shopify isn’t creating the customer. This is a common frustration—let’s walk through the likely causes and how to debug them, especially in the context of Pipedream and Shopify’s Admin API.


1. Check Shopify API Response Carefully

Even if axios doesn’t throw, Shopify may return a 200/201 with an error in the response body (e.g., validation errors). Shopify often returns errors in the response JSON under an errors key, even with a 200 status.

Action:
Log and inspect the entire response body, not just response.data. Look for an errors property.

import { axios } from "@pipedream/platform";

export default defineComponent({
  props: {
    shopify: {
      type: "app",
      app: "shopify",
    },
    customer: {
      type: "object",
      label: "Customer Data",
      description: "Customer object to send to Shopify",
    },
  },
  async run({ steps, $ }) {
    const url = `https://${this.shopify.$auth.shop_id}.myshopify.com/admin/api/2024-04/customers.json`;
    const payload = { customer: this.customer };

    const response = await axios($, {
      method: "post",
      url,
      headers: {
        "X-Shopify-Access-Token": this.shopify.$auth.oauth_access_token,
        "Content-Type": "application/json",
      },
      data: payload,
      returnFullResponse: true, // Get status, headers, etc.
    });

    // Log everything for debugging
    $.export("shopify_response", response);

    // Check for errors in the response body
    if (response.data && response.data.errors) {
      throw new Error(`Shopify API error: ${JSON.stringify(response.data.errors)}`);
    }

    return response.data;
  },
});

2. Payload Format

Shopify is strict about payload shape. For /customers.json, the payload must be:

{
  "customer": {
    "first_name": "John",
    "last_name": "Doe",
    "email": "john@example.com",
    "tags": "tag1, tag2"
  }
}
  • Tags should be a comma-separated string, not an array.
  • Remove any undefined/null fields from the payload.

3. API Permissions & Endpoint

  • Make sure you’re using the correct API token (private app or custom app) and that it’s for the right store.
  • Double-check the endpoint:
    https://yourcolourcompass.myshopify.com/admin/api/2024-04/customers.json
  • Use the token in the X-Shopify-Access-Token header (not as a Bearer token).

4. Other Shopify Requirements

  • Email: Must be unique and valid.
  • Password: Not required for customer creation via API.
  • Account Activation: By default, customers are created as “disabled” unless you set "send_email_invite": true (optional).

5. Debugging Tips

  • Try sending the same payload via Shopify API Console or Postman to see if you get a more descriptive error.
  • Add more logging in Pipedream: log the request payload, response status, and full response body.

6. Hiring Help

If you’d like direct assistance, you can contact Pipedream support or post on their community for more hands-on debugging.


Summary Checklist

  • Log and inspect the full Shopify API response for errors.
  • Double-check payload shape and content.
  • Confirm token permissions and correct endpoint.
  • Try the request outside Pipedream for comparison.
  • ] Contact [Pipedream support if you need more help or want to hire someone.

If you share your exact code and a sample payload (with sensitive info redacted), I can help review it line by line!

Let me know how it goes or if you want to dig deeper.

I’m a bot powered by Pipedream and GPT-4. I’m still learning, so please double-check my answers and code! Learn how to build your own.