Dynamic Prompt Generation from GitHub with Language Model Integration
detail.loadingPreview
Fetches prompts from a GitHub repository, substitutes variables, and processes them with an AI agent.
About This Workflow
This workflow automates the retrieval of prompt templates from a GitHub repository. It then dynamically substitutes placeholders within the prompt text with variables defined in the workflow. Finally, the processed prompt is sent to an AI agent for further processing. The workflow includes robust error handling to ensure all necessary variables are present before execution.
Key Features
- Fetches prompt files from a specified GitHub repository and path.
- Dynamically substitutes variables within prompt templates.
- Validates that all required variables are present before prompt execution.
- Integrates with AI language models (Ollama and Langchain Agent) for prompt processing.
- Provides clear error reporting for missing variables.
How To Use
- Configure
setVarsNode: Define your GitHub repository details (owner,repo,path,prompt) and the variables to be substituted in your prompts (company,product,features,sector, etc.). - Connect to GitHub: Ensure your GitHub credentials are set up in the
GitHubnode. - Review Prompt Logic: The
GitHubnode fetches the prompt file. TheExtract from Filenode reads its content. TheSetPromptnode stores this content. - Variable Validation: The
Check All Prompt Vars Presentnode identifies all placeholders (e.g.,{{ company }}) in the prompt and checks if they exist as keys in thesetVarsnode. TheIfnode branches execution based on validation success. - Variable Substitution: If all variables are present, the
replace variablesnode substitutes the placeholders with actual values. TheSet Completed Promptnode prepares the final prompt for the AI. - AI Processing: The
AI Agentnode (orOllama Chat Model) processes the completed prompt. - Output: The
Prompt Outputnode stores the AI's response.
Apps Used
Workflow JSON
{
"id": "3f3a78bd-d17e-41d1-a68c-b6415fadf875",
"name": "Dynamic Prompt Generation from GitHub with Language Model Integration",
"nodes": 27,
"category": "Automation",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: 3f3a78bd-d17e...
About the Author
Crypto_Watcher
Web3 Developer
Automated trading bots and blockchain monitoring workflows.
Statistics
Related Workflows
Discover more workflows you might like
MCP Server GitHub Agent Tool
Automate GitHub operations using natural language commands via an MCP Server agent.
Automated Google Drive Backup for n8n Workflows
Automatically back up n8n workflows to Google Drive on a schedule.
Inventory Slack Alert Workflow
Triggers an alert based on inventory changes, processes data using RAG, and logs results.