Reputation: 11
I followed this tutorial to create a Teams notification bot with Teams Toolkit: (https://learn.microsoft.com/en-us/microsoftteams/platform/sbs-gs-notificationbot?tabs=vscode&tutorial-step=3)
To store the channels where the bot is installed in a persistent way, I tried to add a custom blob storage. But the documentation was not really clear for me.
In initialize.js I added
const { BlobsStorage } = require("botbuilder-azure-blobs");
const myStorage = new BlobsStorage(
config.blobConnectionString,
config.blobContainerName
);
and
notification: {
enabled: true,
storage: myStorage,
},
In the config.js I added
blobConnectionString: process.env.BLOB_CONNECTION_STRING,
blobContainerName: process.env.BLOB_CONTAINER_NAME,
and in .env.teamsfx.local I added
blobConnectionString=<my connection string>
blobContainerName=<my container name>
But it is not working. The Azure function fails. How should I add a blob storage for this purpose?
Upvotes: 1
Views: 644
Reputation: 11
For additional information on how to incorporate notification storage into your application, you can review the following document which includes a sample implementation available on GitHub: https://learn.microsoft.com/en-us/microsoftteams/platform/bots/how-to/conversations/notification-bot-in-teams?tabs=ts%2Cjsts%2Cts4#add-storage
Upvotes: -1