How It Works ⚙️
This workflow is designed to streamline your proposal generation, turning raw client data into a professional document automatically. Here's a step-by-step breakdown of its operation:
- Trigger (Form): 🚀 The workflow starts when new client data is received via the n8n form. This form serves as the primary input for client details.
- Prepare AI Prompt & Client Info (Function): 🧹 This node takes the incoming client data from the form and intelligently formats it into a precise prompt for the AI. It also extracts key client details like email and name for later use.
- Generate Proposal Content (AI): 🧠 The prepared prompt is fed to OpenAI's GPT-4o. The AI then drafts a detailed proposal outline, including problem summary, solutions, scope, and milestones, all structured in a perfect JSON format.
- Generate Proposal PDF (PDFmonkey): 📄 The AI-generated JSON content is then sent to PDFmonkey. This service takes the structured data and populates it into your pre-designed PDF proposal template, creating a beautiful and professional document.
- Check the PDF: PDFMonkey finishes rendering in the synchronous request. The workflow validates the response before fetching the PDF.
- Download Generated PDF (HTTP Request): 💾 Once notified by PDFmonkey, this node sends an HTTP request to download the final PDF document from PDFmonkey's servers.
- Prepare Email Data (Function): 📧 This node consolidates all the necessary information—client email, name, company, the downloaded PDF's binary data, and the proposal title—preparing it for the final email sending step.
- Send Proposal Email to Client (Gmail): ✅ The workflow's grand finale! This node compiles a personalized email to the client, attaching the newly generated PDF proposal. It ensures your professional proposal reaches the client's inbox swiftly and automatically.
How to Set Up 🛠️
Follow these steps carefully to get your "Automated AI Proposal Generator" workflow up and running:
-
Import Workflow JSON:
- Open your n8n instance.
- Click on 'Workflows' in the left sidebar.
- Click the '+' button or 'New' to create a new workflow.
- Click the '...' (More Options) icon in the top right.
- Select 'Import from JSON' and paste the provided workflow JSON code.
-
Configure Credentials:
-
OpenAI Node ("2. Generate Proposal Content (AI)"):
- Click on this node.
- Under 'Credentials', select your existing OpenAI API Key credential or click 'Create New' to set one up.
-
PDFmonkey HTTP Request Node ("3. Generate Proposal PDF (PDFmonkey)" & "5. Download Generated PDF"):
-
Gmail Node ("7. Send Proposal Email to Client"):
- Click on this node.
- Under 'Authentication', select your existing Gmail OAuth2 credential or create a new one.
-
Configure PDF generation: In Configure PDFMonkey template, enter your template UUID. In Generate Proposal PDF, select a Header Auth credential with Authorization set to Bearer followed by your PDFMonkey API key. Connect OpenAI and Gmail. The form asks for the client email and the completed PDF is attached to their proposal.
-
Configure Trigger Node (this is now the '0. Form Trigger'):
- When you import this JSON, the '0. Form Trigger (Client Data Input)' node will be ready.
- To use it: Simply activate the workflow. n8n will provide a URL for this form. You can share this URL with your clients or team to collect the data directly.
- The form fields are already defined based on the previous input structure.
-
Customize Email Details:
- Gmail Node ("7. Send Proposal Email to Client"):
- Replace
[email protected] with the actual email address you want the proposals to be sent from.\n * (Optional) Modify the email subject and body text to match your agency's branding and tone.
-
Review and Activate:
- Thoroughly review all node configurations to ensure all placeholders (
<YOUR_...HERE>) are replaced and settings are correct.
- Click the 'Save' button in the top right corner.
- Finally, toggle the 'Inactive' switch to 'Active' to enable your workflow. 🟢 Your automated AI proposal generator is now live and ready to empower your sales efforts!
In Configure PDFMonkey template, enter your template UUID. In Generate Proposal PDF, select a Header Auth credential with Authorization set to Bearer followed by your PDFMonkey API key. Connect OpenAI and Gmail. The form asks for the client email and the completed PDF is attached to their proposal.