In custom action return utter with elements

Is there a way to send custom facebook response as generic template from domain.yml?

I can send pure text by this but using a template I get:

line 227, in send_custom_json
recipient_id = json_message.pop("sender", {}).pop("id", None) or recipient_id

using:

utter_goodbye: - custom: - attachment: type: “template” payload:
template_type: “generic” elements: - title: “test123”