I have to add one condition for workflow rule in which this rule should be fired if user is from public group or other group.Is it possible by using workflow or process builder.
It is not possibly to directly check if the user is a member of a public group in a validation rule or workflow. However, there is a reasonable alternative without having to resort to writing a trigger.
- Create a Custom Permission that is named something relevant: "Fire XXX Workflow"
- Create a Permission Set that is named similarly: "Allow Fire XXX Workflow"
- Add the Custom Permission created in step 1 to the Permission Set. (You can also assign it to existing profiles/permission sets if appropriate)
- In the Workflow or Validation rule, use the "Formula Evaluates to True" setting. Then use $Permission->Fire_XXX_Workflow as part of the criteria. (You can use the "Insert Field" button to pick the permission).
- Add the users to the Permission Set created in step 2
- Optionally create a Delegated Admin Group and allow it to assign users the Permission set so that managers can maintain the users.