← Microsoft OneDrive

New File of Types in Folder (Instant) from Microsoft OneDrive API

Pipedream makes it easy to connect APIs for Microsoft OneDrive and 800+ other apps remarkably fast.

Trigger workflow on
New File of Types in Folder (Instant) from the Microsoft OneDrive API
Next, do this
Connect to 800+ APIs using code and no-code building blocks
No credit card required
Into to Pipedream
Watch us build a workflow
Watch us build a workflow
7 min
Watch now ➜
Trusted by 250,000+ developers from startups to Fortune 500 companies:
Trusted by 250,000+ developers from startups to Fortune 500 companies

Developers Pipedream

Getting Started

Trigger a workflow on New File of Types in Folder (Instant) with Microsoft OneDrive API. When you configure and deploy the workflow, it will run on Pipedream's servers 24x7 for free.

  1. Configure the New File of Types in Folder (Instant) trigger
    1. Connect your Microsoft OneDrive account
    2. Configure Webhook subscription renewal schedule
    3. Optional- Select a Folder
    4. Select one or more File Types
  2. Add steps to connect to 800+ APIs using code and no-code building blocks
  3. Deploy the workflow
  4. Send a test event to validate your setup
  5. Turn on the trigger


This is a pre-built, open source component from Pipedream's GitHub repo. The component is developed by Pipedream and the community, and verified and maintained by Pipedream.

To contribute an update to an existing component or create a new component, create a PR on GitHub. If you're new to Pipedream component development, you can start with quickstarts for trigger span and action development, and then review the component API reference.

New File of Types in Folder (Instant) on Microsoft OneDrive
Description:Emit an event when a new file of a specific type is created under a directory tree in a OneDrive drive


import onedrive from "../../microsoft_onedrive.app.mjs";
import base from "../common/base.mjs";

