Blog about anything related to my learnings
  • About
  • posts
bluesky
Blog about anything related to my learnings
POSTS

How to Import Tab-Delimited Data to a SharePoint List with Power Automate

Importing data from Excel to SharePoint using table structure

However the offset function does not work within Excel can cater up to 256 rows

Saving as tab delimited from Excel produced the .txt file. The issue using CSV format is Path and Folder Name has commas. The way I am manipulating the CSV is breaking the raw data into lines (split by new lines) and columns (split by commas). The split by commas produce variable number of columns depending on commas in the values. So far with tab delimited files, the results are more reliable.

1.Trigger: Use the “When a file is created (properties only)” SharePoint trigger. Set it to monitor the folder where your tab-delimited files are uploaded.

2.Initialize Variables:

Add an “Initialize variable” action for your SharePoint site URL.

3.Get File Content: Use “Get file content” to retrieve the uploaded file’s data.

4.Parse File Content:

Add a “Compose” action for the newline character (\n). The trick is to click enter within the input of the compose action

Add another “Compose” for the tab character (\t). I could click tab on the input of the compose action and had to copy the tab from a notepad to paste it into the compose field.

Use a “Compose” action to split the file content by newlines, skipping the header row.

skip(split(body('Get_file_content'),outputs('NewLine')),1)

5.Filter Data: Use a “Filter array” action to remove empty or invalid rows.

and(
  not(equals(trim(split(item(), outputs('tab'))[0]), '')),
  not(equals(trim(split(item(), outputs('tab'))[3]), 'Empty')),
    not(equals(trim(split(item(), outputs('tab'))[5]), ''))
)

6.Apply to Each Row: Use “Apply to each” to loop through filtered rows:

Inside, use “Create item” (SharePoint) to add each row to your SharePoint List. Use expressions to split each row by tab and map columns to SharePoint fields.

split(item(),outputs('tab'))?[1]

7.Move Processed File: After processing, use “Send an HTTP request to SharePoint” to move the file to a “Processed” folder.

Tip: Use expressions like split(item(), ‘\t’)?[0] to access each column in a row.

This flow automates importing tab-delimited data into SharePoint, ensuring only valid rows are added and files are organized after processing.

    © Blog about anything related to my learnings 2025
    bluesky