Is there a method of configuring triggers for multiple Apps Script projects?

I’m having difficulty solving a challenge, I need to know what tools I need to know how to use to solve my problem. To summarize the challenge, I need to configure triggers in several app script projects associated with spreadsheets. Supposing I have a list with all the IDs of the projects in which I want to add triggers for the “text_treatment” function that will be triggered with each edit made to the spreadsheet, how could I add the triggers to all the projects contained in the list? Which API should I use?