There is a bug in magento 1.7 and some earlier version with shopping cart rules and conditions.
The condition tab works perfectly, as it checks all cart items - child and parent.
But the action tab does not, as it checks only parent items and does not "see" child SKUs.
Possible workarounds:
Set action on configurable items only
Modify the input array of products for action check ( replace parent skus with the child) and restore it after the validation.
Some extensions for advanced shopping cart rules may have this bug fixed.
The feature you're looking for is a free gift/auto free gift/promo items functionality.
Magento does not come with this feature out of the box.
I created a similar module for one of our costomers, this is how it works if you want to create your own module:
Depending on when you want to add the free product, use one of these events:
Add the product to the cart (user is able to remove the free product)
sales_quote_add_item
if you want your product B to be automatically added to the cart if user adds product A.
You might also remove the free product B when product A is removed from cart, use sales_quote_remove_item
for this.
Add the product to the quote/order
sales_convert_quote_to_order
if you want your product B to be added automatically to the order after the user placed the order. The user will now automatically have product B as product in his order and will see the result in the order details.
Best Answer
Edit the attribute in the backend and mark the field
Use for Promo Rules Conditions
astrue
. After this you should be able to use the SKU as all the other attributes in a promo rule.