workflows.fit
Back to n8n workflows
n8n templateFreeBy Pankstr

Build a personalized birthday AI companion with GPT-4 and PostgreSQL

Idea The idea for app came since I wanted to build a unique gift for my niece because she gets excited for her birthday (which Im going to miss this year). The web app has a simple countdown (in html and JS) but more ...

DevelopmentData & StorageCore NodesAILangchainUtilityWebhookRespond To Webhook
Loading interactive preview...

Template notes

Idea The idea for app came since I wanted to build a unique gift for my niece because she gets excited for her birthday (which Im going to miss this year). The web app has a simple countdown (in html and JS) but more importantly, there is an AI agent that will answer some specific questions and know her preferences.

How it works The questions from app are sent via web hook to N8N which has pulls preferences file (about her likes, dislikes, personality) from postgre and AI Agent that will answer questions/respond. The current status is stored back in postgre (especially about status of cat and universe happenings) before responding back.

Features - Integrated AI chatbot via N8N webhook - Persistent conversation history - Minimizable chat interface - Fallback support for offline testing - Features: -- Wheres Mittens - This is a query to track her lost cat in multiverse. -- Multiverse updates with recent update stored

Pre Requisites - Postgre SQL database is available. Alternatively, use any other database but change the N8N nodes. - LLM Api Key.

Step by Step Instructions 1. Export this N8N Workflow. 2. Modify LLM API Key, I used openAI, 4.1 3. For web app scofflding,you will need Node, HTML and Javascript. I've created a mini version using Node and JS with web app and N8N connection settings here: <https://github.com/productiser/FiBirthdayAgent> 4. PostgreSQL Database Script (1 table for memory and context storage):

CREATE TABLE fifiworldcontext ( id TEXT PRIMARY KEY, -- e.g., 'agentfifi' catlocation TEXT, -- e.g., "Bubble Nebula" catactivity TEXT, -- e.g., "Playing laser tag with moon mice"

fifipreferences JSONB, -- e.g., likes/dislikes/foods/shows worldhistory TEXT, -- Summary of narrative events

lastupdated TIMESTAMP DEFAULT CURRENTTIMESTAMP );