How can I get the motive/intent of a person from a few sentences?

I was thinking I could summarize the text and then scan for keywords, but I really have no clue. I am really new to this, and that way seems a bit clunky, and imprecise.
I really just want to boil the motive down to a few things

  • Asking a question
  • Responding to a question
  • Giving information/opinions (e.g It is 1:30)
  • Giving commands (e.g. You should buy this)
  • etc.

I have looked around on google, but googling “getting motive of a sentence using nlp”, keeps bringing up text summarization, so its making me think that is the way to go.
Any help would be great!