I've been trying to work out how to set up an automation that will send a follow-up email when purchasers buy from a specific collection. Apparently, the default automations module in Shopify only allows you to do these automations with the "Order" and "Shop" endpoints:
While Shopify's default automation module might not directly support Collection-based triggers, there are still ways to accomplish what you need by leveraging other tools and Shopify's API.
One approach to consider is using Shopify webhooks. Shopify webhooks allow you to listen to specific events (like an order being created) and then perform an action in response (like sending an email). Here's a high-level overview of how this might work:
Set up a Shopify webhook for the orders/create event. This will trigger every time an order is created in your store.
When your webhook receives an order, check the line items of the order to see which products were purchased.
Use the Shopify API to fetch information about the collections those products belong to. You can use the collections endpoint you mentioned, or you might find it simpler to use the products endpoint and look at the collection_ids field of each product.
If a product belongs to the specific collection you're interested in, send a follow-up email using your preferred method (e.g., an email service provider, or a server-side script if you're comfortable with coding).
Alternatively, you could look into using a third-party app like Klaviyo or Mailchimp, which offer more advanced email automation features. These apps allow you to segment your customers based on what they've purchased, and could potentially let you target customers who have bought from a specific collection.