Automatically convert my online sales orders to invoices in Zoho Inventory

Automatically convert my online sales orders to invoices in Zoho Inventory

Hi, I need a custom script to convert my sales orders created in Zoho Inventory automatically to a paid invoice in Zoho Inventory. Every topics about this I found here are very old and using the deprecating authtoken mechanism. Can you please provide such a custom function, so I can add them Zoho Flow action?
Thanks younea