Using Drupal Commons, how can I create a node of a specific content type on group creation? I am looking for a way to create a node of a specific content type at the same time as a group is created.

So basically, when a group is created a node of type my-content-type is created at the same time with og_group_ref pre-populated to associate it with the group just created...

I don't think there is a module for this, so... any pointers on to how to code this?
Here's the solution:

Obviously you need to download and install Rules, then:


Add an event:


After saving new content of type Group 

2
. Add conditions:

Any conditions you want here..

3.Add Actions:

a) Create a new entity


Parameter: Entity type: Node, Content type: ContentTypeYouWantToCreate, Title: YourTitle, Author: TheAuthor
Provides variables: Created entity (entity_created)


b) Save entity

Parameter: Entity: [entity-created], Force saving immediately: true 

c) Add entity to group

Parameter: Entity: [entity-created], Group: [node] 

your content type should now be created when you create a new group - it will also be added to the newly created group.

Done!