How do I handle sensitive data and PII inside workflows?

Some of my workflows will inevitably touch personal or sensitive data, and I want to handle it responsibly from the start. How do I work with sensitive data and PII in 3B? I’m curious how to minimize exposure, control who can see it, and keep it out of places it shouldn’t be. Guidance on the recommended practices would give me real peace of mind.

Good instinct to think about this up front! It’s way easier than bolting it on later. The core idea is simple: the safest data is the data you never touched. Everything else follows from that.

Only take what you actually need. Before you pull in a field, ask if the workflow really uses it. If it doesn’t, don’t fetch it. You can’t leak, log, or misplace something you never brought in.

Drop it as soon as you’re done with it. If you need someone’s email to send one message, use it and let it go, don’t carry it along through every step after. The less far sensitive data travels through your workflow, the fewer places it can end up.

Keep it out of the logs. This is the easy mistake. Logs are for “step ran, here’s what happened”, not for dumping the actual data. Don’t print names, emails, card numbers, or whole records to the log to debug. Log an ID or a count instead. Anything you print sticks around where you might not expect.

Lock down who can reach it. Anything that shows or returns sensitive data should be behind a login by default, just people in your space, or your wider org. Never make one of those open to the public unless you truly mean to. Public means anyone with the link, no sign-in, so keep it for stuff that’s genuinely meant to be open.

Never put secrets in the code. API keys, passwords, tokens. Those don’t go in your steps. Use a connector to hold the credentials; 3B slips them in at run time so they’re never sitting in the workflow itself.

Don’t stash it where it lingers. If you’re saving data to reuse later, only keep what you need and for as long as you need it. Don’t let sensitive records pile up in storage “just in case” — that’s exactly the pile someone eventually wishes wasn’t there.

Do those and you’re in good shape: take little, hold it briefly, keep it behind a login, and keep it out of the logs. Most PII trouble is just one of those slipping.

Happy building!