I’m currently working with the Premiere Pro UXP API to develop an extension, and I’m trying to add all clips from a specific folder in the project panel to a sequence in one operation. While exploring the documentation, I found classes like Sequence, ClipProjectItem, and AudioClipTrackItem, but I couldn’t identify a clear way to accomplish this task programmatically.
Here’s the workflow I’m aiming to implement:
Select a folder in the project panel that contains multiple clips.
Add all clips from that folder into a specific sequence (Sequence) at sequential timecodes, starting from the beginning of the sequence.
From my research, it seems there’s no direct API in UXP to add clips to a sequence programmatically, as was possible with the insertClip method in CEP. Could you confirm if this functionality exists in the UXP API? If not, is there any alternative or workaround to achieve this goal?
Any insights, examples, or related documentation would be greatly appreciated.
Unfortunately yes, these APIs are not available in UXP right now (specifically, the equivalent of insertClip API and getSelection API for getting selected folder)… We are actively working on testing and getting those API published.
I don’t see any workaround to achieve the workflow at this point. The closest thing available is to use project.createSequenceFromMedia to create a sequence with input clip like sample code below:
// say you get a valid `ProjectItem` that can be casted to `ClipProjectItem` (= a projectItem that represent clip in project panel) and `Project` instance
const clipProjectItem = ppro.ClipProjectItem.cast(projectItem);
// create a new sequence that has input sequence name and input clip at beginning of timeline
await project.createSequenceFromMedia(sequenceName, clipProjectItem);
Thanks so much for trying out and looking into UXP!
I see, you’re right - the single-clip limitation of createSequenceFromMedia is quite restrictive for our needs. Given this constraint, we’ll continue with the CEP implementation for now.
Really excited to hear that you’re actively working on the insertClip and getSelection APIs for UXP! These will be game-changing additions that will enable much more flexible sequence manipulation workflows.
Keep up the great work on UXP development! Looking forward to the updates and new APIs. Please keep us posted on the development progress!
Hello!
It looks like this might now be possible using the new SequenceEditor.createInsertProjectItemAction() method. If so, can you help me with a bit of sample code please? I’ve tried getting it to work myself, but I keep getting the error “Script Action failed to execute.”
I’ll paste my code below. The error happens at line 19, and it stops before it even gets to the executeAction() function (line 28). For context, my Premiere project just consists of a sequence called “Main Sequence” and a video clip called “Iceberg.MOV”.
I’m running the latest version of the Premiere Pro beta app (25.3.0 build 34).
My seqEditor variable is of the right type (SequenceEditor object).
All of the parameters passed in the createInsertProjectItemAction() method are of the right type (projectItem, TickTime, numbers, booleans).
Tried changing the value of the limitShift parameter (true/false, 0/1 etc).
Tried different types of items to insert (video clip, sequence, adjustment layer, color matte etc).
I’ve also tried searching online for help, but Google literally returns zero pages discussing this method except for the Adobe documentation page and the Creative Cloud Developer forum page announcing its release 11 days ago (March 19, 2025).
If you have any ideas on how I can get it to work, or if you can spot any errors in my code please let me know. Thanks!
I posted the same question over at the Adobe Community Forums, and someone pointed me to the sample plugin at this github repository, which helped me get my code working!
Previously, I tried to execute the createInsertProjectItemAction() method and assign it to a variable first, then pass that variable into my executeAction() function, then into the executeTransaction() method.
But it seems that the createInsertProjectItemAction() method only works correctly when nested inside of the executeTransaction() method.
Below is my working code:
const app = require("premierepro");
// Insert a specified item into the main timeline
async function insertItem() {
try {
const project = await app.Project.getActiveProject();
const rootItem = await project.getRootItem();
const items = await rootItem.getItems();
const mainSequence = await project.getActiveSequence();
const seqEditor = await app.SequenceEditor.getEditor(mainSequence);
const insertionTime = await app.TickTime.createWithSeconds(3);
const onlyShiftInputTrack = true; // False = split & shift ALL tracks at insertion point
var itemToInsert;
// Specify item to insert
for (i=0; i<items.length; i++) {
if (items[i].name == "Iceberg.MOV") {
itemToInsert = items[i];
break;
}
}
// Create & Execute the Insertion Action
project.lockedAccess(() => {
project.executeTransaction ((compoundAction) => {
actInsertProjItem = seqEditor.createInsertProjectItemAction(itemToInsert, insertionTime, 0, 0, onlyShiftInputTrack);
compoundAction.addAction(actInsertProjItem);
})
});
} catch (err) {
console.error(err);
}
}
document.querySelector("#btnPopulate").addEventListener("click", insertItem);
Hopefully this can help someone else in the future.