OneDrive, SharePoint and Excel
List and search files, read Excel worksheets and tables, add rows, and list a site's drives.
A OneDrive, SharePoint and Excel connection gives a playbook's functions twelve operations of Microsoft Graph, from a document Auto ships, on your drives, your workbooks and the SharePoint sites you can read. You sign in with your work account and allow access, and the connection acts as you.
Available on Auto Cloud and on self-hosted runtimes.
What a playbook can do with OneDrive, SharePoint and Excel
- List and search your OneDrive, read a file's details, and list a folder.
- Read an Excel workbook's worksheets, a range of cells, and its tables and their rows.
- Add a worksheet, and add rows to a table.
- List a SharePoint site's drives.
It fetches no file's bytes: a function reads a workbook's cells through the Excel operations, not by downloading the file, and an answer may carry a link that downloads a file for a person. A Word document's or a PDF's text is not read through this connection.
The tools, as the connection lists them
Tools that read: me.GetDrive, drives.drive.search, drives.items.ListChildren, drives.GetItems, drives.items.workbook.ListWorksheets, drives.drive.items.driveItem.workbook.worksheets.workbookWorksheet.range-b0fa, drives.drive.items.driveItem.workbook.worksheets.workbookWorksheet.usedRange-5ff6, drives.items.workbook.ListTables, drives.items.workbook.tables.ListRows and sites.ListDrives.
Tools that act: drives.drive.items.driveItem.workbook.worksheets.add and drives.drive.items.driveItem.workbook.tables.workbookTable.rows.add.
An example workflow
A weekly roll-up into the team's tracker. A schedule trigger runs the workflow on Friday at 17:00. A lookup function reads the "Pipeline" table of the sales workbook in the team's SharePoint site. A second lookup function reads this week's closed deals from a HubSpot connection. A computation function matches the two by deal name, works out what changed, and shapes one row per deal for the "Weekly" table: the date, the stage, the amount, the delta. An interaction function adds the rows to the "Weekly" table with the add-rows operation, so the workbook the team already opens on Monday has the week in it. A reasoning function then reads the new rows and writes three lines of commentary, which an interaction function posts to the sales channel through a Microsoft Teams connection. The run's history in Studio keeps every row read and added.
How to connect OneDrive, SharePoint and Excel
- Sign in with your work account and allow access to your files and the SharePoint sites you can read. Your tenant's consent policy may require an administrator to allow Auto once, as Microsoft's default policy for new tenants does for files and sites. The consent screen shows the permissions listed below.
Then:
- Ask your agent to connect OneDrive, SharePoint and Excel to Auto, or open Settings, Agents, Connections in Auto Studio and choose OneDrive, SharePoint and Excel.
- On the Studio page, check the service and its access, choose which playbooks may use the connection, and approve it.
- Have your agent check one small read through the connection before a function depends on it.
What it needs
- A work or school account in a Microsoft 365 tenant with OneDrive, and SharePoint where the playbook reads a site.
- If your tenant's policy requires it, an administrator who allows Auto once; Microsoft's default policy for new tenants requires that for
Files.ReadWrite.AllandSites.Read.All. - Your agent connected to Auto and signed in as you, with permission to change your organization, if your agent adds the connection.
- On a self-hosted runtime, an application registered in Microsoft Entra for the runtime, since Microsoft registers no client itself, as Let people add connections sets out.
Microsoft grants files as one read-and-write scope; the connection's operations delete nothing and change only what the Excel operations add.
Permissions Auto asks for
- Read, create, change and delete all OneDrive and SharePoint files the person who connects can reach.
- Read documents and list items in the SharePoint sites the person who connects can reach.
- Keep access to OneDrive and SharePoint when nobody is signed in.
Good to know
A workbook is read by its id or its path within a drive; your agent finds it with the search operation first. What a function reads, a range of cells for example, is kept in the run's history, where people with access to the playbook can read it.