Bot framework V4 Nodejs chat history logging

This example hasn’t been merged yet: https://github.com/Microsoft/BotBuilder-Samples/pull/1266

It uses AzureBlobTranscriptStore and TranscriptLoggerMiddleware

const { AzureBlobTranscriptStore  } = require('botbuilder-azure');
const { TranscriptLoggerMiddleware } = require('botbuilder-core');

// Get blob service configuration as defined in .bot file
const blobStorageConfig = botConfig.findServiceByNameOrId(BLOB_CONFIGURATION);
// The transcript store has methods for saving and retrieving bot conversation transcripts.
let transcriptStore = new AzureBlobTranscriptStore({storageAccountOrConnectionString: blobStorageConfig.connectionString,
                                                    containerName: blobStorageConfig.container
                                                    });
// Create the middleware layer responsible for logging incoming and outgoing activities
// into the transcript store.
var transcriptMiddleware = new TranscriptLoggerMiddleware(transcriptStore);
adapter.use(transcriptMiddleware);

Leave a Comment