Generate Structured Metadata for English and Chinese
detail.loadingPreview
This workflow automates the generation of structured metadata from various sources, ensuring it's available in both English and Chinese.
About This Workflow
This workflow is designed to create comprehensive and structured metadata for business intelligence purposes, specifically targeting restaurant leads. It leverages several data sources and AI capabilities to enrich and standardize information, making it suitable for both English and Chinese outputs.
The core process involves:
- Data Ingestion: Fetching data from Google Drive files (likely containing restaurant information) and potentially external APIs like Apify for scraping Google Maps.
- Data Cleaning and Structuring: Parsing complex data fields (like JSON strings for features, facilities, payment methods) into readable formats. Calculating lead scores and categorizing leads based on quality.
- AI Enrichment: Using AI agents and language models (OpenAI) to generate business summaries, create structured descriptions, and potentially translate or adapt content.
- Vector Store Integration: Storing processed data, including embeddings, into a Supabase vector store for efficient similarity search and retrieval.
- Output Generation: Updating Google Sheets with structured data and potentially sending data to other endpoints via webhooks or HTTP requests.
The workflow also includes mechanisms for handling conversational AI with chat memory and storing embeddings for AI models.
Key Features
- Multi-Source Data Integration: Connects to Google Drive and potentially external scraping services (Apify).
- Automated Data Cleaning & Formatting: Parses complex JSON fields, standardizes opening hours, and cleans phone numbers.
- AI-Powered Enrichment: Utilizes OpenAI models for generating business summaries and lead scoring.
- Lead Scoring & Categorization: Assigns a lead score and quality (High, Medium, Low) based on various restaurant attributes.
- Structured Metadata Generation: Creates a clean, organized dataset suitable for analysis and further processing.
- Vector Database Integration: Embeds and stores data in Supabase for AI-powered retrieval.
- Bilingual Output Capability: While not explicitly shown in transformation steps, the AI agent's system message implies a need for comprehensive data that can be adapted for bilingual use. The overall aim is to generate structured data that can then be translated or used to generate bilingual content.
- Conversational AI Support: Integrates chat memory for maintaining context in AI interactions.
How To Use
- Google Drive Setup: Ensure your Google Drive is configured with the
ReChargefolder (1dh1Rr2yrhSdoSYpiR8s1yXiSWLYxpoLJ) and theKhaisa Studiocredentials are set up for Google Drive OAuth2. - Apify Integration (if used): Configure the
Scrape Mapsnode with your Apify API URL and ensure thelanguageparameter is set appropriately for your target region (currentlyidfor Indonesian). ThelocationQueryshould be dynamically provided. - Google Sheets Setup: Configure the
Update DataandAppend Leadsnodes with your Google Sheets credentials (Sheet & Drive) and the correct Spreadsheet ID (1DKXYqpb0EWNYsbq2x8h5xqUWXy772toNDVrl8d-8nfA) and Sheet name (Restaurant). - OpenAI Credentials: Set up your OpenAI API credentials (
n8n - Money manager Khairul) for embedding and chat model usage. - Supabase Credentials: Configure your Supabase credentials (
REcharge) for the vector store, ensuring thedocumentstable exists. - PostgreSQL Credentials: Set up your PostgreSQL credentials (
ReCharge Database) for chat memory. - Workflow Trigger: The
Google Drive Triggeris set tofileUpdatedon theReChargefolder. Alternatively, theWhen clicking ‘Execute workflow’node can be used for manual execution. - Data Flow: When a file is updated in Google Drive, it will be searched (
Search File), downloaded (Get Data), and then processed. If Apify is used, its output will be cleaned (Clean Data) and appended to Google Sheets (Append Leads). The cleaned data from Google Drive will be processed and then inserted into Supabase (Supabase Vector Store). - AI Agent & Chat: The
AI Agentnode uses an OpenAI chat model (OpenAI Chat Model) with PostgreSQL chat memory (Postgres Chat Memory) for conversational interactions. Embeddings are generated usingEmbeddings OpenAIandEmbeddings OpenAI1.
To generate structured metadata in both English and Chinese:
- English Metadata: The
Clean Datanode and the AI agent generate structured data primarily in English. This is evident from the variable names and thebusiness_summarywhich is built using English descriptions. - Chinese Metadata: To achieve Chinese metadata:
- Modify AI System Prompt: Update the
AI Agentnode'ssystemMessageto explicitly instruct the AI to provide outputs in both English and Chinese, or to generate content specifically for Chinese users. - Translation Steps: Introduce translation nodes (e.g., using an AI translation service) after the initial data cleaning or AI generation steps to translate relevant fields (like
business_summary,description, etc.) into Chinese. - Data Structuring for Bilingual: Ensure that when structuring the final metadata, fields are created for both English and Chinese versions of key information (e.g.,
title_en,title_zh,description_en,description_zh). The current JSON structure in theClean Datanode needs to be extended to accommodate this. - Output Destination: Consider how the bilingual metadata will be stored or used. This might involve adding new columns to the Google Sheet or a separate output mechanism for the Chinese version.
- Modify AI System Prompt: Update the
Apps Used
Workflow JSON
{
"id": "bf0c7199-618c-4bdf-ab77-8d7796a2a6d0",
"name": "Generate Structured Metadata for English and Chinese",
"nodes": 13,
"category": "Data Enrichment & AI",
"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: bf0c7199-618c...
About the Author
N8N_Community_Pick
Curator
Hand-picked high quality workflows from the global community.
Statistics
Related Workflows
Discover more workflows you might like
Automate Local Business Outreach with AI-Powered Yelp Scraper
This workflow automates the process of scraping local business details from Yelp using AI, then leverages that data to send personalized partnership proposals via Gmail. It's perfect for sales and marketing teams looking to streamline lead generation and outreach campaigns.
Automate Getty Images Editorial Search & CMS Integration
This n8n workflow automates searching for editorial images on Getty Images, extracts key details and embed codes, and prepares them for seamless integration into your Content Management System (CMS), streamlining your content creation process.
Universal CSV to JSON API Converter
Effortlessly transform CSV data into structured JSON with this versatile n8n workflow. Integrate it into any application as a custom API endpoint, supporting various input methods including file uploads and raw text.