if you are posting code it is far easier to read if you format it, please follow the advice in this post: How to share code or flow json
The following is incorrect. Look at the quotes...
"text": Network Device Details: '\n' Device 1: Host Name- "+host0+" , Management IP- "+host0IP+" , Reachability Status- "+host0S+"
compared to...
"text": "Network Device Details: '\n' Device 1: Host Name- "+host0+" , Management IP- "+host0IP+" , Reachability Status- "+host0S+"
assuming host0 host 0IP and host0S are variables?