title: Sending multiple messages to FB messenger with one being a template
body: <p>I am trying to send multiple messages from a webhook through a facebook bot using dialogflow. I want to send a a message with only text, then an <a href="https://developers.facebook.com/docs/messenger-platform/send-messages/template/airline" rel="nofollow noreferrer">airline template</a>, then a quick reply. I can send just a text then a quick reply, and I can send just an airline template separately but I am having trouble figuring out how to send them in the order. </p>
  
  <p>I can send text &amp; quick reply messages this way: </p>
  
  <pre><code>       return ({
           "speech": "",
           "messages": [
               {
                   "type": 0,
                   "speech": copy1
               },
               {
                   "type": 2,
                   "title": obj.QRtitle,
                   "replies":[
                       qR1 = obj.qR1 || '',
                       qR2 = obj.qR2 || '',
                       qR3 = obj.qR3 || '',
                       qR4 = obj.qR4 || '',
                       qR5 = obj.qR5 || '',
                       qR6 = obj.qR6 || '',
                       qR7 = obj.qR7 || '',
                       qR8 = obj.qR8 || '',
                       qR9 = obj.qR9 || '',
                       qR10 = obj.qR10 || '',
                   ]
               },
           ],
           "source": "facebook"
       });
     },
  </code></pre>
  
  <p>and then I can send an airline template this way:</p>
  
  <pre><code>     return ({
             "data" : {
                 "facebook" : {
                     "attachment" : {
                         "type" : "template",
                         "payload" : {
  
                     "template_type": "airline_boardingpass",
                     "intro_message": object.intro_message|| '',
                     "locale": "en_US",
                     "boarding_pass": [
                       {
                         "passenger_name": object.passenger_name,
                         "pnr_number": "ABCDEF",
                         "seat": object.seat|| '',
                         "logo_image_url": object.logo_image_url|| '',
                         "header_image_url": object.header_image_url|| '',
                         "qr_code": object.qrcode_data,
                         "above_bar_code_image_url": object.above_bar_code_image_url|| '',
                         "auxiliary_fields": [
                           {
                             "label": "Terminal",
                             "value": object.terminal
                           },
                           {
                             "label": "Departure",
                             "value": object.departure_date_time|| '',
                           }
                         ],
                         "secondary_fields": [
                           {
                             "label": "Boarding",
                             "value": object.boarding_time|| '',
                           },
                           {
                             "label": "Gate",
                             "value": object.departure_gate
                           },
                           {
                             "label": "Seat",
                             "value": object.seat
                           },
                         ],
                         "flight_info": {
                           "flight_number": object.flight_number,
                           "departure_airport": {
                             "airport_code": object.departure_airport_code,
                             "city": object.departure_city,
                             "terminal": object.departure_term,
                             "gate": object.departure_gate
                           },
                           "arrival_airport": {
                             "airport_code": object.arrival_airport_code,
                             "city": object.arrival_city
                           },
                           "flight_schedule": {
                             "departure_time": object.departure_time|| '',
                             "arrival_time": object.arrival_time|| '',
                           }
                         }
                       }
                     ]
                   },
                 },
               },
             },
                 "source": "facebook"
           });
  </code></pre>
  
  <p>I am having trouble figuring out how to merge the two to send it successfully -- any advice would be helpful.</p>