Back to Catalog

AI model GPT-4.1-mini and hosting on AWS S3

Thomas HealThomas Heal
179 views
2/3/2026
Official Page

This workflow contains community nodes that are only compatible with the self-hosted version of n8n.

Overview

This workflow is designed for inspiring teams or individuals who need to quickly and efficiently serve files, content, or documents via the web. It offers a straightforward approach while still being flexible and adaptable for different branding needs.

The HTML branding can be easily updated through an external LLM, making it possible to fully customize the look and feel without complex coding. You simply prompt the AI (using the JSON as a guide) to output your desired design.

This template makes use of a powerful community node, which brings in the benefits of shared knowledge and collective improvement.

Setup Instructions

Copy the JSON Preset into your AI model or use your own, along with your custom branding requirements. Ask the model for an HTML response, then paste the output into the HTML Preset.

Next, connect the JSON inputs into the relevant locations from the structured output parser. Once complete, the static HTML can be served via AWS or another web server using HTTPS, ensuring secure and reliable delivery.

Workflow Explanation

This AI Agent takes a simple user input and transforms it into dynamic HTML. The structured JSON output forces consistent formatting, while giving you the creative flexibility to adjust visuals on demand.

Since the output is relatively consistent the workflow can produce repitive business documents with consistency and accuracy.

Requirements

  • LLM account access
  • AWS Account (S3) or HTTPs equivalent
  • Basic HTML/JSON knowledge
  • PDF.co Account

AI Model GPT-4.1 Mini and Hosting on AWS S3

This n8n workflow demonstrates a basic integration of an AI chat model with AWS S3 for potential storage or processing of AI-generated content. It sets up a foundation for building AI-powered applications that can interact with users and persist data.

What it does

This workflow outlines the following steps:

  1. Listens for Chat Messages: The workflow is triggered by an incoming chat message, acting as the user's prompt for the AI.
  2. Processes with an AI Agent: The chat message is fed into an AI Agent, which can be configured to perform various tasks or engage in conversational AI.
  3. Utilizes an OpenAI Chat Model: The AI Agent leverages an OpenAI Chat Model (likely GPT-4.1 Mini, based on the directory name) to generate responses or process information.
  4. Parses Structured Output: The AI's response is then passed through a Structured Output Parser, indicating an intention to extract specific, formatted data from the AI's output.
  5. Interacts with AWS S3: Finally, the workflow includes an AWS S3 node, suggesting that the processed information or AI output can be stored, retrieved, or managed within an S3 bucket.
  6. Includes an HTML Node: An HTML node is present, which could be used for templating, extracting data from HTML, or generating HTML content based on the AI's output.
  7. Includes a Sticky Note: A sticky note is included for documentation or comments within the workflow.

Prerequisites/Requirements

To use this workflow, you will need:

  • n8n Instance: A running n8n instance.
  • OpenAI API Key: For the OpenAI Chat Model.
  • AWS Account: With credentials configured for S3 access.
  • LangChain Nodes: Ensure the @n8n/n8n-nodes-langchain package is installed in your n8n instance, as this workflow utilizes LangChain nodes (AI Agent, OpenAI Chat Model, Structured Output Parser, Chat Trigger).

Setup/Usage

  1. Import the workflow: Download the JSON provided and import it into your n8n instance.
  2. Configure Credentials:
    • Set up your OpenAI API Key credential for the "OpenAI Chat Model" node.
    • Set up your AWS S3 credential for the "AWS S3" node.
  3. Configure Nodes:
    • "When chat message received": This trigger will need to be configured based on how you intend to receive chat messages (e.g., from a specific chat platform if integrated, or a test input).
    • "AI Agent": Configure the agent's prompt, tools, and behavior according to your AI application's needs.
    • "OpenAI Chat Model": Select the desired OpenAI model (e.g., gpt-4-1106-preview or gpt-3.5-turbo) and adjust parameters like temperature.
    • "Structured Output Parser": Define the schema for the structured output you expect from the AI.
    • "AWS S3": Configure the S3 operation (e.g., "Upload", "Download", "List") and specify the bucket name and file details for storing or retrieving data.
    • "HTML": Configure this node if you intend to process or generate HTML content.
  4. Activate the workflow: Once configured, activate the workflow to start processing chat messages.

Related Templates

