Why is my Pipedream workflow not pulling MP3 files from a new sub-folder on OneDrive and transcribing them in Notion?

This topic was automatically generated from Slack. You can find the original thread here.

Hi All, I have a pipedream workflow that pulls an MP3 file from a OneDrive folder then uses ChatGPT to create a transcript in Notion.
I used a test files while I was creating the workflow and it was working great. After changing the source to a new sub-folder I don’t see any events occurring.
I’ve double checked things and there are a couple of files that have been created in the folder.
I’m very new to Pipedream and Notion.
Anyone able to provide some guidance on what I should look at?

Could you share your onedrive souce configuration here?

**import** onedrive **from** "../../microsoft_onedrive.app.mjs";
**import** sampleEmit **from** "./test-event.mjs";
**import** base **from** "../common/base.mjs";

export **default** {
...base,
type: "source",
key: "microsoft_onedrive-new-file-in-folder",
name: "New File in Folder (Instant)",
description: "Emit an event when a new file is added to a specific directory tree in a OneDrive drive",
version: "0.1.0",
dedupe: "unique",
props: {
...base.props,
folder: {
propDefinition: [
onedrive,
"folder",
],
},
},
methods: {
...base.methods,
getDeltaLinkParams() {
**return** {
folderId: **this**.folder,
};
},
isItemRelevant(driveItem) {
**return** !!(driveItem.file);
},
},
sampleEmit,
};

That guy?

So with some fumbling around I got the workflow to process two more files. And now it’s stopped working again

Error log has this
2024-02-05T19:26:34
error
TypeError: Cannot read properties of undefined (reading ‘file’)
at Object.isItemRelevant (file:///var/task/user/sources/new-file-in-folder/new-file-in-folder.mjs:30:27)
at Object._processEventsFromDeltaLink (file:///var/task/user/sources/common/base.mjs:165:15)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.run (file:///var/task/user/sources/common/base.mjs:294:3)
at async /var/task/index.js:122:11
at async captureObservations (/var/task/node_modules/@lambda-v2/component-runtime/src/captureObservations.js:28:5)
at async exports.main [as handler] (/var/task/index.js:60:20)

Sorry I mean how you set the props for your souce. I need steps to reproduce your issue.

As in the Trigger settings?

Yes in the trigger settings

Thanks, I’ll try to reproduce and get back to you soon

Ok, so if I drag an drop a file into the OneDrive web page the workflow triggers
If the file gets created on my PC and synced to the cloud I don’t get anything triggered. I get the error I pasted above.
Once I get that error it seems the workflow is stuck in that state an nothing is triggered

It’s quite weird that it works fine on my side (1st image below). But I still think this might be an issue with the trigger. I’ve created a ticket here for Component Dev to take a look: [BUG] OneDrive - New File in Folder trigger does not emit event · Issue #10225 · PipedreamHQ/pipedream · GitHub

Oh nice catch! I didn’t think of the Cloud sync. I’ve updated the ticket