@SriRaghavendran Prabhakaran Thanks for reaching out.
It would always be great to provide your input and what is the expected output so the community can assist you.
To answer your question, you can review the string function that is available in logic app. Let say if my email body has content something like
Hi {0}, How are you
Now you can leverage the replace function and replace the {0} with your custom value. This is just an example, and you can dynamically pass the value as per your workflow.
replace(variables('EmailBody'),'{0}','Mayank')
In logic app there is nothing like String.Format method so the alternative I am using the replace method and making sure that my body follows a structure which I can replace the text in my workflow.
Alternatively, you can use the inline code if it is complex calculation and if you know or offload this functionality to azure function and call azure function from logic app.