Question: for failsafe rtl

I have a question

When we have a radio Failsafe and rtl starts how can we tell the flight controller to open a the gripper when rtl starts??