Implementing both machine to machine and user flow as well in rails app

I want to implement both the flow using client credential (machine to machine) and OpenId Connect (user flow, grant_type - token), I have few doubts

  1. Do I need to create 2 Separate application integration for each type flow
  2. Is it possible to do with one app only and use same client_id and client_secret for both the flows.
  3. If i will be creating multiples app integration how to find out is it for machine to machine or from specific resource owner.