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.
CREATE TABLEINSERTEXECUTE on DBMS_CLOUD_AIOracle Select AI supports the following AI providers:
gpt-4, gpt-4o-mini)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;
/
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.
Upload an Excel file using the webhook endpoint:
curl -X POST \
-F "[email protected]" \
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.
After the Excel file is uploaded and registered, you can query the data using natural language through Workflow B.
After uploading an Excel file, you can query the data using natural language.
Examples:

Workflow B must be used together with Workflow A and must be configured with the same:
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