Transform Clipboard Contents not transforming clipboard contents despite successful test

Hi! First post here after using BTT for over a decade now, so I'm sorry if I'm duplicating a question that I wasn't able to find during a search or don't provide the correct information. Basically:

I have a keyboard shortcut which copies some text to the clipboard; I use BTT to link a gesture to this keyboard shortcut. For this particular text, I always want to wrap it in double quotes, so I tried adding a "Transform Clipboard Contents with Java Script" action after the keyboard shortcut action.

I don't really know any java, but figured that the following would work:

async (clipboardContentString) => {
   return '"' + clipboardContentString + '"'
}

and indeed, when fed the example text, Test Execute does return "text" as desired. However, whenever I actually try to use this trigger, it only does the first action (running the keyboard shortcut which copies this text to the clipboard) and does not add the quotation marks. I had wondered if perhaps it was a permissions issue, but I doubt that this could be the case because I have another trigger which takes a screenshot and copies it to the clipboard. (Restarting the app did not fix this.)

I'm on a 2024 MBP runing Sequoia 15.2. Any insights as to how I might fix this? Thanks!

Can you give more info about your config? I've tried with the following but it is working:

However you said that you are using "gesture", so are you using the trackpad? I've also tried with the following and it is working as well:

Right—the "gesture" here is just a three-finger click, which corresponds the keyboard shortcut you see in the image. That keyboard shortcut (successfully!) copies a file path without the single quotation marks to the clipboard (this is a quick action which I've bound to that keyboard shortcut).

you might need to add a minimal delay (0.1s) between the cmd+c and transformer. Alternatively - if you are on the latest alpha, you can add the "Wait For Clipboard Content Change" action inbetween

BTT sends cmd+c immediately however it doesn't know when the clipboard has actually changed, this can take a few ms

I forgot to mention that I had tried that as well—I believe I even tried a 500ms delay. I'll try again tomorrow when I'm back at my work computer, and try the alpha build if that doesn't work!

Does your shift+opt+cmd+c shortcut actually copy something to the clipboard?

yes—the keyboard shortcut itself copies the file path, as does the gesture (regardless of the presence of the clipboard modification action).

Adding a delay (async or not, from .1s to .5s) didn't fix it. Updating to alpha didn't fix it on its own (just as a test), but the new "Wait for Clipboard Content Change" did fix it. Thanks Andreas! (and thanks so much for the app—I recommend it to every mac user I know!)