Dynamic NASA Credentials with n8n Expressions

Demonstrates setting NASA API credentials dynamically using expressions from a form input, enabling flexible authentication without hardcoding.

n8n
Dynamic NASA Credentials with n8n Expressions

This n8n workflow showcases how to dynamically set credentials using expressions. It starts with a Form Trigger that collects a NASA API key from the user. The key is then injected into the NASA node's credential via an expression: {{ $json["Enter your NASA API key"] }}. Finally, it fetches the Astronomy Picture of the Day and redirects the user to the image URL via Respond to Webhook.

The primary benefit is flexibility in authentication—ideal for testing APIs or sharing workflows without exposing credentials. It eliminates hardcoded secrets, enhancing security and reusability across environments. Setup is straightforward: create a NASA credential, enable expression mode for the API key field, and input the expression.

Use cases include API testing demos, educational tutorials for n8n users, or prototyping dynamic auth for other services like Stripe or OpenAI. It's perfect for developers onboarding to n8n, teaching expressions, or building user-facing tools requiring temporary credentials. Extend it by swapping NASA for any expression-compatible node.

$4.99
Last updated October 3, 2026
30-day money-back guarantee
Instant download
Lifetime updates included

New buyers can create an account from the cart to unlock a controlled $10 first-purchase credit on eligible orders of $25+.

Secure checkout powered by Stripe

Support

How to import this workflow into n8n

  1. 1Purchase or download the workflow to get the n8n workflow JSON file.
  2. 2In your n8n instance, open Workflows and choose "Import from File" (or paste the JSON with Ctrl+V on the canvas).
  3. 3Open each node marked with a credential warning and connect your own accounts and API keys.
  4. 4Run the workflow once manually to verify the data flow, then toggle it to Active.

Related Real Estate workflows

More from Saskia Kowalczyk

Need this deployed? We'll set it up for you.

Our automation experts deploy this workflow in your stack, connect your accounts, and verify it works — or build a custom solution from scratch.