D7 auto nodetitle, title with pattern node:nid and rules php node_save($node) I want to make automatic title like node-333, using auto nodetitle module. When creating node there is no nid, so pattern node-[node:nid] gives me after saving new content "node-". When I edit again this node - title is changing as expected. 

So I thought, that using rules I do simple "After saving node" condition "Node type is" and action Execute php node_save($node). But it is not working, I'm getting 

PDOException: SQLSTATE[23000]: Integrity constraint violation

Does anyone deal with this or have some workaround?
You are on the right track. I have been doing this for a while now with the following code snippet in rules.

auto_nodetitle_operations_update(array($node-&gt;nid));