Skip to main content

🎓 Learn evaluate tool. Tutorial for beginners with Gemini and Google Sheets

Workflow preview

Workflow preview
100%
🎓 Learn evaluate tool. Tutorial for beginners with Gemini and Google Sheets preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

This workflow is a beginner friendly tutorial demonstrating how to use the Evaluation tool to automatically score the AI’s output against a known correct answer (“ground truth”) stored in a Google ...

Best for

  • Engineering automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.evaluationtrigger, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.toolcalculator, @n8n/n8n-nodes-langchain.lmchatgooglegemini, n8n-nodes-base.manualtrigger, n8n-nodes-base.evaluation, n8n-nodes-base.noop, n8n-nodes-base.set

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Davide.

Original n8n.io source

1.1 Workflow description

Title
🎓 Learn evaluate tool. Tutorial for beginners with Gemini and Google Sheets
Workflow name
🎓 Learn evaluate tool. Tutorial for beginners with Gemini and Google Sheets

This workflow is a beginner-friendly tutorial demonstrating how to use the Evaluation tool to automatically score the AI’s output against a known correct answer (“ground truth”) stored in a Google Sheet.


Advantages

  • Beginner-friendly – Provides a simple and clear structure to understand AI evaluation.
  • Flexible input sources – Works with both Google Sheets datasets and manual test entries.
  • Integrated with Google Gemini – Leverages a powerful AI model for text-based tasks.
  • Tool usage – Demonstrates how an AI agent can call external tools (e.g., calculator) for accurate answers.
  • Automated evaluation – Outputs are automatically compared against ground truth data for factual correctness.
  • Scalable testing – Can handle multiple dataset rows, making it useful for structured AI model evaluation.
  • Result tracking – Saves both answers and correctness scores back to Google Sheets for easy monitoring.

How it Works

The workflow operates in two distinct modes, determined by the trigger:

  1. Manual Test Mode: Triggered by "When clicking 'Execute workflow'". It sends a fixed question ("How much is 8 * 3?") to the AI agent and returns the answer to the user. This mode is for quick, ad-hoc testing.
  2. Evaluation Mode: Triggered by "When fetching a dataset row". This mode reads rows of data from a linked Google Sheet. Each row contains an input (a question) and an expected_output (the correct answer). It processes each row as follows:
    • The input question is sent to the AI Agent node.
    • The AI Agent, powered by a Google Gemini model and equipped with a Calculator tool, processes the question and generates an answer (output).
    • The workflow then checks if it's in evaluation mode.
    • Instead of just returning the answer, it passes the AI's actual_output and the sheet's expected_output to another Evaluation node.
    • This node uses a second Google Gemini model as a "judge" to evaluate the factual correctness of the AI's answer compared to the expected one, generating a Correctness score on a scale from 1 to 5.
    • Finally, both the AI's actual_output and the automated correctness score are written back to a new column in the same row of the Google Sheet.

Set up Steps

To use this workflow, you need to complete the following setup steps:

  1. Credentials Configuration:

    • Set up the Google Sheets OAuth2 API credentials (named "Google Sheets account"). This allows n8n to read from and write to your Google Sheet.
    • Set up the Google Gemini (PaLM) API credentials (named "Google Gemini(PaLM) (Eure)"). This provides the AI language model capabilities for both the agent and the evaluator.
  2. Prepare Your Google Sheet:

    • The workflow is pre-configured to use a specific Google Sheet. You must clone the provided template sheet (the URL is in the Sticky Note) to your own Google Drive.
    • In your cloned sheet, ensure you have at least two columns: one for the input/question (e.g., input) and one for the expected correct answer (e.g., expected_output). You may need to update the node parameters that reference $json.input and $json.expected_output to match your column names exactly.
  3. Update Document IDs:

    • After cloning the sheet, get its new Document ID from its URL and update the documentId field in all three Evaluation nodes ("When fetching a dataset row", "Set output Evaluation", and "Set correctness") to point to your new sheet instead of the original template.
  4. Activate the Workflow:

    • Once the credentials and sheet are configured, toggle the workflow to Active. You can then trigger a manual test run or set the "When fetching a dataset row" node to poll your sheet automatically to evaluate all rows.

Need help customizing?

Contact me for consulting and support or add me on Linkedin.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - When fetching a dataset row

Type / Role
n8n-nodes-base.evaluationTrigger - evaluationTrigger
Config choices
Version 4.6

Block 2 - AI Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2.2

Block 3 - Calculator

Type / Role
@n8n/n8n-nodes-langchain.toolCalculator - toolCalculator
Config choices
Version 1

Block 4 - Google Gemini Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - lmChatGoogleGemini
Config choices
Version 1

Block 5 - Google Gemini Chat Model1

Type / Role
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - lmChatGoogleGemini
Config choices
Version 1

Block 6 - When clicking ‘Execute workflow’

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 7 - Evaluation?

Type / Role
n8n-nodes-base.evaluation - evaluation
Config choices
Version 4.7

Block 8 - Return chat response

Type / Role
n8n-nodes-base.noOp - noOp
Config choices
Version 1

Block 9 - Set output Evaluation

Type / Role
n8n-nodes-base.evaluation - evaluation
Config choices
Version 4.7

Block 10 - Get output

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 11 - Get input

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 12 - Get manual input

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 13 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 14 - Corectness

Type / Role
n8n-nodes-base.evaluation - evaluation
Config choices
Version 4.7

Block 15 - Set correctness

Type / Role
n8n-nodes-base.evaluation - evaluation
Config choices
Version 4.7

3. Summary Table

Workflow 🎓 Learn evaluate tool. Tutorial for beginners with Gemini and Google Sheets
Complexity advanced
Nodes 15
Categories Engineering, AI Summarization
Author Davide
Published 03 Sept 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/8227/8227.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does 🎓 Learn evaluate tool. Tutorial for beginners with Gemini and Google Sheets do?

This workflow is a beginner friendly tutorial demonstrating how to use the Evaluation tool to automatically score the AI’s output against a known correct answer (“ground truth”) stored in a Google ...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Engineering, AI Summarization use case.