sharepointexcel

N8N node for reading Excel tables from SharePoint and performing table lookups

Package Information

Downloads: 408 weekly / 408 monthly
Latest Version: 1.0.4

Documentation

N8N SharePoint Excel Node

An N8N community node that allows you to read Excel tables from SharePoint and perform table lookups.

Features

  • Get Table: Retrieve all data from a named Excel table in SharePoint
  • Lookup: Search for values in a table column and return matching rows
  • Get Table Names: List all table names in an Excel file
  • Multiple Match Types: Exact match, contains, starts with, ends with
  • Flexible Output: Return all matches or just the first one

Installation

Via NPM (Recommended)

N8N will automatically detect and install this node when you use it in a workflow, or you can install it manually:

npm install n8n-nodes-sharepointexcel

Manual Installation

  1. Install dependencies:
npm install
  1. Build the node:
npm run build
  1. Copy the dist folder to your N8N custom nodes directory:
    • For Docker: /home/node/.n8n/custom/
    • For npm: ~/.n8n/custom/

Setup

Azure AD App Registration

  1. Go to Azure Portal → Azure Active Directory → App registrations
  2. Create a new registration
  3. Note your Application (client) ID and Directory (tenant) ID
  4. Go to "Certificates & secrets" → Create a new client secret
  5. Go to "API permissions" → Add permissions:
    • Microsoft Graph → Delegated permissions:
      • Files.Read.All
      • Sites.Read.All
    • Click "Grant admin consent"

N8N Credentials Setup

  1. In N8N, go to Credentials → Add Credential
  2. Select "SharePoint OAuth2 API"
  3. Enter your:
    • Client ID: Your Azure AD Application ID
    • Client Secret: Your Azure AD Client Secret
    • Tenant ID: Your Azure AD Tenant ID
  4. Complete the OAuth2 flow to authorize access

Usage

Get Table Names

  1. Add the "SharePoint Excel" node to your workflow
  2. Select operation: "Get Table Names"
  3. Enter:
    • SharePoint Site URL: https://yourtenant.sharepoint.com/sites/yoursite
    • File Path: /Shared Documents/MyFile.xlsx
  4. Execute to get a list of all table names

Get Table Data

  1. Select operation: "Get Table"
  2. Enter:
    • SharePoint Site URL: Your SharePoint site URL
    • File Path: Path to your Excel file
    • Table Name: Name of the Excel table (e.g., "Table1")
  3. Execute to get all rows from the table

Table Lookup

  1. Select operation: "Lookup"
  2. Enter:
    • SharePoint Site URL: Your SharePoint site URL
    • File Path: Path to your Excel file
    • Table Name: Name of the Excel table
    • Lookup Column: Column name to search in
    • Lookup Value: Value to search for
    • Match Type: How to match (exact, contains, startsWith, endsWith)
    • Return All Matches: Whether to return all matches or just the first
  3. Execute to get matching rows

Example Workflow

Trigger → SharePoint Excel (Get Table Names) → 
SharePoint Excel (Lookup) → Process Results

File Path Format

The file path should be relative to the SharePoint site root:

  • /Shared Documents/MyFile.xlsx
  • /Documents/Reports/Data.xlsx
  • /SiteAssets/Data/Table.xlsx

Excel Table Requirements

  • The Excel file must contain named tables (created via Insert → Table in Excel)
  • Table names are case-sensitive
  • Column names are taken from the table header row

Troubleshooting

"Table not found" error

  • Ensure the table name matches exactly (case-sensitive)
  • Verify the table exists in the Excel file
  • Use "Get Table Names" operation to list available tables

Authentication errors

  • Verify your Azure AD app has the correct permissions
  • Ensure admin consent has been granted
  • Check that the OAuth2 flow completed successfully

File not found

  • Verify the file path is correct
  • Ensure the path starts with /
  • Check that the file exists in SharePoint

Development

# Build
npm run build

# Watch mode
npm run dev

# Lint
npm run lint

License

MIT

Discussion