Automating Gift Cards with Shopify Flow
Expresso Gift Cards works with Shopify Flow, Shopify's free automation app. Use it to issue gift cards automatically when something happens in your store, or to start your own automations whenever Expresso creates gift cards.
| Type | Name | What it does |
|---|---|---|
| Action | Issue gift card | Creates a gift card for a customer and emails it to them |
| Trigger | Gift card issued | Runs for each gift card an import creates for a customer |
| Trigger | Gift card batch completed | Runs once when an import finishes |
Before You Start
- Install Shopify Flow from the Shopify App Store if you haven't already. It's free.
- Make sure Expresso Gift Cards has an active plan. The Issue gift card action needs one.
There's nothing to set up in Expresso. The action and triggers appear in Shopify Flow automatically.
Issue Gift Cards Automatically
Use the Issue gift card action to create a gift card for a customer from any workflow, for example when a customer is tagged VIP or places a large order.
- In your Shopify admin, open Flow and click Create workflow.
- Choose a trigger, for example Customer tags added or Order created.
- Optional: add a condition, for example "customer tags include VIP" or "order total is at least 500".
- Add an action, search for Issue gift card, and select it. It's listed under Expresso Gift Cards.
- Fill in the fields:
- Customer — the customer who receives the gift card, from your trigger (for example, the customer who placed the order)
- Amount — the gift card value in your store's currency, for example
25or25.50 - Message to the customer (optional) — shown in the gift card email
- Expires after (days) (optional) — a whole number from 1 to 3650, counted from the day the workflow runs in your store's timezone. Leave it empty for a gift card that doesn't expire.
- Don't email the customer (optional) — creates the gift card without Shopify's gift card email. The gift card is still linked to the customer.
- Internal note (optional) — visible only to staff in your Shopify admin. If you leave it empty, the note says "Issued by Shopify Flow (Expresso Gift Cards)".
- Click Turn on workflow.
Gift cards issued by Flow appear in your Shopify admin under Products > Gift cards. They aren't listed in Expresso's History tab, which shows your imports.
Later steps in the same workflow can use the new gift card's details: its ID, last four characters, amount, currency, expiry date, and whether the email was sent.
Good to know: if Shopify Flow retries a step, Expresso won't create a second gift card. Each workflow run issues at most one gift card.
Start Workflows from Your Imports
Expresso also sends two triggers you can start workflows from. Both run for imports you create in the app, including scheduled imports.
Gift card issued
Runs once for each gift card an import creates for a customer. Gift cards that aren't linked to a customer don't run this trigger, and neither do gift cards created by the Issue gift card action.
Your workflow can use:
- The customer who received the gift card, including their email, tags and other customer details
- Gift card ID, Last characters (the last four characters of the code), Amount and Currency
- Message (empty if there isn't one)
- Expires on (
YYYY-MM-DD, empty if the gift card doesn't expire) - Import ID
Gift card batch completed
Runs once when an import finishes.
Your workflow can use:
- Gift cards requested, Gift cards created and Gift cards failed
- Total value and Currency of the gift cards created
- Status —
success,partialorfailed - Scheduled — true when the import ran from a schedule
- Emails sent — true when recipients were emailed their gift cards
- Import ID
A trigger starts running once your workflow is turned on. Imports that finished before then don't run it.
Example Workflows
- Reward VIP customers: Customer tags added → condition: tags include
VIP→ Issue gift card ($25, message "Thanks for being a VIP!") - Thank big spenders: Order created → condition: order total is at least $500 → Issue gift card ($20, expires after 90 days)
- Tag gift card recipients: Gift card issued → Add customer tags (
gift-card-recipient) - Get alerted about failed gift cards: Gift card batch completed → condition: Status is not
success→ Send internal email with the number of failed gift cards and the Import ID
Troubleshooting
To see what happened in a workflow, open it in Shopify Flow and check Recent runs. If the Issue gift card step fails, the run shows the reason:
- "Expresso Gift Cards needs an active plan to issue gift cards." Open Expresso Gift Cards in your Shopify admin and choose a plan, then run the workflow again.
- "Expresso Gift Cards can't reach your store." Open Expresso Gift Cards in your Shopify admin once, then run the workflow again.
- "Shopify couldn't create the gift card: …" Shopify rejected the gift card, for example because the amount is above your store's gift card limit. The rest of the message explains why.
- "Choose the customer who should receive the gift card." or "Enter a gift card amount greater than 0." Check the action's fields in your workflow.
- "Expresso Gift Cards hit a temporary problem." Shopify Flow retries the step automatically.
If a trigger doesn't run, check that your workflow is turned on. For Gift card issued, also check that the gift card was linked to a customer.
Need help? Contact our support team at support@anatolilabs.com
Was this article helpful?
Your feedback helps us improve our documentation.

