๐Ÿ”ฌ Ingest Excel data into Oracle and chat with it using Select AI and Azure OpenAI

โšก 137 views ยท ๐Ÿ”ฌ Document Extraction & Analysis

Description

Overview

This n8n workflow template enables querying Excel data stored in an Oracle Database using natural language powered by Oracle Select AI.

The solution consists of two workflows:

User questions are translated into SQL by Oracle Select AI, executed directly in the database, and returned as query results.

Features

Prerequisites

Oracle Database

Oracle Select AI supports the following AI providers:

Azure OpenAI

Oracle Credential for Azure OpenAI

Create an Oracle credential to securely store the Azure OpenAI API key:

BEGIN
  DBMS_CLOUD.CREATE_CREDENTIAL(
    credential_name => 'AZURE_OPENAI_CRED',
    username        => 'azure_openai',
    password        => 'YOUR_AZURE_OPENAI_API_KEY'
  );
END;
/

Select AI Configuration

In Workflow A, update the Select AI configuration node with your environment details:

{
  "profile_name": "EXCEL_AI",
  "provider": "azure",
  "azure_resource_name": "YOUR_RESOURCE_NAME",
  "azure_deployment_name": "YOUR_MODEL_DEPLOYMENT",
  "credential_name": "AZURE_OPENAI_CRED",
  "table_name": "AUTO_GENERATED"
}

Note: The table name is generated automatically during upload and should not be modified manually.

Usage

Upload Excel File (Workflow A)

Upload an Excel file using the webhook endpoint:

curl -X POST \
  -F "file=@your-file.xlsx" \
  https://your-n8n-instance.com/webhook/upload-excel

Expected Response

{
  "success": true,
  "tableName": "UPLOAD_EXCEL_20260209123456789",
  "columns": ["ID", "NAME", "AGE", "CITY", "SALARY"],
  "rowCount": 150,
  "selectAIProfile": "EXCEL_AI",
  "message": "Excel file successfully ingested and registered with Oracle Select AI",
  "nextSteps": [
    "Query your data using: SELECT AI EXCEL_AI <your question>",
    "Example: SELECT AI EXCEL_AI show me the top 10 records by salary"
  ]
}

The returned tableName is used internally by Workflow B to scope chat queries to the correct dataset.

Query Your Data with Select AI (Workflow B)

After the Excel file is uploaded and registered, you can query the data using natural language through Workflow B.

Example Select AI Queries

After uploading an Excel file, you can query the data using natural language.

Examples:

n8n Query Examples

Workflow B must be used together with Workflow A and must be configured with the same:

References

Oracle Select AI Documentation https://docs.oracle.com/en-us/iaas/autonomous-database-serverless/doc/select-ai-examples.html

Azure OpenAI Documentation https://learn.microsoft.com/azure/ai-services/openai/

Oracle LiveLabs โ€“ Select AI Workshop https://livelabs.oracle.com/ords/r/dbpm/livelabs/run-workshop?p210_wid=3831

๐Ÿ”— Nodes Used

Webhook, Extract from File, Chat Trigger, Oracle Database

๐Ÿ“ฅ Import

Download workflow.json and import into n8n: Workflow menu โ†’ Import from File

๐Ÿ“– Importing guide ยท ๐Ÿ”‘ Credential setup