Skip to main content
This guide walks you through creating workflows in Shopify Flow using Supercycle triggers and actions. You’ll learn how to build common automations and understand the workflow structure.

Getting started

1

Open Shopify Flow

Navigate to Shopify Flow in your Shopify admin and click Create workflow.
2

Choose a trigger

Search for Supercycle to see available triggers:
  • Return created
  • Return updated
  • Dunning payment failed
3

Add conditions and actions

Build your workflow logic using conditions, loops, and actions to respond to the trigger event.
4

Test and enable

Test your workflow with sample data, then enable it to start automating.

Example workflows

Pause subscription on return

Automatically pause a customer’s subscription when they start a return.

Pausing subscriptions when returns are created

1

Add trigger

Select Return created as your trigger.
2

Add a loop

Add a For each loop and set it to returnOrder.rentals.
This processes each rental in the return individually.
3

Add a condition

Add a Condition to check if the rental has a subscription:
rentals.foreachitem.subscriptionId is not empty and exists
4

Add the action

In the Then branch, add Update subscription:
  • Subscription ID: {{rentals.foreachitem.subscriptionId}}
  • Status: paused
5

Enable the workflow

Save and enable. Subscriptions will now pause automatically when returns are created.

Send notification on failed payment

Notify your team when subscription payments fail multiple times.
1

Add trigger

Select Dunning payment failed as your trigger.
2

Add a condition

Check if this is the third failed attempt:
dunning.failedPaymentCount is greater than or equal to 3
3

Add notification action

In the Then branch, add Send internal email:
  • To: Your support team email
  • Subject: Urgent: Customer payment failed 3+ times
  • Body: Include customer details and dunning information
4

Optional: Cancel subscription

Add another action to Update subscription:
  • Subscription ID: Extract from dunning.subscriptionContractId
  • Status: cancelled
5

Enable the workflow

Save and enable. Your team will be notified of payment issues automatically.

FAQs

Yes. Returns can contain multiple rentals, so always use a For each loop when processing returnOrder.rentals to ensure each rental is handled individually.
No. Some rentals won’t have subscriptions, so you should always check whether subscriptionId exists before using it in any actions.
Use Shopify Flow’s test feature with sample data to confirm your logic works as expected before enabling it in production.
Use clear, descriptive names (for example, “Pause subscription on return”) so workflows are easy to find and manage later.
Regularly monitor the Flow dashboard to confirm successful runs and catch or debug any errors early.