You will need a recursive layer to go through all the layers in groups. So this script will do that. You will need to change the name of the layer that you're looking for in line 11. You will also have to change the kind of layer that you want, also in line 11. If you don't want both conditions to meet: layer name and kind, then change the '||' to '&&'. You will also need to go in and change the parameters of the bevel function to what you want. You can record that code with scriptListener.
#target Photoshop
var doc = activeDocument;
var curLayer
goThroughLayers (doc);
function goThroughLayers(parentLayer){
for(var i=0;i<parentLayer.layers.length;i++){
curLayer = parentLayer.layers;
doc.activeLayer = curLayer;
if(curLayer.typename =='LayerSet'){goThroughLayers (curLayer)}
else{
if(curLayer.name=='my layer name'|| curLayer.kind = LayerKind.NORMAL){
bevel ();
}//end if
}//end else
}//end loop
}//end function
function bevel(){
var idsetd = charIDToTypeID( "setd" );
var desc4 = new ActionDescriptor();
var idnull = charIDToTypeID( "null" );
var ref1 = new ActionReference();
var idPrpr = charIDToTypeID( "Prpr" );
var idLefx = charIDToTypeID( "Lefx" );
ref1.putProperty( idPrpr, idLefx );
var idLyr = charIDToTypeID( "Lyr " );
var idOrdn = charIDToTypeID( "Ordn" );
var idTrgt = charIDToTypeID( "Trgt" );
ref1.putEnumerated( idLyr, idOrdn, idTrgt );
desc4.putReference( idnull, ref1 );
var idT = charIDToTypeID( "T " );
var desc5 = new ActionDescriptor();
var idScl = charIDToTypeID( "Scl " );
var idPrc = charIDToTypeID( "#Prc" );
desc5.putUnitDouble( idScl, idPrc, 100.000000 );
var idebbl = charIDToTypeID( "ebbl" );
var desc6 = new ActionDescriptor();
var idenab = charIDToTypeID( "enab" );
desc6.putBoolean( idenab, true );
var idpresent = stringIDToTypeID( "present" );
desc6.putBoolean( idpresent, true );
var idshowInDialog = stringIDToTypeID( "showInDialog" );
desc6.putBoolean( idshowInDialog, true );
var idhglM = charIDToTypeID( "hglM" );
var idBlnM = charIDToTypeID( "BlnM" );
var idScrn = charIDToTypeID( "Scrn" );
desc6.putEnumerated( idhglM, idBlnM, idScrn );
var idhglC = charIDToTypeID( "hglC" );
var desc7 = new ActionDescriptor();
var idRd = charIDToTypeID( "Rd " );
desc7.putDouble( idRd, 255.000000 );
var idGrn = charIDToTypeID( "Grn " );
desc7.putDouble( idGrn, 255.000000 );
var idBl = charIDToTypeID( "Bl " );
desc7.putDouble( idBl, 255.000000 );
var idRGBC = charIDToTypeID( "RGBC" );
desc6.putObject( idhglC, idRGBC, desc7 );
var idhglO = charIDToTypeID( "hglO" );
var idPrc = charIDToTypeID( "#Prc" );
desc6.putUnitDouble( idhglO, idPrc, 50.000000 );
var idsdwM = charIDToTypeID( "sdwM" );
var idBlnM = charIDToTypeID( "BlnM" );
var idMltp = charIDToTypeID( "Mltp" );
desc6.putEnumerated( idsdwM, idBlnM, idMltp );
var idsdwC = charIDToTypeID( "sdwC" );
var desc8 = new ActionDescriptor();
var idRd = charIDToTypeID( "Rd " );
desc8.putDouble( idRd, 0.000000 );
var idGrn = charIDToTypeID( "Grn " );
desc8.putDouble( idGrn, 0.000000 );
var idBl = charIDToTypeID( "Bl " );
desc8.putDouble( idBl, 0.000000 );
var idRGBC = charIDToTypeID( "RGBC" );
desc6.putObject( idsdwC, idRGBC, desc8 );
var idsdwO = charIDToTypeID( "sdwO" );
var idPrc = charIDToTypeID( "#Prc" );
desc6.putUnitDouble( idsdwO, idPrc, 50.000000 );
var idbvlT = charIDToTypeID( "bvlT" );
var idbvlT = charIDToTypeID( "bvlT" );
var idSfBL = charIDToTypeID( "SfBL" );
desc6.putEnumerated( idbvlT, idbvlT, idSfBL );
var idbvlS = charIDToTypeID( "bvlS" );
var idBESl = charIDToTypeID( "BESl" );
var idInrB = charIDToTypeID( "InrB" );
desc6.putEnumerated( idbvlS, idBESl, idInrB );
var iduglg = charIDToTypeID( "uglg" );
desc6.putBoolean( iduglg, true );
var idlagl = charIDToTypeID( "lagl" );
var idAng = charIDToTypeID( "#Ang" );
desc6.putUnitDouble( idlagl, idAng, 90.000000 );
var idLald = charIDToTypeID( "Lald" );
var idAng = charIDToTypeID( "#Ang" );
desc6.putUnitDouble( idLald, idAng, 30.000000 );
var idsrgR = charIDToTypeID( "srgR" );
var idPrc = charIDToTypeID( "#Prc" );
desc6.putUnitDouble( idsrgR, idPrc, 100.000000 );
var idblur = charIDToTypeID( "blur" );
var idPxl = charIDToTypeID( "#Pxl" );
desc6.putUnitDouble( idblur, idPxl, 2.000000 );
var idbvlD = charIDToTypeID( "bvlD" );
var idBESs = charIDToTypeID( "BESs" );
var idIn = charIDToTypeID( "In " );
desc6.putEnumerated( idbvlD, idBESs, idIn );
var idTrnS = charIDToTypeID( "TrnS" );
var desc9 = new ActionDescriptor();
var idNm = charIDToTypeID( "Nm " );
desc9.putString( idNm, """Linear""" );
var idShpC = charIDToTypeID( "ShpC" );
desc6.putObject( idTrnS, idShpC, desc9 );
var idantialiasGloss = stringIDToTypeID( "antialiasGloss" );
desc6.putBoolean( idantialiasGloss, false );
var idSftn = charIDToTypeID( "Sftn" );
var idPxl = charIDToTypeID( "#Pxl" );
desc6.putUnitDouble( idSftn, idPxl, 0.000000 );
var iduseShape = stringIDToTypeID( "useShape" );
desc6.putBoolean( iduseShape, false );
var iduseTexture = stringIDToTypeID( "useTexture" );
desc6.putBoolean( iduseTexture, false );
var idebbl = charIDToTypeID( "ebbl" );
desc5.putObject( idebbl, idebbl, desc6 );
var idLefx = charIDToTypeID( "Lefx" );
desc4.putObject( idT, idLefx, desc5 );
executeAction( idsetd, desc4, DialogModes.NO );
}
Edit: corrected script to include fix for active layer on line 9.