Submit form from first response request

My question: Even though I might know the answer to this, but is there a way to submit a form inside a HTML response from a request?

What I’m trying to do is make a first request:

GET https://firstrequest/

which returns a text/HTML, with a form in it, and a <script src> which inserts a dynamic token into one of the form’s input on submit. Once the form is submitted, it returns a new HTML, from where I need to get a code_token to set it in a env var.

I’ve already tried: I used cheerio to parse the HTML, and set some of the form’s input values, but then I don’t know how to submit the form using Postman’s Tests, since cheerio doesn’t support .on(), .click(), .submit() functions.

I’m pretty sure I can’t be done with Postman, but I’m just asking ¯_(ツ)_/¯