my / index.html
wtfaiz's picture
undefined - Initial Deployment
89ceae2 verified
Raw
History Blame Contribute Delete
17.1 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>n8n Workflow Creator</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
.node-preview {
transition: all 0.3s ease;
}
.node-preview:hover {
transform: translateY(-5px);
box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}
.workflow-canvas {
background-image: linear-gradient(to right, #f3f4f6 1px, transparent 1px), linear-gradient(to bottom, #f3f4f6 1px, transparent 1px);
background-size: 20px 20px;
}
.prompt-input:focus {
outline: none;
box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}
@keyframes pulse {
0%, 100% {
opacity: 1;
}
50% {
opacity: 0.5;
}
}
.animate-pulse {
animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
</style>
</head>
<body class="bg-gray-50 font-sans">
<div class="flex flex-col min-h-screen">
<!-- Header -->
<header class="bg-indigo-600 text-white shadow-lg">
<div class="container mx-auto px-4 py-4 flex justify-between items-center">
<div class="flex items-center space-x-2">
<i class="fas fa-project-diagram text-2xl"></i>
<h1 class="text-2xl font-bold">n8n Workflow Creator</h1>
</div>
<nav class="hidden md:flex space-x-6">
<a href="#" class="hover:text-indigo-200 transition">Templates</a>
<a href="#" class="hover:text-indigo-200 transition">Documentation</a>
<a href="#" class="hover:text-indigo-200 transition">Community</a>
</nav>
<button class="md:hidden text-xl">
<i class="fas fa-bars"></i>
</button>
</div>
</header>
<!-- Main Content -->
<main class="flex-grow container mx-auto px-4 py-8">
<div class="flex flex-col lg:flex-row gap-8">
<!-- Left Panel - Prompt Input -->
<div class="w-full lg:w-1/3 bg-white rounded-xl shadow-md p-6 h-fit">
<h2 class="text-xl font-semibold text-gray-800 mb-4">Create Workflow from Prompt</h2>
<div class="mb-6">
<label for="workflow-prompt" class="block text-sm font-medium text-gray-700 mb-2">Describe your workflow</label>
<textarea id="workflow-prompt" rows="5" class="w-full px-4 py-3 border border-gray-300 rounded-lg prompt-input focus:border-indigo-500" placeholder="e.g. 'Create a workflow that fetches new tweets containing #n8n, saves them to Google Sheets, and sends a Slack notification'"></textarea>
</div>
<div class="mb-6">
<label class="block text-sm font-medium text-gray-700 mb-2">Complexity</label>
<div class="flex space-x-4">
<button class="px-4 py-2 bg-indigo-100 text-indigo-700 rounded-lg hover:bg-indigo-200 transition">Simple</button>
<button class="px-4 py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition">Medium</button>
<button class="px-4 py-2 bg-indigo-100 text-indigo-700 rounded-lg hover:bg-indigo-200 transition">Complex</button>
</div>
</div>
<div class="mb-6">
<label class="block text-sm font-medium text-gray-700 mb-2">Integration Focus</label>
<div class="flex flex-wrap gap-2">
<span class="px-3 py-1 bg-blue-100 text-blue-800 rounded-full text-sm">Slack</span>
<span class="px-3 py-1 bg-green-100 text-green-800 rounded-full text-sm">Google</span>
<span class="px-3 py-1 bg-red-100 text-red-800 rounded-full text-sm">Twitter</span>
<span class="px-3 py-1 bg-purple-100 text-purple-800 rounded-full text-sm">GitHub</span>
<span class="px-3 py-1 bg-yellow-100 text-yellow-800 rounded-full text-sm">Zapier</span>
<span class="px-3 py-1 bg-indigo-100 text-indigo-800 rounded-full text-sm">+ More</span>
</div>
</div>
<button id="generate-btn" class="w-full bg-indigo-600 hover:bg-indigo-700 text-white font-medium py-3 px-4 rounded-lg transition flex items-center justify-center">
<i class="fas fa-magic mr-2"></i> Generate Workflow
</button>
</div>
<!-- Right Panel - Workflow Visualization -->
<div class="w-full lg:w-2/3 bg-white rounded-xl shadow-md overflow-hidden">
<div class="p-4 border-b border-gray-200 flex justify-between items-center">
<h2 class="text-xl font-semibold text-gray-800">Generated Workflow</h2>
<div class="flex space-x-2">
<button class="p-2 text-gray-500 hover:text-indigo-600 hover:bg-indigo-50 rounded-full transition">
<i class="fas fa-download"></i>
</button>
<button class="p-2 text-gray-500 hover:text-indigo-600 hover:bg-indigo-50 rounded-full transition">
<i class="fas fa-share-alt"></i>
</button>
<button class="p-2 text-gray-500 hover:text-indigo-600 hover:bg-indigo-50 rounded-full transition">
<i class="fas fa-cog"></i>
</button>
</div>
</div>
<!-- Workflow Canvas -->
<div id="workflow-canvas" class="workflow-canvas p-6 min-h-[500px] bg-gray-50 relative">
<!-- Initial state -->
<div id="initial-state" class="flex flex-col items-center justify-center h-full">
<div class="text-center p-8 max-w-md">
<i class="fas fa-lightbulb text-5xl text-indigo-400 mb-4"></i>
<h3 class="text-xl font-medium text-gray-700 mb-2">Describe your workflow idea</h3>
<p class="text-gray-500 mb-6">Enter a prompt describing what you want your n8n workflow to do, and we'll generate the nodes and connections for you.</p>
<button class="px-4 py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition flex items-center mx-auto">
<i class="fas fa-magic mr-2"></i> Try Example
</button>
</div>
</div>
<!-- Generated workflow (hidden initially) -->
<div id="generated-workflow" class="hidden">
<div class="flex justify-center mb-8">
<div class="node-preview bg-white p-4 rounded-lg shadow-md border-l-4 border-indigo-500 w-64">
<div class="flex items-center mb-2">
<div class="w-8 h-8 bg-blue-100 rounded-full flex items-center justify-center mr-2">
<i class="fas fa-twitter text-blue-500"></i>
</div>
<h4 class="font-medium">Twitter Trigger</h4>
</div>
<p class="text-sm text-gray-600">New tweets with #n8n</p>
</div>
</div>
<div class="flex justify-center mb-8">
<div class="flex items-center">
<div class="h-12 w-0.5 bg-gray-300 mx-auto"></div>
</div>
</div>
<div class="flex justify-center mb-8">
<div class="node-preview bg-white p-4 rounded-lg shadow-md border-l-4 border-green-500 w-64">
<div class="flex items-center mb-2">
<div class="w-8 h-8 bg-green-100 rounded-full flex items-center justify-center mr-2">
<i class="fab fa-google text-green-500"></i>
</div>
<h4 class="font-medium">Google Sheets</h4>
</div>
<p class="text-sm text-gray-600">Append tweet data</p>
</div>
</div>
<div class="flex justify-center mb-8">
<div class="flex items-center">
<div class="h-12 w-0.5 bg-gray-300 mx-auto"></div>
</div>
</div>
<div class="flex justify-center">
<div class="node-preview bg-white p-4 rounded-lg shadow-md border-l-4 border-purple-500 w-64">
<div class="flex items-center mb-2">
<div class="w-8 h-8 bg-purple-100 rounded-full flex items-center justify-center mr-2">
<i class="fab fa-slack text-purple-500"></i>
</div>
<h4 class="font-medium">Slack</h4>
</div>
<p class="text-sm text-gray-600">Send notification</p>
</div>
</div>
</div>
<!-- Loading state (hidden initially) -->
<div id="loading-state" class="hidden flex flex-col items-center justify-center h-full">
<div class="animate-spin rounded-full h-16 w-16 border-t-2 border-b-2 border-indigo-500 mb-4"></div>
<h3 class="text-lg font-medium text-gray-700 mb-2">Generating your workflow</h3>
<p class="text-gray-500">Analyzing your prompt and creating the perfect n8n nodes...</p>
</div>
</div>
</div>
</div>
<!-- Suggested Prompts -->
<div class="mt-12">
<h2 class="text-xl font-semibold text-gray-800 mb-4">Try these example prompts</h2>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
<div class="bg-white p-4 rounded-lg shadow-sm border border-gray-200 hover:border-indigo-300 transition cursor-pointer">
<h3 class="font-medium text-gray-800 mb-2">Social Media Monitor</h3>
<p class="text-sm text-gray-600">"Monitor Twitter for mentions of my brand, save to Airtable, and alert me on Discord"</p>
</div>
<div class="bg-white p-4 rounded-lg shadow-sm border border-gray-200 hover:border-indigo-300 transition cursor-pointer">
<h3 class="font-medium text-gray-800 mb-2">CRM Automation</h3>
<p class="text-sm text-gray-600">"When a new lead comes in via Typeform, add to HubSpot and send a welcome email"</p>
</div>
<div class="bg-white p-4 rounded-lg shadow-sm border border-gray-200 hover:border-indigo-300 transition cursor-pointer">
<h3 class="font-medium text-gray-800 mb-2">DevOps Alert</h3>
<p class="text-sm text-gray-600">"If GitHub gets a new issue in my repo, create a Trello card and notify the team on Slack"</p>
</div>
</div>
</div>
</main>
<!-- Footer -->
<footer class="bg-gray-800 text-white py-8">
<div class="container mx-auto px-4">
<div class="flex flex-col md:flex-row justify-between items-center">
<div class="mb-4 md:mb-0">
<div class="flex items-center space-x-2">
<i class="fas fa-project-diagram text-xl"></i>
<span class="font-bold">n8n Workflow Creator</span>
</div>
<p class="text-gray-400 text-sm mt-1">Generate complex workflows with simple prompts</p>
</div>
<div class="flex space-x-6">
<a href="#" class="text-gray-400 hover:text-white transition">Terms</a>
<a href="#" class="text-gray-400 hover:text-white transition">Privacy</a>
<a href="#" class="text-gray-400 hover:text-white transition">Docs</a>
<a href="#" class="text-gray-400 hover:text-white transition">GitHub</a>
</div>
</div>
<div class="mt-8 pt-6 border-t border-gray-700 text-center text-gray-400 text-sm">
<p>© 2023 n8n Workflow Creator. Not affiliated with n8n.io.</p>
</div>
</div>
</footer>
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
const generateBtn = document.getElementById('generate-btn');
const workflowPrompt = document.getElementById('workflow-prompt');
const initialState = document.getElementById('initial-state');
const generatedWorkflow = document.getElementById('generated-workflow');
const loadingState = document.getElementById('loading-state');
// Example prompt buttons
const examplePrompts = document.querySelectorAll('.grid > div');
examplePrompts.forEach(prompt => {
prompt.addEventListener('click', function() {
workflowPrompt.value = this.querySelector('p').textContent;
});
});
// Generate workflow button click handler
generateBtn.addEventListener('click', function() {
if (workflowPrompt.value.trim() === '') {
alert('Please describe your workflow first');
return;
}
// Show loading state
initialState.classList.add('hidden');
generatedWorkflow.classList.add('hidden');
loadingState.classList.remove('hidden');
// Simulate API call/processing delay
setTimeout(function() {
loadingState.classList.add('hidden');
generatedWorkflow.classList.remove('hidden');
// Scroll to the generated workflow
generatedWorkflow.scrollIntoView({ behavior: 'smooth' });
}, 2000);
});
// Try example button
document.querySelector('#initial-state button').addEventListener('click', function() {
workflowPrompt.value = "Create a workflow that fetches new tweets containing #n8n, saves them to Google Sheets, and sends a Slack notification";
});
});
</script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=wtfaiz/my" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>