export default {
  type: "source",
  key: "microsoft_onedrive-new-file-of-types-in-folder",
  name: "New File of Types in Folder (Instant)",
  description: "Emit an event when a new file of a specific type is created under a directory tree in a OneDrive drive",
  version: "0.0.1",
  dedupe: "unique",
  props: {
    folder: {
      propDefinition: [
      description: "The OneDrive folder to watch for new files (leave empty to watch the entire drive)",
      optional: true,
    fileTypes: {
      propDefinition: [
  methods: {
    isItemTypeRelevant(driveItem) {
      const fileType = driveItem?.file?.mimeType;
      return (
        base.methods.isItemTypeRelevant.call(this, driveItem) &&


This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI and CLI.
Microsoft OneDriveonedriveappThis component uses the Microsoft OneDrive app.
N/Adb$.service.dbThis component uses $.service.db to maintain state between component invocations.
N/Ahttp$.interface.httpThis component uses $.interface.http to generate a unique URL when the component is first instantiated. Each request to the URL will trigger the run() method of the component.
Webhook subscription renewal scheduletimer$.interface.timer

The OneDrive API requires occasional renewal of webhook notification subscriptions.This runs in the background, so you should not need to modify this schedule.

FolderfolderstringSelect a value from the drop down menu.
File TypesfileTypesstring[]Select a value from the drop down menu:{ "label": "AAC audio (.aac)", "value": "audio/aac" }{ "label": "AbiWord document (.abw)", "value": "application/x-abiword" }{ "label": "Archive document (multiple files embedded) (.arc)", "value": "application/x-freearc" }{ "label": "AVI: Audio Video Interleave (.avi)", "value": "video/x-msvideo" }{ "label": "Amazon Kindle eBook format (.azw)", "value": "application/vnd.amazon.ebook" }{ "label": "Any kind of binary data (.bin)", "value": "application/octet-stream" }{ "label": "Windows OS/2 Bitmap Graphics (.bmp)", "value": "image/bmp" }{ "label": "BZip archive (.bz)", "value": "application/x-bzip" }{ "label": "BZip2 archive (.bz2)", "value": "application/x-bzip2" }{ "label": "C-Shell script (.csh)", "value": "application/x-csh" }{ "label": "Cascading Style Sheets (CSS) (.css)", "value": "text/css" }{ "label": "Comma-separated values (CSV) (.csv)", "value": "text/csv" }{ "label": "Microsoft Word (.doc)", "value": "application/msword" }{ "label": "Microsoft Word (OpenXML) (.docx)", "value": "application/vnd.openxmlformats-officedocument.wordprocessingml.document" }{ "label": "MS Embedded OpenType fonts (.eot)", "value": "application/vnd.ms-fontobject" }{ "label": "Electronic publication (EPUB) (.epub)", "value": "application/epub+zip" }{ "label": "GZip Compressed Archive (.gz)", "value": "application/gzip" }{ "label": "Graphics Interchange Format (GIF) (.gif)", "value": "image/gif" }{ "label": "HyperText Markup Language (HTML) (.htm or .html)", "value": "text/html" }{ "label": "Icon format (.ico)", "value": "image/vnd.microsoft.icon" }{ "label": "iCalendar format (.ics)", "value": "text/calendar" }{ "label": "Java Archive (JAR) (.jar)", "value": "application/java-archive" }{ "label": "JPEG images (.jpeg or .jpg)", "value": "image/jpeg" }{ "label": "JavaScript (.js)", "value": "text/javascript" }{ "label": "JSON format (.json)", "value": "application/json" }{ "label": "JSON-LD format (.jsonld)", "value": "application/ld+json" }{ "label": "Musical Instrument Digital Interface (MIDI) (.mid)", "value": "audio/midi audio/x-midi" }{ "label": "JavaScript module (.mjs)", "value": "text/javascript" }{ "label": "MP3 audio (.mp3)", "value": "audio/mpeg" }{ "label": "CD audio (.cda)", "value": "application/x-cdf" }{ "label": "MP4 audio (.mp4)", "value": "video/mp4" }{ "label": "MPEG Video (.mpeg)", "value": "video/mpeg" }{ "label": "Apple Installer Package (.mpkg)", "value": "application/vnd.apple.installer+xml" }{ "label": "OpenDocument presentation document (.odp)", "value": "application/vnd.oasis.opendocument.presentation" }{ "label": "OpenDocument spreadsheet document (.ods)", "value": "application/vnd.oasis.opendocument.spreadsheet" }{ "label": "OpenDocument text document (.odt)", "value": "application/vnd.oasis.opendocument.text" }{ "label": "OGG audio (.oga)", "value": "audio/ogg" }{ "label": "OGG video (.ogv)", "value": "video/ogg" }{ "label": "OGG (.ogx)", "value": "application/ogg" }{ "label": "Opus audio (.opus)", "value": "audio/opus" }{ "label": "OpenType font (.otf)", "value": "font/otf" }{ "label": "Portable Network Graphics (.png)", "value": "image/png" }{ "label": "Adobe Portable Document Format (PDF) (.pdf)", "value": "application/pdf" }{ "label": "Hypertext Preprocessor (.php)", "value": "application/x-httpd-php" }{ "label": "Microsoft PowerPoint (.ppt)", "value": "application/vnd.ms-powerpoint" }{ "label": "Microsoft PowerPoint (OpenXML) (.pptx)", "value": "application/vnd.openxmlformats-officedocument.presentationml.presentation" }{ "label": "RAR archive (.rar)", "value": "application/vnd.rar" }{ "label": "Rich Text Format (RTF) (.rtf)", "value": "application/rtf" }{ "label": "Bourne shell script (.sh)", "value": "application/x-sh" }{ "label": "Scalable Vector Graphics (SVG) (.svg)", "value": "image/svg+xml" }{ "label": "Small web format (SWF) or Adobe Flash document (.swf)", "value": "application/x-shockwave-flash" }{ "label": "Tape Archive (TAR) (.tar)", "value": "application/x-tar" }{ "label": "Tagged Image File Format (TIFF) (.tif or .tiff)", "value": "image/tiff" }{ "label": "MPEG transport stream (.ts)", "value": "video/mp2t" }{ "label": "TrueType Font (.ttf)", "value": "font/ttf" }{ "label": "Text (.txt)", "value": "text/plain" }{ "label": "Microsoft Visio (.vsd)", "value": "application/vnd.visio" }{ "label": "Waveform Audio Format (.wav)", "value": "audio/wav" }{ "label": "WEBM audio (.weba)", "value": "audio/webm" }{ "label": "WEBM video (.webm)", "value": "video/webm" }{ "label": "WEBP image (.webp)", "value": "image/webp" }{ "label": "Web Open Font Format (WOFF) (.woff)", "value": "font/woff" }{ "label": "Web Open Font Format (WOFF) (.woff2)", "value": "font/woff2" }{ "label": "XHTML (.xhtml)", "value": "application/xhtml+xml" }{ "label": "Microsoft Excel (.xls)", "value": "application/vnd.ms-excel" }{ "label": "Microsoft Excel (OpenXML) (.xlsx)", "value": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }{ "label": "XML (.xml)", "value": "application/xml" }{ "label": "XUL (.xul)", "value": "application/vnd.mozilla.xul+xml" }{ "label": "ZIP archive (.zip)", "value": "application/zip" }{ "label": "3GPP audio-only container (.3gp)", "value": "audio/3gpp" }{ "label": "3GPP audio/video container (.3gp)", "value": "video/3gpp" }{ "label": "3GPP2 audio-only container (.3g2)", "value": "audio/3gpp2" }{ "label": "3GPP2 audio/video container (.3g2)", "value": "video/3gpp2" }{ "label": "7-zip archive (.7z)", "value": "application/x-7z-compressed" }


Microsoft OneDrive uses OAuth authentication. When you connect your Microsoft OneDrive account, Pipedream will open a popup window where you can sign into Microsoft OneDrive and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Microsoft OneDrive API.

Pipedream requests the following authorization scopes when you connect your account:


About Microsoft OneDrive

Personal cloud storage