How to create MS Teams Survey App Messaging Extension - botframework

I am currently creating a survey app for ms teams similar to Polly.ai/survey monkey
The flow would be
User installs app,
app appears as messaging extension on the chat window,
user clicks app to opens page to create survey,
on submit an adaptive card is generated,
the same is responded back to teams,
The new card appears on the message Hi,
I am currently creating a survey app for ms teams similar to Polly.ai/survey monkey
The flow would be
User installs app,
app appears as messaging extension on the chat window,
user clicks app to opens page to create survey,
on submit an adaptive card is generated=>
the same is responded back to teams =>
The new card appears on the message create pane,
User hits enter to post the survey to the group,
All the group members respond to the survey ,
The same is logged
Can anyone help me in providing some links from where I can start.
Or maybe throw some light on what should be my approach.
My progress so far.
Created a teams bot,
On messaging extension invoke returned url that contains HTML for survey creation which is created in vue.js. Used msteams js to submit the json for created survey back to the bot,
Generated an adaptive card with json received and the a new survey created in db,
Sent the card back to teams as message attachment,
The card is displayed in message create pane,
User hits enter to post the card in the group,
Caught the action.submit event from adaptive card on bot framework.
Also, please note while I am generating the card I don’t have user email in the turncontext as well.
Please throw some light on this
Thanks

Please have a look at App templates available. I think for your case Poll and Survey are the best app template available.
Thanks

Related

How to send messages (3 types, text only) from external service to MS Teams user; each type can be toggled ON or OFF by that user in MS Teams?

Im new to MS Teams application development and looking for suitable solution based on the following requirements. Can I have some guidance from experts?
I have a web service, which sends emails to users based on certain activity. Eg: "Survey started", "Reminder for those who didn't complete the survey" and "when the survey results are out". On top of the email notifications, I also want to send a notification to those individuals who opt-in to receive the notification in MS Teams.
My requirements are,
My web service should be able to send the notification to those
opt-in users in MS Teams as a private message and not as a message in
groups/channels.
In MS Teams, the users should have control over which notification
they wants to receive. For eg: "User A" can opt-in to receive a
notification when a survey starts & survey reminders but can opt-out
of survey results notification where as "User B" can opt-in to
receive notifications for all three.
opt-in and opt-out settings for specific notification should be
configurable in the MS Teams. My web service irrespective of the
settings, will always send the notification to MS Teams but it will
be controlled in the MS Teams side whether to show the notification
to the user or not based on the individual user settings.
Based on the above requirements, please advise what should I build in MS Teams. Whether "Tabs" is enough or "Bot" needs to be built or anything else.
Any guidance or suggestions are really appreciated. Thanks in advance.
Please find below suggestions as per your requirements:
You can use the activity feed notification APIs in Microsoft Graph
to extend this functionality or SDK methods:
Reference doc link, Reference sample link
Also you can send proactive notifications via bot to user:
Send proactive messages
You can create a configurable page and add it to your Tab, which
will be visible to all users who install the bot.
There is no way in MS Teams which will filter or control the
notification to send it to different users without any custom
configuration or condition check.

MS Teams & Bot Framework: Action buttons seems to be not working on adaptive card, sent to cross org tenant from messaging extesnion

Basically, we have a search messaging extension in our application. We can send adaptive cards from the searched results of messaging extension. This adaptive card has the action button to open the task module with a bit more information or an appropriate message suggesting the next steps to follow.
Please consider the behavior of the action button clicked when
The user who receives this card is from the same tenant
The user is being presented with a task module fetched through our bot.
The user who receives this card is from the other tenant
Our bot does not receive any events although this tenant already has our bot installed.
Try to understand why the action button in #2 is not firing event to our bot? Is there any way to handle the action button clicked event for a cross tenant?

Add a Google Chat bot programmatically

I have a web application for organizations. I would like to allow users to add an existing Google Chat bot to their Google Chat workspace programmatically - example workflow: Jack visits mywebsite.com, presses button 'Add site bot' and the bot gets added to their Google Chat where the bot can asynchronously message the user.
Is this functionality possible at the moment or does the user have to connect the bot manually through the Google Chat interface?
Thanks,
Mihai

Sending context information to chatbot

While launching a web chat bot from a portal (through iframe), is it possible to send the details of the logged in user (who has already logged into the portal) to the bot and save it in the bot state so it can retrieved inside the bot code to do some customization or apply custom logic based on the user details. User details can include their name, date of birth, gender etc.
Your web app and bot can exchange information "behind the scenes" (i.e., invisible to the end-user) by exchanging activities of type event. An activity with type event will not be displayed by clients such as Web Chat, so the end user won't see any evidence of the communication. This type of communication between client and bot is sometimes referred to as the "backchannel mechanism."
For an example of how this is done, check out Ryan Volum's backchannel sample bot.

Open a browser instance from BOT and get the response from the browser

Is it possible to program something like integration of payment gateway from within a BOT and get the response back inside the BOT program.
If I make a shopping BOT, can I open a browser with amount and other details from the BOT, that takes all the card details and get the response back with success/failure and transaction number in the BOT session.
Thanks
This should be fairly straightforward with PayPal (with the caveat that I haven't tried it yet):
Create a Payment Button, and display in your chat (either as text or a clickable image depending on the channel).
Create an endpoint for Paypal's Instant Payment Notification on your Bot so it can tell when the payment has been processed

Resources