Secure Your Workflows: Why Hashing Matters
When connecting Shopify Flow to external APIs, ensuring the security of sensitive data like API keys and customer information is paramount. Hashing is a powerful tool for safeguarding this information by converting it into an irreversible format.
Liquid Filters for Hashing Now Available
Shopify Flow empowers you to hash data directly within workflows using Liquid filters—these are the same tools trusted in Shopify themes. The supported hashing functions include:
- Sha1: Generate a 160-bit hash.
- Sha256: Create a stronger 256-bit hash.
- Md5: Generate a 128-bit hash (commonly used, though less secure).
- Hmac_sha1: Combine a key with the SHA1 hashing algorithm for added security.
- Hmac_sha256: Enhance security with a key and SHA256 hashing algorithm.
How to Implement Hashing in Shopify Flow
Adding a hashing filter is simple. Apply it to any variable in your workflow to hash valuable data:
-
Hash a customer email:
{{ customer.defaultEmailAddress | sha1 }} -
Hash a customer email with HMAC-SHA256:
{{ customer.defaultEmailAddress | hmac_sha256: "your-secret-key" }}
For HMAC filters, simply include an authentication code as a parameter.
Learn More
Want to dive deeper? Consult the Liquid Reference for comprehensive documentation on each filter.
If you have questions, visit the Shopify Community and connect with other developers and merchants.