View as Markdown
Sharepoint icon

Sharepoint ACTION

Find File by Name

Search the site's default drive for files or folders matching a query. Matches are recursive across the drive and span filename, metadata, and file content — this is not an exact filename lookup, and results are relevance-ranked.

Backed by the SharePoint Search index and eventually consistent, so newly created, renamed, or moved items may not appear until SharePoint reindexes them.

For exact, immediately-consistent lookups, prefer:

  • Get File by ID when the ID is known
  • Search and Filter Files for OData $filter against a list/document library

See the documentation

  • Action
  • Read only
  • OAuth
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Sharepoint account once, then configure and run Find File by Name from your backend or agent.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "sharepoint-find-file-by-name",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    sharepoint: { authProvisionId: "apn_xxxxxxx" },
    siteId: "Site",
    name: "File Name",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Find File by Name inputs
Property Type Description
siteId Site string
Identifier of a site. This is either the composite ID (e.g. contoso.sharepoint.com,<guid>,<guid> or a server-relative path in the form {hostname}:/{server-relative-path} (e.g. contoso.sharepoint.com:/sites/site-name)
Required Dynamic
name File Name string
The name of the file or folder to search for
Required
returnContentType Return Content Type string
The content type to return
Required
select Select string[]
Use Select to choose only the properties your app needs, as this can lead to performance improvements. E.g. ["name", "id", "createdDateTime"]
Optional

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
sharepoint-find-file-by-name
Version
0.1.10
App
Sharepoint
Authentication
OAuth
Read-only
Yes
Destructive
No
Open world
Yes