How to programmatically get node ID in custom Rules Action Need to create a custom Rules Action. How do I pragmatically get the node ID for an action such as when a node is saved?
You can pass parameter node then you will get full node object into your action.


function MODULEname_rules_action_info() {
  return array(
    'CALLBACK_FUNCTION_NAME' => array(
      'label' => t('Send Mail to users for new content'),
      'parameter' => array(
        'node' => array('type' => 'node', 'label' => t('Current Node')),
      ),
      'group' => t('MODULE'),
    ),
  );
}