Mediagroup id problem

Hello, Assalamu Aleykum everyone, please help me with accepting multiply files in telegram bot, i send 8-10 files at once, then i need this files to be pairs, first file with second, second with third and so on, then all pairs tiil last should be sended to Ai, to create video from this photos, then all created videos should be sended to telegram with approve all of them, if yes → remains, if button no → remake and resend.

I developed project like this but without media group, with sending 1 photo, one by one.

I dont ask help me with all bot, but at less for one part of it.

God bless you.

Hello!
Please use Help me Build my workflow category for this type of post. See here