Let your n8n template ask for the user's API key
You built a workflow worth sharing — and it works perfectly. Until someone else imports it. The bottleneck is the API key. Use yours, and every user is billed against your account. Use theirs, and they each have to find the credential UI, paste their key, and reconnect every time. Both are friction. The cleaner option is to let the workflow ask for the key on the form, then thread it through to the HTTP nodes that need it. It's simpler than it sounds. This post walks through the pattern with a working credential setup, an alternative for single-node simple cases, the gotchas, and a note on what this enables for custom node authors. The screenshots below come from n8n's built-in Bearer Auth credential and from the n8n-nodes-ldxhub package's own credential schema. The technique itself is generic — what's shown here works for any HTTP-node workflow and any custom node that supports expression-mode credentials. The form asks, the credential listens The simplest case: a Form Trigger collects an API key, then an HTTP node hits an authenticated endpoint with that key. Two nodes, one bridge between them — but the bridge isn't a direct expression. It runs through a credential. The flow: Form Trigger collects api_key (use the Password element type for masking) A Bearer Auth credential references that form input via expression HTTP node picks the credential The Form Trigger is straightforward. Add one field: Form Trigger Form Fields : - Label : API Key - Element Type : Password - Custom Field Name : api_key - Required Field : yes Element type matters. Use Password instead of Text and the input gets masked on screen — the key isn't readable to someone glancing at the browser. Here's the rendered form a user sees when they open the workflow URL: Wiring the credential to expression mode For a Bearer token (which is what most modern APIs use), create a new credential of type Bearer Auth — a generic credential built into n8n that's purpose-built for Authorization: Bearer ... header