title: agent.add() not working, though console.log() is
body: <p>I am trying to implement a bot using Telegram, Dialogflow and Firebase.
  I am having trouble with this function:</p>
  
  <pre><code>function findDoc(agent){
      const userId = request.body.originalDetectIntentRequest.payload.data.from.id.toString();
      const first_name = request.body.originalDetectIntentRequest.payload.data.from.first_name;
      console.log(`Telegram user ID: ${userId}, first_name: ${first_name}`);//THIS SHOWS
      agent.add(`voy a ver si existe el documento`);//THIS SHOWS
      agent.setContext({name: "firstTimer", lifespan:10});
      return db.collection('users').doc(''+userId).get()
        .then((doc) =&gt; {
          if (!doc.exists) {
            console.log(`New user created in database `);//THIS SHOWS
            agent.add(`New user created in database`);//THIS DOESN'T SHOW
            var data={
              'id':userId, 
              'name':first_name, 
              'contadorP': 0,
              'doneQuestions': [],
            };
            return db.runTransaction((dataDB)=&gt;{
              dataDB.set(db.collection('users').doc(''+userId), data,{merge:true});
              return Promise.resolve();
            }).catch((err) =&gt; {
                  console.error(`Error creating file: `+err);
              });
          } else {
            console.log('Found Telegram profile: ', JSON.stringify(doc.data()));//THIS SHOWS
            const data = doc.data();
            agent.add(`User ${data.id} has the name of ${data.nombre}`);//THIS DOESN'T SHOW
          }
        })
        .catch((err) =&gt; {
          console.error(err);
        });
    }
  </code></pre>
  
  <p>I am sure that the function works fine becasue the console.log() in the firebase console work fine as they show what they are supposed to; and I am getting no errors back either...</p>
  
  <p>Here are my dependencies from my package.json:</p>
  
  <pre><code>"dependencies": {
      "actions-on-google": "^2.5.0",
      "firebase-admin": "^8.2.0",
      "firebase-functions": "^2.0.2",
      "dialogflow": "^0.6.0",
      "dialogflow-fulfillment": "^0.6.1"
    }
  </code></pre>
  
  <p>This is how I am handling the intents:</p>
  
  <pre><code>  intentMap.set('Default Welcome Intent', welcome);
  </code></pre>
  
  <p>and this is the function that calls the findDoc() function:</p>
  
  <pre><code>function welcome(agent){
      console.log(`Estoy en la funcion de welcome`);
      agent.add(`Welcome`);
      findDoc(agent);
    }
  </code></pre>
  
  <p>Both the console.log() and agent.add() of the welcome function are showing.
  From what I have read online, the dependencies are fine and should work.So I don't know what else to try, since I have (I think) done correctly every suggestion found.Please help...</p>