Back in Stock trigger with Flow

Hello everyone,

I’m currently using Shopify Flow to send back-in-stock emails to customers and everything works correctly with my current setup, but I’m trying to understand if it’s possible to achieve the same result using Shopify Messaging / Shopify Email templates instead.

Here is how my current workflow works:

  1. When a customer requests a back-in-stock notification, I add a tag to the customer that identifies the product (I do this via Flow Webhooks).

  2. When the product becomes available again, I trigger the workflow using Product variant inventory quantity changed.

  3. Then I retrieve the customer information using Get customer data based on the tag.

  4. Finally, I send the email using Send HTTP Request with the SendGrid API, passing dynamic variables (product title, customer email, etc.).

This solution works perfectly.

However, I noticed that it should also be possible to send emails using Shopify Messaging / Shopify Email, so I tried creating a custom email template with code, inserting the same variables that I use in the HTTP request.

The problem is that in this case the email is sent but the dynamic fields are empty, so the variables are not populated.

My questions are:

  • Am I doing something wrong in the template?

  • Is it actually possible to pass variables from Shopify Flow to Messaging / Shopify Email templates?

  • If not, why is there a “Back in stock alert” automation suggested inside Messaging?

I’m trying to understand whether Shopify Messaging supports dynamic variables coming from Flow, or if this is simply not supported.

Thanks in advance for any clarification!

Messaging uses Flow as it’s engine so I’m not sure what the question is. Pretty sure there is already a back in stock email template.

Hey,

I would check what you’ve got setup against the Shopify template, it might be that your templating just has a typo or something :slight_smile:

This should open the template for you

https://admin.shopify.com/apps/flow/editor/templates/01952674-1f11-7ece-916a-568cf9626c09?search=back+in+stock&sort=best_match