title: How do I call 2 or more asynchronous methods in Actions on Google intent fulfilment V2
body: <p>I had managed to call these 2 methods (geocoder.reverse, timezone.data) one after the other successfully in V1 DialogflowApp, but I am now upgrading to V2, and can't seem to get both asynchronous method calls right. Please help. I use these packages respectively </p>
  
  <ul>
  <li><a href="https://www.npmjs.com/package/node-geocoder" rel="nofollow noreferrer">node-geocoder</a>: ^3.22.0</li>
  <li><p><a href="https://www.npmjs.com/package/node-google-timezone" rel="nofollow noreferrer">node-google-timezone</a>: ^0.1.1</p>
  
  <pre><code>     const options = { provider: 'google', httpAdapter: 'https', apiKey: googleApi, formatter: 'json'};
       const geocoder = NodeGeocoder(options);
       const timezone = require('node-google-timezone');
  
  app.intent('saving_prompt', (conv) =&gt; {
          if (conv.data.area) {       
             const deviceCoordinatesStart = conv.device.location.coordinates;
             const latitudeValueStart = deviceCoordinatesStart.latitude;
             const longitudeValueStart = deviceCoordinatesStart.longitude;
             let start = moment(); //Start time in UTC, you could also use dateTime()
             let startTz = momentTz(); //used because of getting the Timezone
             const timestamp = 1402629305; // Just a dud placeholder to fulfil timezone function
  
      //GEOLOCATION REVERSAL (METHOD 1)
      geocoder.reverse({lat:latitudeValueStart, lon:longitudeValueStart}, (err, res) =&gt; {
          if (err) {
              console.log(err);
          }
          let startLocation = res[0].administrativeLevels.level1long; 
          conv.data.startLocation = startLocation;
  
              //GETTING LOCAL TIMEZONE FROM LAT/LONG AND TIMESTAMP (METHOD 2)
              timezone.data(latitudeValueStart, longitudeValueStart, timestamp, (err, tz) =&gt; { 
                  if (err) {
                      console.log(err);
                      }
                  var zoneHolder = tz.raw_response.timeZoneId;  
                  const localTime = startTz.tz(zoneHolder).format('LLL'); 
                  conv.data.localTime = localTime; 
                  app.ask('Your race starts by ' + localTime + 'at' + startLocation);
                  conv.ask(new Suggestions('End Race'));
              });
      });
  } else {  //Returned if permission not granted
          conv.ask('You do not have your location on. Say "Locate me", to retrieve your location');
          conv.ask(new Suggestions(['Locate me', 'Exit']));
  
  }
  });
  </code></pre></li>
  </ul>
  
  <p>//FUNCTION CREATED TO GET TIMEZONE WITHOUT 'node-google-timezone' PACKAGE</p>
  
  <pre><code>function callTimezoneApi(lat, lon) {
      return new Promise((resolve, reject) =&gt; {
           let path = '/maps/api/timezone/json?location=' + lat +
            ',' + lon + '&amp;timestamp=' + ts + '&amp;key=' + googleApi;
           console.log('API Request: ' + host + path);
           // Make the HTTP request to get the weather
           http.get({
            host: host,
            path: path
           }, (res) =&gt; {
                let body = ''; // var to store the response chunks
                res.on('data', (d) =&gt; {
                 body += d;
                }); // store each response chunk
                res.on('end', () =&gt; {
                     let response = JSON.parse(body);
                     let zoneHolder = response.timeZoneId;
                     let startTz = momentTz(); //used in fulfilling the Timezone
                     const localTime = startTz.tz(zoneHolder).format('LLL');
                     console.log(localTime);
                     return resolve(localTime);
                });
            res.on('error', (error) =&gt; {reject(error);});
          });
      });
  }
  </code></pre>