Log AI Agent Outputs to Google Sheets and Send Emails
detail.loadingPreview
This n8n workflow logs AI agent outputs, including actions and token usage, to a Google Sheet. It also retrieves contacts from Airtable and can create Google Calendar events or send emails.
🚀Ready to Deploy This Workflow?
About This Workflow
Overview
This n8n workflow is designed to capture and log the outputs of an AI agent, providing a detailed record of its operations. It leverages the power of Langchain's AI capabilities through OpenRouter, saving the results to a Google Sheet for easy analysis and tracking. Key features include logging the input, output, specific actions taken, token consumption, and the total cost of the AI interaction. Additionally, it integrates with Airtable to fetch contact information and offers the flexibility to create Google Calendar events or send emails, making it a comprehensive solution for managing and leveraging AI agent interactions.
Key Features
- Logs AI agent input, output, actions, token usage, and cost to a Google Sheet.
- Utilizes OpenAI's GPT-4.1-mini via OpenRouter for AI processing.
- Fetches contact data from Airtable.
- Option to create Google Calendar events.
- Option to send emails with customizable subject, send-to, and message fields.
How To Use
- Configure the '4.1-mini' node with your OpenRouter API credentials and select the desired model.
- Set up the 'Get Contacts' node to connect to your Airtable base and table.
- Configure the 'Create Event' or 'Send Email' nodes with your desired Google Calendar or Gmail credentials and parameters.
- Set up the 'Log' node to connect to your Google Sheet and define the columns for Timestamp, Workflow, Input, Output, Actions, Tokens, and Total Cost.
- Ensure the 'AI Agent' node (not fully shown in the snippet, but implied by the 'Output' and 'Actions' in the Log node) is configured to provide the necessary data structure.
- Connect the nodes in the desired sequence, ensuring the output from the AI agent is correctly mapped to the 'Log' node's input.
Apps Used
Workflow JSON
{
"id": "04f3bf89-52f2-442d-973f-d3bc1dff1ffb",
"name": "Log AI Agent Outputs to Google Sheets and Send Emails",
"nodes": 0,
"category": "AI Automation",
"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: 04f3bf89-52f2...
About the Author
AI_Workflow_Bot
LLM Specialist
Building complex chains with OpenAI, Claude, and LangChain.
Statistics
Verification Info
Related Workflows
Discover more workflows you might like
Automate Agent Outputs: Email, Calendar, and Logging with n8n
This n8n workflow leverages an OpenAI agent to process inputs, send emails via Gmail, create Google Calendar events, and log all activities to Google Sheets. It's ideal for automating communication and record-keeping based on AI-driven decisions.
Automate Live Stream Chat Moderation with AI and n8n
This n8n workflow uses AI to moderate live stream chats by splitting messages, generating embeddings, querying a vector store, and responding via an agent. It logs the interactions to Google Sheets for review.
AI-Powered Carbon Footprint Estimator Automation
This n8n workflow automates carbon footprint estimation using AI. It leverages Webhook, Langchain nodes (Splitter, Embeddings, Vector Store, Agent, Chat), and Google Sheets for logging to provide an intelligent carbon assessment.
AI-Powered Ticket Tagging and Evaluation Workflow
Automate ticket categorization and priority assessment using an AI agent. This workflow integrates with Gmail and Google Sheets to evaluate AI performance and track metrics.
Automated AI Newsletter Generation with Tavily and OpenRouter
This workflow automates AI-powered newsletter creation. It uses Tavily for initial research and OpenRouter agents for content generation and editing, sending drafts via Gmail.
Master n8n Hacks: Streamline Your Automation with AI
Explore a collection of n8n hacks, demonstrating how to integrate AI nodes like OpenAI and Perplexity for advanced automation. This workflow showcases practical examples of API requests, data manipulation, and dynamic content generation.