Run hook_nodeapi("pre save") but only on inserts, not on updates For hook_nodeapi(), I want it to run on "presave," but only on inserts, not on updates. How can I do that?
You can know if it an update or insert by looking the $node-&gt;nid value. If you've a number it's an update otherwise an insert. 

You can see an example directly on the documentation.