Automatisierung

External webhook in Shopify Flow for tagging customers

Externe Webhook in Shopify Flow zum Taggen von Kunden

Today we want to show you how to add a tag to a customer in Shopify using an external webhook.

You need our Shopify App Flow Webhooks and the official Shopify Flow App .

The first step requires a webhook. We've opted for static authentication here (a token in the X-Api-Key header). We've entered the email and tag in the mapping so that the external call is visible.

To match this webhook, we have created a flow in Shopify Flow:

This flow consists of the following steps:

  • Webhook triggers
  • Condition that WebhookId matches the ID of the webhook (here cmaiow2uc000145423ail4ejh )
  • Search for the customer via a query (here {{fieldOne}} , is mapped to email via our webhook)
  • A For each loop over all results (there should always be only one customer here, as this customer can be clearly identified via the email)
  • Action "Add customer tags" with {{fieldTwo}} (mapped to tag via our webhook)

If everything is correct, give the flow a comprehensible name and activate it.

Now copy the curl command from your webhook and execute it. In our case, it looks like this:

If everything went well, you should now see a successful execution in Shopify Flow.

For us it looks like this:

At the very end, you can check whether the new tag has been added to the customer.

As you can see, you can build very powerful automation with relatively simple means.

We hope you enjoyed this post. If you have any questions, please feel free to comment.

Reading next

Leave a comment

All comments are moderated before being published.

This site is protected by hCaptcha and the hCaptcha Privacy Policy and Terms of Service apply.