[userid] doesn't exist. It's [user_id]. It isn't defined anywhere. It's pulled directly from their user object. It's impossible for it to be wrong.
For CB Auto Actions it will be from the user who triggered the auto action or the user object sent with the trigger all of which will depend on what the User parameter is set to and what data is contained in the trigger being used.
My guess is your code is wrong or you aren't understanding what variables the trigger you're using is sending. See the below for a list of triggers and their variables.
www.joomlapolis.com/documentation/279-community-builder/tutorials/18358-using-cb-triggers
Unfortunately I can't help you any further. We do not provide free support for paid products. If still having issues I suggest renewing your subscription, updating your site, and if issue continues post in our support forums.