Tag Archives: Power Platform

Post Message to Microsoft Teams using Incoming Webhook

In this blog, we will see how to post the message to Microsoft Teams using Incoming Webhook.

What is the Incoming Webhook?

Basically, it is a URL provided by Teams for any service to use to post content with the goal of sharing that content in your team’s channel. 

When you configure it, you get a URL which you can then post a JSON request to. (JSON is a long-formatted string that helps standardize data.) 

The final output, or the post in Teams, is a pretty card, like below:

How to configure Incoming Webhook in Microsoft Teams:

  1. Navigate to the channel where you want to add the webhook and select (•••) More Options from the top navigation bar.
  • Choose Connectors from the drop-down menu and search for Incoming Webhook.
  • Select the Configure button, provide a name, and, optionally, upload an image avatar for your webhook.
  • The dialog window will present a unique URL that will map to the channel. Make sure that you copy and save the URL—you will need to provide it to the outside service.
  • Select the Done button. The webhook will be available in the team channel.

Flow action looks like this:

JSON(Message Card):

{
    "@type": "MessageCard",
    "@context": "http://schema.org/extensions",
    "themeColor": "0076D7",
    "summary": "Dharanidharan Balasubramaniam created a new task",
    "sections": [{
        "activityTitle": "Dharanidharan Balasubramaniam created a new task",
        "activitySubtitle": "On Malaysia BizApps & Power Platform User Group",
        "activityImage": "https://teamsnodesample.azurewebsites.net/static/img/image5.png",
        "facts": [{
            "name": "Assigned to",
            "value": "Unassigned"
        }, {
            "name": "Due date",
            "value": "Mon May 01 2017 17:07:18 GMT-0700 (Pacific Daylight Time)"
        }, {
            "name": "Status",
            "value": "Not started"
        }],
        "markdown": true
    }],
    "potentialAction": [{
        "@type": "ActionCard",
        "name": "Add a comment",
        "inputs": [{
            "@type": "TextInput",
            "id": "comment",
            "isMultiline": false,
            "title": "Add a comment here for this task"
        }],
        "actions": [{
            "@type": "HttpPOST",
            "name": "Add comment",
            "target": "https://docs.microsoft.com/outlook/actionable-messages"
        }]
    }, {
        "@type": "ActionCard",
        "name": "Set due date",
        "inputs": [{
            "@type": "DateInput",
            "id": "dueDate",
            "title": "Enter a due date for this task"
        }],
        "actions": [{
            "@type": "HttpPOST",
            "name": "Save",
            "target": "https://docs.microsoft.com/outlook/actionable-messages"
        }]
    }, {
        "@type": "OpenUri",
        "name": "Learn More",
        "targets": [{
            "os": "default",
            "uri": "https://docs.microsoft.com/outlook/actionable-messages"
        }]
    }, {
        "@type": "ActionCard",
        "name": "Change status",
        "inputs": [{
            "@type": "MultichoiceInput",
            "id": "list",
            "title": "Select a status",
            "isMultiSelect": "false",
            "choices": [{
                "display": "In Progress",
                "value": "1"
            }, {
                "display": "Active",
                "value": "2"
            }, {
                "display": "Closed",
                "value": "3"
            }]
        }],
        "actions": [{
            "@type": "HttpPOST",
            "name": "Save",
            "target": "https://docs.microsoft.com/outlook/actionable-messages"
        }]
    }]
}

After running the Power Automate, it will post the message in Microsoft Teams like below:

If you are interested in this topic and would like to do some further self-study, I encourage you to check out my blog on this.

ALM for Power Platform/Dynamics 365 Projects in Azure DevOps/VSTS using Power Platform Build Tools – PART 1

Couple of months back I wrote a post on how to implement CI/CD for Dynamics 365 CE. That post can be found here and is still relevant.

In this series of blog, we will explore building out DevOps processes for Dynamics 365 Customer Engagement (CE) and Power Platform projects by utilizing Power Platfrom Build Tools.

Problem Statement

I have started working on ALM when I was assigned as a Platform Engineer for a Dynamics 365 CE and Power Platform implementation project. At that time, I had a few key challenges with deployments. I have listed those below:

  • Solution files were manually extracted and imported to target as a deployment process
  • Multiple deployment process is followed between release environments. For example, in Dev and Sit environment, the solution was migrated manually, and in UAT, Pre-Prod and Prod environment DB compare was applied to promote changes
  • Master data were mutually entered in each environment
  • Multiple developers working in the same organizations overwriting the changes.

To solve the above challenges, I have started working on ALM process. Before we start solving the problem, let us take a moment to see some of the Pre-Requisites which we required for building the ALM Process

Pre-Requisites

How to Setup Azure DevOps

You will need an Azure DevOps environment. Navigate to https://azure.microsoft.com/en-us/services/devops/ and click on the Start free option.

You will need to sign in with your Microsoft account. After logging in, it will take you to the https://dev.azure.com/dharani1743/

Next, we can start by creating a new project in Azure DevOps. This will contain your pipeline and your source repository.

After creating the project, you will be able to see the below screen

Install PowerPlatform Build Tools

Next, we will see how we can install the PowerPlatfrom Build Tools into your Azure DevOps instance.

Choose your specific Azure DevOps organization (in case you have many)

select the install and click on download. Now we have installed the PowerPlatform Build Tools in your Azure DevOps instance.

In my next blog, we will see how to setup the repository and how to create a VSTS Build and Release definition to save a Power Platform solution to Source Control and import the solution into the target instance.

If you are interested in this topic and would like to do some further self-study I encourage you to check out my blog on this.