Skip to content

PBA Bot - 1. Import Evaluation Dataset

This workflow imports evaluation questions from an Excel file into an Airtable database for the PBA (Performance-Based Assessment) Bot system. It reads structured question data, transforms it into the proper format, and creates records in Airtable for later use in bot evaluation processes.

Purpose

No business context provided yet — add a context.md to enrich this documentation.

How It Works

  1. Manual Trigger: The workflow starts when you click "Test workflow" in the n8n interface
  2. Excel File Reading: Reads the PBA_Bot_Evaluation_Dataset.xlsx file, starting from row 3 (header row) in Sheet1
  3. Data Transformation: Processes each row to create structured question records with proper formatting and validation
  4. Airtable Import: Creates new records in the Evaluation_Dataset table with question details
  5. Summary Generation: Provides a final count of successfully imported records

Workflow Diagram

graph TD
    A[Manual Trigger] --> B[Read Excel File]
    B --> C[Transform Data]
    C --> D[Import to Airtable]
    D --> E[Summary]

Trigger

Manual Trigger: This workflow runs on-demand when you click "Test workflow" in the n8n interface. It's designed for one-time or periodic imports of evaluation datasets.

Nodes Used

Node Type Node Name Purpose
Manual Trigger When clicking 'Test workflow' Starts the workflow manually
Spreadsheet File Read Excel File Reads data from PBA_Bot_Evaluation_Dataset.xlsx
Code Transform Data Cleans and structures the Excel data into proper format
Airtable Import to Airtable Creates records in the Evaluation_Dataset table
Code Summary Generates import completion summary

External Services & Credentials Required

  • Airtable: Requires Airtable credentials with write access to the specified base
    • Base ID: YOUR_BASE_ID (needs to be configured)
    • Table: Evaluation_Dataset

Environment Variables

No environment variables are used in this workflow. Configuration is done directly in the node parameters.

Data Flow

Input: Excel file (PBA_Bot_Evaluation_Dataset.xlsx) with columns: - Q# (Question number) - Section (Question category/section) - Question (The actual question text) - Answer (Expected answer/response)

Output: Airtable records with fields: - Question_ID (formatted as "Q{number}") - Question_Number (integer) - Section (text) - Question (text) - Expected_Answer (text) - Status (set to "Active")

Final Summary: JSON object with success status, message, and total record count.

Error Handling

  • Data Validation: The Transform Data node skips rows where Q# is not a valid number, preventing invalid data from being imported
  • Header Row Handling: Automatically filters out header rows during processing

No explicit error handling nodes are present in this workflow. Errors would cause the workflow to stop at the failing node.

Known Limitations

  • The workflow is currently archived and inactive
  • Requires manual file upload for each import
  • No duplicate detection - running multiple times may create duplicate records
  • Base ID is hardcoded and needs manual configuration
  • No rollback mechanism if import fails partway through

This appears to be part 1 of a PBA Bot workflow series. Other related workflows may include: - PBA Bot evaluation execution workflows - PBA Bot response analysis workflows

Setup Instructions

  1. Import Workflow: Import this workflow JSON into your n8n instance

  2. Configure Airtable Connection:

    • Set up Airtable credentials in n8n
    • Update the Base ID in the "Import to Airtable" node
    • Ensure the Evaluation_Dataset table exists with the required fields
  3. Prepare Excel File:

    • Create or obtain the PBA_Bot_Evaluation_Dataset.xlsx file
    • Ensure it has columns: Q#, Section, Question, Answer
    • Place header row at row 3 as configured
  4. Upload File:

    • In the "Read Excel File" node, upload your Excel file
    • Verify the sheet name is "Sheet1" or update accordingly
  5. Test Run:

    • Click "Test workflow" to run the import
    • Check the Summary node output for success confirmation
    • Verify records in your Airtable base
  6. Activate (if needed):

    • Currently archived - unarchive and activate if you want it available for regular use