Published 23 days ago
This workflow is designed for AI engineers, automation specialists, and content creators who need a scalable system to dynamically manage prompts stored in GitHub. It eliminates manual updates, enforces required variable checks, and ensures that AI interactions always receive fully processed prompts.
Manually managing AI prompts can be inefficient and error-prone. This workflow:
✅ Fetches dynamic prompts from GitHub
✅ Auto-populates placeholders with values from the setVars
node
✅ Ensures all required variables are present before execution
✅ Processes the formatted prompt through an AI agent
This workflow consists of three key branches, ensuring smooth prompt retrieval, variable validation, and AI processing.
📌 Note:
The prompt must contain n8n expression format variables (e.g., {{ $json.company }}
) so they can be dynamically replaced.
{{ $json.variableName }}
).setVars
node:
setVars
.📌 Example of a properly formatted GitHub prompt:
Hello {{ $json.company }}, your product {{ $json.features }} launches on {{ $json.launch_date }}.
This ensures seamless replacement when processed in n8n.
📌 Optional: Modify this to use OpenAI, Claude, or other AI models.
If a required variable is missing, the workflow stops execution and provides an error message:
⚠️ Missing Required Variables: ["launch_date"]
This ensures no incomplete prompts are sent to AI agents.
Hello {{ $json.company }}, your product {{ $json.features }} launches on {{ $json.launch_date }}.
setVars
Node{
"company": "PropTechPro",
"features": "AI-powered Property Management",
"launch_date": "March 15, 2025"
}
Hello PropTechPro, your product AI-powered Property Management launches on March 15, 2025.
launch_date
)⚠️ Missing Required Variables: ["launch_date"]
💡 Need CRM or Database Integration?
setVars
node to an Airtable, Google Sheets, or HubSpot API to pull variables dynamically.💡 Want to Modify the AI Model?
✅ No Manual Updates Required – Fetches prompts dynamically from GitHub.
✅ Prevents Broken Prompts – Ensures required variables exist before execution.
✅ Works for Any Use Case – Handles AI chat prompts, marketing messages, and chatbot scripts.
✅ Compatible with All n8n Deployments – Works on Cloud, Self-Hosted, and Desktop versions.