Automate cancellation feedback collection with Stripe and Google Sheets

Who's it for This template is perfect for any SaaS business or subscription service using Stripe. Product managers, customer success teams, and founders can use this to automatically collect cancellation feedback without manual follow-up. Ideal for companies looking to reduce churn by understanding why customers leave. What it does When a customer cancels their Stripe subscription, this workflow instantly: Detects the cancellation via Stripe webhook Fetches customer details from Stripe API Sends a personalized feedback survey email with embedded customer information Logs all cancellations to Google Sheets for tracking Receives survey responses via webhook Automatically routes feedback to different Google Sheets based on reason (pricing concerns, feature requests, or other feedback) This organized approach helps you identify patterns in cancellations and prioritize improvements that matter most. How it works Stripe triggers the workflow when a subscription is canceled Customer data is fetched from the Stripe API (email, name, plan details) Personalized email is sent with a survey link containing customer data as URL parameters Cancellation is logged to a Google Sheets "Cancellations" tab When the customer submits the survey, a webhook receives the response Feedback is routed to dedicated sheets based on cancellation reason: Price Concerns → for pricing-related issues Feature Requests → for missing functionality Other Feedback → for everything else Set up steps Setup time: ~20 minutes Prerequisites Stripe account (test mode recommended for initial setup) Google account with Google Sheets Email service (Gmail, Outlook, or SMTP) Survey tool with webhook support (Tally or Typeform recommended) Configuration Stripe webhook: Copy the webhook URL from the "Stripe Subscription Canceled" node and add it to your Stripe Dashboard → Webhooks. Select the customer.subscription.deleted event. Email credentials: Configure Gmail, Outlook, or SMTP credentials in the "Send Feedback Survey Email" node. Update the fromEmail parameter. Survey form: Create a survey form with these fields: Hidden fields (auto-populated from URL): email, customer_id, name, plan Visible fields: reason dropdown ("Too Expensive", "Missing Features", "Other"), comments textarea Configure webhook to POST responses to the "Survey Response Webhook" URL Google Sheets: Create a spreadsheet with 4 sheets: "Cancellations", "Price Concerns", "Feature Requests", and "Other Feedback". Connect your Google account in the Google Sheets nodes. Survey URL: Replace [SURVEY_URL] in the email template with your actual survey form URL. Test: Use Stripe test mode to trigger a test cancellation and verify the workflow executes correctly. Requirements Stripe account with API access Google Sheets (free) Email service: Gmail, Outlook, or SMTP server Survey tool: Tally (free), Typeform (paid), or custom form with webhook capability n8n instance: Cloud or self-hosted How to customize Different surveys by plan: Add an IF node after getting customer details to send different survey links based on subscription tier Slack notifications: Add a Slack node after "Route by Feedback Type" to alert your team about price concerns in real-time Delayed email: Insert a Wait node before sending the email to give customers a 24-hour cooldown period CRM integration: Add nodes to sync cancellation data with your CRM (HubSpot, Salesforce, etc.) Follow-up workflow: Create a separate workflow that triggers when feedback is received to send personalized follow-up offers Custom routing logic: Modify the Switch node conditions to match your specific survey options or add more categories Tips for success Use Stripe test mode initially to avoid sending emails to real customers during setup Customize the email tone to match your brand voice Keep the survey short (2-3 questions max) for higher response rates Review feedback weekly to identify patterns and prioritize improvements Consider offering a discount or incentive for completing the survey

Daiki TakayamaBy Daiki Takayama
52

Personalize client meeting prep with GPT-4, Google Calendar, Notion & Places API to Slack

