Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

sequential-workflow-adaptive-card

This sample illustrates sequential workflow, user specific views and upto date adaptive cards bot.

Prerequisites

  • Microsoft Teams is installed and you have an account
  • .NET Core SDK version 3.1
  • ngrok or equivalent tunnelling solution
  1. Clone the repository

    git clone https://github.com/OfficeDev/Microsoft-Teams-Samples.git
  2. If you are using Visual Studio

  • Launch Visual Studio
  • File -> Open -> Project/Solution
  • Navigate to samples/bot-sequential-flow-adaptive-cards/csharp/ folder
  • Select SequentialUserSpecificFlow.csproj file
  1. Run ngrok - point to port 3978

    ngrok http -host-header=rewrite 3978
  2. This step is specific to Teams.

    • Edit the manifest.json contained in the Manifest folder to replace your Microsoft App Id (that was created when you registered your bot earlier) everywhere you see the place holder string <<YOUR-MICROSOFT-APP-ID>> (depending on the scenario the Microsoft App Id may occur multiple times in the manifest.json).
    • Zip up the contents of the teamsAppManifest folder to create a manifest.zip
    • Upload the manifest.zip to Teams (in the Apps view click "Upload a custom app")
  3. Update appsettings.json file with Microsoft App Id, App Secret.

  4. Run your app, either from Visual Studio with F5 or using dotnet run in the appropriate folder.

Interacting with the app in Teams

  1. In Teams, Once the app is successfully installed in a group chat, ping the bot by @mentioning it. Bot will reply with a card showing that the person has initiated the incident.

image

  1. Using refresh activity only the person who has initiated will be able to proceed further by entering the details of the incident and assign it to a person from the group chat, while others in the group chat will still be able to see only the initiated card.

image

  1. User who has initiated the incident will be able to enter the details using the series of cards in a sequential flow and submit it for the further approval/rejection process.

image image image

  1. Once the details are submitted and assigned to a person from the group chat, it will send an updated card to the chat with all the entered details.

image

  1. Now, only the person assigned to will be able to either approve or reject it.

image

  1. After the approval/rejection of the card, the final updated card will be sent to the group chat.

image