Create user after node created and assign node entity reference to it I have a content type with name hotel it have entity reference field that referenced to users entity, I want when admin create a node automatically created a user according to hotel email field and then set  user entity reference field with that new created user.How can I do it automatically?

I create a rule with below structure but not work

{ "rules_create_user_based_on_hotel" : {
    "LABEL" : "create user based on hotel",
    "PLUGIN" : "reaction rule",
    "OWNER" : "rules",
    "REQUIRES" : [ "rules" ],
    "ON" : { "node_insert--hotel" : { "bundle" : "hotel" } },
    "DO" : [
      { "entity_create" : {
          "USING" : {
            "type" : "user",
            "param_name" : "[node:field_hotel_users]",
            "param_mail" : "[node:field_mail_hotel]"
          },
          "PROVIDE" : { "entity_created" : { "entity_created" : "Created entity" } }
        }
      },
      { "data_set" : { "data" : [ "node:field-user-ref" ], "value" : [ "entity-created" ] } }
    ]
  }
}
Download the Rules module
Enable Rules and Rules UI


Add a new rule 


React on event: After Saving New Content (it's listed under NODE)
Restrict by type: Hotel


Under Action


Add Action of Create New Entity >> ENTITY TYPE: USER >> For your EMAIL field, Ex: If you called your field "Email" then it's node:field-email. For user name, I guess you will also need to create a field in the node for that too. Then do same steps as e-mail


Note: You can always click on "DATA SELECTORS" to see all the tokens you can use.


Add Action of Set data value >> select your entity ref field (Ex: If you called your field "Test" then it's node:field-test) >> for Value use entity-created:uid 
Add action of Send Account Email (listed under USER) >> Account: entity-created 



  You can modify the e-mail templates here
  /admin/config/people/accounts use tokens for your needs.
  
  Let me know how this goes, no time to test this Rule.