Who is this for This template is perfect for sales professionals, account managers, and business development teams who want to make memorable impressions on their clients. It automates the tedious task of researching gift shops and preparation spots before important meetings. What it does This workflow automatically prepares personalized recommendations for client visits by monitoring your Google Calendar, enriching data from Notion, and using AI to select the perfect options. How it works Trigger: Activates when a calendar event containing keywords like "visit," "meeting," "client," or "dinner" is created or updated Extract: Parses company name from the event title Enrich: Fetches customer preferences from your Notion database Search: Google Places API finds nearby gift shops and quiet cafes Analyze: GPT-4 recommends the best options based on customer preferences Notify: Sends a personalized message to Slack with recommendations Example Slack Output Here's what the final notification looks like: šŸŽ Recommended Gift Shop Patisserie Sadaharu AOKI (ā˜…4.6) 3-5-2 Marunouchi, Chiyoda-ku šŸ’” Reason: The customer loves French desserts, so this patisserie's macarons would be perfect! ā˜• Pre-Meeting Cafe Starbucks Reserve Roastery (ā˜…4.5) 5 min walk from meeting location Set up steps Setup time: approximately 15 minutes Google Calendar: Connect your Google Calendar account and select your calendar Notion Database: Create a customer database with "Company Name" (title) and "Preferences" (text) fields Google Places API: Get an API key from Google Cloud Console and add it to the Configuration node OpenAI: Connect your OpenAI account for AI-powered recommendations Slack: Connect your Slack workspace and update the channel ID in the final node Requirements Google Calendar account Notion account with a customer database Google Places API key (requires Google Cloud account) OpenAI API key Slack workspace with bot permissions How to customize Search radius: Adjust the searchRadius parameter in the Configuration node (default: 1000 meters) Event keywords: Modify the Filter node conditions to match your calendar naming conventions Notification channel: Change the Slack channel ID to your preferred channel

é•·č°·ć€€ēœŸå®By é•·č°·ć€€ēœŸå®
27

Track meal nutrition from meal photos with LINE, Google Gemini and Google Sheets

AI Meal Nutrition Tracker with LINE and Google Sheets Who's it for This workflow is designed for health-conscious individuals, fitness enthusiasts, and anyone who wants to track their daily food intake without manual calorie counting. It is best suited for users who want a simple, AI-powered meal logging system that analyzes food photos one at a time and provides instant nutritional feedback via LINE. What it does This workflow processes a single meal photo sent via LINE, analyzes it using Google Gemini AI to identify foods and estimate nutritional content, and stores the data in Google Sheets for tracking. The workflow focuses on simplicity and encouragement: it receives a meal image, performs AI-based food recognition, estimates calories and macronutrients, calculates a health score, provides personalized advice, and replies with a detailed nutritional breakdown on LINE. How it works A single meal photo is sent to the LINE bot. The workflow is triggered via a LINE webhook. The image file is downloaded and sent to Google Gemini AI for food analysis. The AI identifies foods and estimates nutritional values (calories, protein, carbs, fat, fiber). A health score (1-10) is calculated with personalized improvement tips. The data is appended to Google Sheets for meal history tracking. The image is uploaded to Google Drive for reference. A formatted nutritional report with advice is sent back as a LINE reply. This workflow is intentionally designed to handle one image per execution. Requirements To use this workflow, you will need: A LINE Messaging API account A Google Gemini API key A Google account with access to Google Sheets and Google Drive A Google Sheets document with the following column names: Date Time Meal Type Food Items Calories Protein (g) Carbs (g) Fat (g) Fiber (g) Health Score Advice Image URL Important limitations This workflow does not support multiple images sent in a single message. Sending images in quick succession may trigger multiple executions and lead to unexpected results. Only the first image in an event payload is processed. Nutritional values are AI estimates based on visual analysis and typical serving sizes. Accuracy depends on image quality, lighting, and food visibility. This tool should not replace professional dietary advice. These limitations are intentional to keep the workflow simple and easy to understand. How to set up Create a LINE Messaging API channel and obtain a Channel Access Token. Generate a Google Gemini API key. Update the Config node with your LINE token, Google Sheets ID, Google Drive folder ID, and daily calorie goal. Configure credentials for LINE, Google Gemini, Google Sheets, and Google Drive. Register the n8n webhook URL in your LINE channel settings. Activate the workflow in n8n and test it with a single meal photo. How to customize Modify the AI prompt in the "Analyze Meal with AI" node to support different languages or dietary frameworks (keto, vegan, etc.). Adjust the daily calorie goal in the Config node to match individual needs. Add additional nutritional fields such as sodium, sugar, or vitamins. Replace Google Sheets with a fitness app API or database. Integrate with other services to send daily/weekly nutrition summaries. --- Note: This workflow was tested using real meal photos sent individually via the LINE Messaging API. Nutritional estimates are approximations and may vary from actual values. For accurate dietary tracking, consult a registered dietitian.

Oka HironobuBy Oka Hironobu
89