Testing with OneDrive, selecting one file

I’m trying to build a workflow that will trigger on a new file uploaded to OneDrive. The trigger works, but returns 36 items. My assumption is that once published, it would return N items, where the number of items is basically everything new since the last test.

Because of the large number of results from the trigger, it’s really difficult to test my workflow. I can’t seem to get my second node to only work with ONE result from the trigger. I tried using brackets in my expression to select the 0 item from the trigger, but it’s never valid.

How would I tell a node to use only the first result from a previous node?

I tried {{ $items('Microsoft OneDrive Trigger')[0].json.id }}, and that still executed N times, but only used the first ID. I literally just want to work with one item from the trigger, but I guess when one node outputs N items, it runs the next node N times. Anyway around that?

Ah, use Execute Once in the node setting.

1 Like