New to Kestra?
Use blueprints to kickstart your first workflows.
Track Shopify customer erasure deadlines, alert Slack or auto-delete overdue records, and log the result for privacy and ops teams.
GDPR and CCPA give a customer the right to have their data erased, and give the business a hard deadline to actually do it. Shopify's Admin API can delete a customer, but it tracks nothing about why or by when, so an erasure request that gets flagged and then forgotten quietly turns into a compliance violation with no alarm attached. This blueprint checks whether the flagged customer record still exists, measures the request's age against the deadline you set, and only deletes it automatically once you have explicitly said this flow is allowed to.
This blueprint was created by Mohit Jeswani.
check_customer (io.kestra.plugin.shopify.customers.Get) reads the customer by ID.
Shopify's own API throws when the ID is not found; allowFailure: true turns that throw
into a missing output instead of failing the flow, which this blueprint treats as proof
the erasure already happened.evaluate (io.kestra.plugin.core.output.OutputValues) computes how many days have
passed since erasure_requested_at and classifies the request as ERASED,
WITHIN_DEADLINE, OVERDUE_AUTO_DELETE, or OVERDUE_NEEDS_HUMAN, folding
confirm_delete into the overdue classification itself.route (io.kestra.plugin.core.flow.Switch):io.kestra.plugin.shopify.customers.Delete (the safe
remediation, since deletion is the already-requested, correct outcome) and posts a
Slack notice that it happened automatically.summary logs the severity, closing the governance cycle.errors alerts Slack if the flow itself fails, for example an expired access token.confirm_delete to allow it.confirm_delete, or delete it
manually now) when the flow is not authorized to act.customers.Get and
customers.Delete used together as a compliance gate, distinct from this repo's existing
Shopify blueprints, which track order and product-stock data rather than customer-record
lifecycle.Shopify can delete a customer on request, but it has no concept of a legal deadline, no
escalation when one is missed, and no Slack integration of its own. Kestra keeps
erasure_requested_at, erasure_deadline_days, and confirm_delete as flow inputs, turns a
single customer lookup into a deadline decision, and keeps a full execution history proving
exactly when each erasure request was checked and what happened.
Shopify is a hosted SaaS platform with no official standalone Docker image, so check_customer
cannot be exercised against a local container; validate against a Shopify development store,
which is free, before pointing this at a production store.
SHOPIFY_ACCESS_TOKEN: the Shopify Admin API access token used by check_customer and
delete_customer. In Kestra OSS, provide it as the base64-encoded environment variable
SECRET_SHOPIFY_ACCESS_TOKEN.SLACK_WEBHOOK_URL: used by both Slack alert branches and the errors block. In Kestra
OSS, provide it as the base64-encoded environment variable SECRET_SLACK_WEBHOOK_URL.| Input | Default | Purpose |
|---|---|---|
customer_id |
0000000000 |
Shopify customer ID flagged for erasure |
erasure_requested_at |
2026-09-01 |
Date the erasure request was received |
erasure_deadline_days |
30 |
Legal deadline in days from the request date |
confirm_delete |
false |
Authorizes this flow to delete the customer itself once overdue |
{{ outputs.check_customer.customer }}: the customer record, when it still exists
(id, email, createdAt, tags, note, and more).{{ outputs.evaluate.values.days_since_request }} / .severity: how old the request is,
and ERASED, WITHIN_DEADLINE, OVERDUE_AUTO_DELETE, or OVERDUE_NEEDS_HUMAN.customers.Get throws on a missing ID rather than returning an empty result; this is the
mechanism this blueprint relies on to detect "already erased," so removing
allowFailure: true would make every already-erased customer fail the whole execution
instead of being classified ERASED. Verified directly against the task's own source,
since its Javadoc example does not show this behavior explicitly.erasure_requested_at is parsed as a plain date at midnight UTC; a request logged in a
different timezone can be off by up to a day in days_since_request, which rarely matters
against a 30-day deadline but is worth knowing for a tighter one.confirm_delete is a single flag for the whole flow, not per-request; a scheduled run with
confirm_delete: true will auto-delete every overdue customer it is pointed at, so scope
one flow execution to one request (or one batch you have already reviewed) rather than a
store-wide sweep.SHOPIFY_ACCESS_TOKEN and SLACK_WEBHOOK_URL secrets.customer_id to its ID,
with erasure_requested_at far enough in the past to be overdue.confirm_delete: false and confirm alert_overdue fires.confirm_delete: true and confirm delete_customer removes the test
customer and alert_auto_deleted fires.log_erased fires now that the customer is gone.daily trigger per real erasure request once the inputs reflect it.customer_id and erasure_requested_at from a privacy-request ticketing system
instead of hardcoding one request per flow run.Loop over a list of tracked erasure request IDs to check a whole queue in one
scheduled run, with confirm_delete left false until each one is reviewed.io.kestra.plugin.shopify.orders.List before
delete_customer runs, to keep an anonymized record for accounting without retaining
personal data.