Power Automate: POST a file to trigger a HTTP flow and upload to SharePoint

My use case here was to store the resumes uploaded by candidate in a website directly in a SharePoint list.

Below is the high level flow the process, created in Power Automate (same you can do in Azure Logic Apps as well with similar steps)

image

Here is the output, i.e., data and file uploaded to SharePoint/Office 365

image

The HTTP call is expected to be made from the external application such as a web page but for the purpose of testing, here is the Postman screen used:

image

Detailed flow

Let us start with an HTTP Request Trigger. You will get a URL which looks like in the below screenshot. This is the URL you will be using. By default this will be using anonymous auth, but you can secure it using few methods, like this one.

image

Parsing Json

This is an optional step. I wanted to pass some parameters also in addition to the file upload, but I chose not to send individually but as a json string. Since it is a Json string, I have to parse it to extract values from it.

image

This is the sample input I have. Refer to postman screenshot above.

{

"position": "Java Developer",

"firstname": "Praveen",

"lastname": "Nair",

"email": "praveennnn@abcdef.com",

"phone": "+9715555555",

"urls": ["http://www.google.com", "https://www.adfolks.com"]

}

Create SharePoint List row

Creating a list row and attaching the file is a two step process. First we have to create the row, then using that ID, we have to attach the uploaded file.

image

Final notes

The last send-mail component you see is just to notify someone in recruitment team that there is a job application logged in SharePoint. Same you can achieve using SharePoint notification features so you may ignore it.

I found that getting filename from the uploaded payload is not so straightforward in Power Automate (someone correct me if I am wrong), but anyways I did’nt need that because the logic I had to use here is to create a custom filename using the candidate’s name and adding the extension we get from the content-type.

Automating Bayzat leave calendar to post daily list in Microsoft Teams group

I was wondering if I can have a feature to post who-are-all-on-planned-leave list daily in the HR/leaders group in Microsoft Teams. Searched for a plugin in the marketplace, and tried to find a API also. Finally, contacted the Bayzat support and found they don’t have a developer API available at the moment. Then I went though the normal HTTP calling methods and found it worked well. Sharing with you, hoping someone will find this useful in future.

Here is the Adaptive Card output you get in Teams:

image

This is the high level view of the Power Automate App Flow

image

Details:

Step 1 – Get the authentication access token

This token is required for you to get access to any APIs/URLs. Use the login API for this:

image

Step 2 – Read the Leave Calendar

My requirement is only to read one single day, so I am passing utcNow()

image

Step 3 – Modify the response data as per your requirement

My requirement is small that, I need only list of people marked OOO for this particular day

image

Step 4 – Post to Microsoft Teams

I chose to post the data in Teams as an Adaptive Card, so I am posting in that format

image

Contact me if you need some clarifications. Make sure to add sufficient validations to make this flow error free.

Power Automate: Send daily bugs report in Microsoft Teams from Azure DevOps Boards

You can simply change same to send a mail notification too, instead of Teams.

Sample output on Teams:

image

Development Steps:

Step 01 – Create query in Azure DevOps board for Bugs

I would start with a Recurrence Trigger (schedule). Check always the Time zone of the trigger will happen on GMT.

Step 01 – Schedule

I would start with a Recurrence Trigger (schedule). Check always the Time zone of the trigger will happen on GMT.

image_thumb[2]

Step 02 – Initialize Azure DevOps URL (optional)

I am using this url for hyper linking in the output, which can be considered optional.

image

Step 03– Get bug list from DevOps boards

I suggest you to create a ‘query’ first which returns filtered ‘bug’ results. Below is the query have created and saved for this example blog.

image

Next, get the results from this query:

image

Step 04 – HTML’ize

I wanted to format the Bugs list content as a table and, MS Teams message supports HTML. So I will create a header and assign it to a new variable.

image

Step 05– Convert rows to HTML rows

Next step creates each row from DevOps boards query to corresponding <TR>s. You can choose to omit or add any columns as per your requirement.

image

Step 06 – Close HTML table

Once the rows are added to HTML table, I would close it and add also any footer notes.

image

Step 07– Post message in Teams

Finally, send the message to Teams. I have used a group chat in my case. Additionally I am using a ‘condition’ component also to check if the list is empty so it can directly ‘terminate’ the flow instead of posting an empty table in Teams.

image

Flow view:

This is what my simple Power Automate flow looks like:

image

Power Automate: Send daily status post in Microsoft Teams from a SharePoint List

Assuming you have a “List” in SharePoint and you want to post a summary/or list as-it-is to a chat group in Microsoft Teams. You can simply change same to send a mail notification too, instead of Teams.

Output in Teams:

image

Development Steps:

Step 01 – Schedule

I would start with a Recurrence Trigger (schedule). Check always the Time zone of the trigger will happen on GMT.

image

Step 02 – Get list items from SharePoint

Choose the site address and list name

image

Step 03 – HTML’ize

I wanted to format the SharePoint List content as a table and, MS Teams message supports HTML. So I will create a header and assign it to a new variable.

image

Step 04 – Convert SharePoint rows to HTML rows

Next step creates each row from SharePoint to corresponding <TR>s. You can choose to omit or add any columns as per your requirement.

image

Step 05 – Close HTML table

Once the rows are added to HTML table, I would close it and add also any footer notes.

image

Step 06 – Post message in Teams

Finally, send the message to Teams. I have used a group chat in my case.

image

Flow view:

This is what my simple Power Automate flow looks like:

image