Multi-step chatgpt result convert into openai calls?

I used chatgpt interface to format text into html. This took multiple steps. First I told it to add paragraph breaks, then I told it to format the dialogue differently, then the annotations, and so on. Altogether it took about 7 or 8 tries to get the result I wanted. I want to process a lot more text this way, but I think the LLM context window will hit a limit, so I want to convert it into an assistant, or some reusable piece of code. I guess I can just repeat the process with multiple openai calls, each time passing in the intermediate text, but maybe there is a better way. Maybe there is a way to export my chatgpt interactions into an assistant?