Hello again @Nandan Hegde .
In this case, you should be using, Append Variable not Set Variable. An Append Variable after each activity like below image
Each Append Variable activity can be used to create a "message". Below is code to make a JSON format message for hypothetical activity named "DoThing". First it checks whether the activity succeeded or not. Then it makes message differently for success and fail. For success there is no error message to get. There may be an error message for failure. The .?
makes it null-safe. Each Append Variable activity will need its code tweaked to reflect the activity it is reporting on.
@if(equals(activity('DoThing').Status,'Succeeded'),
'{"Name":"DoThing" , "status":"Success", "error":"N/A"}',
concat('{"Name":"DoThing", "Status":"Fail","error":',
string(activity('DoThing')?.Error))
)
=>
{"Name":"LookupNull", "status": success or fail , "error": N/A or error message}