I believe the issue is that you named the Apply to each action Apply to each 5. If you rename the action, which is fine, you need to be sure to make the same change in the expression. Based on the error, this expression in the compose action coalesce(items('For_each')?['automaticReplies']?['message'],'Not Set') should be coalesce(items('For_each_5')?['automaticReplies']?['message'],'Not Set')
However, to ensure the expression is correct, just put the automaticReplies value in the compose action. Run your flow and make sure there are no errors. Then if you still want to use my expression, put the Compose action and copy the how the items('For each... is formatted in the code view and use that to build the expression.
Of course, the easiest way to resolve this is to not rename the Apply to each action.