AI Data Analyst for Transaction Metadata Generation
detail.loadingPreview
Generate structured metadata for financial transactions in both English and Chinese, leveraging an AI agent to query and process data from Google Sheets.
About This Workflow
This workflow acts as an AI-powered data analyst, designed to extract, process, and structure transaction metadata. It utilizes an AI agent to understand user queries, select appropriate tools, and retrieve data from Google Sheets. The processed data can then be used to generate metadata in multiple languages, specifically English (en) and Chinese (zh). This workflow is particularly useful for scenarios requiring detailed transaction analysis and multilingual reporting.
Key Features
- AI Agent for Natural Language Understanding: Uses a Langchain AI agent to interpret user requests and determine the best course of action.
- Multiple Data Retrieval Tools: Integrates various tools to fetch data from Google Sheets, including filtering by date, status, and product name.
- Sub-workflow for Dynamic Data Fetching: Employs a sub-workflow (
Records by date) triggered by the AI agent for flexible data retrieval based on date ranges and status. - Data Transformation: Includes a code node to parse and transform raw Google Sheets API responses (JSONP) into structured JSON objects.
- Data Aggregation: Aggregates processed data into a single item for efficient handling by the AI agent.
- Multilingual Metadata Generation: The ultimate goal is to produce metadata in both English and Chinese.
- Google Sheets Integration: Connects to Google Sheets using OAuth2 credentials for accessing transaction data.
- Memory Management: Utilizes buffer memory to maintain context during chat interactions.
How To Use
- Set up Credentials: Ensure you have valid Google OAuth2 credentials configured for
Google Sheetsand OpenAI API credentials forOpenAI - n8n project. - Configure Google Sheets: Copy the provided Google Sheets file to your own Google Drive and update the
documentIdin theGet transactions by product name,Get all transactions,Get transactions by status, andRecords by datenodes with your sheet's URL. - Start Chatting: Use the "When chat message received" node to initiate a conversation with the AI agent. Ask questions related to your transaction data, such as:
- "How many refunds were there in January?"
- "What was the total income from completed sales in the last month?"
- "Find transactions for 'Widget A' that were completed."
- AI Agent Execution: The AI agent will interpret your query, select the most appropriate tool (e.g.,
Get transactions by date,Get transactions by product name,Calculator), and execute it. - Data Processing: The retrieved data from Google Sheets is processed by the
Codenode to convert it into a usable JSON format. - Aggregation and Response: The
Aggregatenode consolidates the processed data, and the AI agent then formulates a response, aiming to generate structured metadata in English and Chinese as requested. - Sub-workflow Interaction: The
Records by datetool, which calls theWhen Executed by Another Workflowtrigger, demonstrates how to execute a part of the workflow as a sub-workflow for more complex data retrieval logic.
Apps Used
Workflow JSON
{
"id": "b94e941d-bebb-4319-928c-0d25c696b0e3",
"name": "AI Data Analyst for Transaction Metadata Generation",
"nodes": 5,
"category": "Data Processing",
"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: b94e941d-bebb...
About the Author
DevOps_Master_X
Infrastructure Expert
Specializing in CI/CD pipelines, Docker, and Kubernetes automations.
Statistics
Related Workflows
Discover more workflows you might like
Search, Summarize Web Data with Perplexity, Gemini AI & Bright Data to Webhooks
Automate web scraping and data summarization using Bright Data and AI models like Google Gemini, sending structured output to webhooks.
Multilingual Metadata Generation from Gmail and Google Sheets
Automate structured metadata generation in English and Chinese by processing Gmail emails and Google Sheets data.
Generate Structured Metadata in English and Chinese
This workflow demonstrates how to generate structured metadata in both English and Chinese. It fetches data, processes it, and saves it in a structured format.