Power Automate dynamic content [Complete tutorial]

In this Power Automate Tutorial, we will learn about Power Automate dynamic contents. Also, we will discuss the below topics:

  • Power Automate dynamic content
  • Power Automate dynamic content missing or not showing
  • Power Automate dynamic content in expression
  • Power Automate dynamic content date format
  • Power Automatedynamic content list
  • Power Automate dynamic content if expression
  • Power Automate dynamic content excel
  • Power Automate dynamic content today’s date
  • Add dynamic content Power Automate
  • Concat dynamic content Power Automate
  • Power Automate convert dynamic content to string
  • Power Automate convert dynamic content to uppercase string
  • Trim dynamic content in Power Automate
  • Power automate condition dynamic content
  • Power Automate combine dynamic content with string
  • Power Automate dynamic content email
  • Power Automate dynamic content email link
  • Power Automate dynamic content file name
  • Power Automate split the string dynamic content
  • Power Automate Split the string into an array
  • Power Automate teams dynamic content
  • Power Automate hyperlink dynamic content
  • Power Automate switch dynamic content
  • Power Atomate compose dynamic content
  • Power Automate dynamic content in HTML
  • Power Automate dynamic content in html table
  • Power Automate create file dynamic content

Power Automate Dynamic content

In Power Automate, the dynamic contents are the kind of variables produced by triggers and actions that are used in the flow.

It let the users select the fields that reference the previous steps.

Let’s take an example, we will create an automated flow using dynamic content that will notify the user when a new tweet is posted.

Go to +Create > Automated cloud flow > When a new tweet is posted.

power automate dynamic content
power automate dynamic content

Then it will ask to set a search text. Let’s set a text as “Power Automate”.

power automate dynamic contents
Power Automate dynamic contents

Next, we will add an action that will notify the user when a new tweet arrived and contains the specified text.

Click on +Next step > Send an email (V2). Set the parameters such as:

  • To- Specify an user ID.
  • Subject- Give a subject to the email.
  • Body- Specify body using dynamic content.

We can see all the dynamic content that refers from the previous trigger i.e. When a new tweet is posted.

Dynamic contents in Power Automate
Dynamic contents in Power Automate

When someone posts a tweet that contained ‘Power Automate’ then it will notify the mentioned user with the tweet text.

MS flow Dynamic content
MS flow Dynamic content

We can see it will notify the user through outlook with the tweet text:

what is Dynamic contents in Power Automate
what are Dynamic contents in Power Automate

This is how we can use Dynamic content from the previous actions and triggers in Power Automate.

Read Start and wait for an approval Power Automate

Power Automate dynamic content date format

Here we will see how to format a DateTime from dynamic content in Power Automate. For example, by default, the date comes in ‘YYYY-MM-DD’ but we will convert this to ‘dd-mmmm-yyyy’ format.

Let’s trigger the flow manually to create a button flow. Go to +create > Instant cloud flow > Manually trigger a flow > Add a date input.

power automate dynamic content date format
Power Automate dynamic content date format

Then we will add a compose action. That will format the date-time into ‘dd-mmmm-yyyy’.

Go to +Next Step > Compose > expression.

formatDateTime(triggerBody()['date'],'dd-MMMM-yyyy')

Here the ‘(triggerBody()[‘date’])’ is a dynamic content.

Dynamic content date format Power Automate
Dynamic content date format Power Automate

Let’s save the flow and test it manually. It will ask to insert a date in ‘YYYY-MM-DD’. Then click on Run flow.

Microsoft flow dynamic content date format
Microsoft flow dynamic content date format

Now we can see the date is formatted in the specified format:

Date format Dynamic Content field
Date format Dynamic Content field

This is how to do Power Automate dynamic content date format.

Read Power Automate shared mailbox

Power Automate dynamic content list

In Power Automate, we will see the list of dynamic content that comes from previous triggers and actions in that flow.

For example, we have created a button flow to send an approval request.

Create an approval flow on Power Automate
Create an approval flow on Power Automate

Next, we will add an action that will send the response to the user via outlook.

Click on + New step > Send an email. It will ask to fill the parameters such as To, Subject, Body. You can select any parameters to see the list of the dynamic contents that refers to the previous trigger(Trigger the flow manually) and the action(start and wait for approval).

Power Automate dynamic content list
Power Automate dynamic content list

We can add dynamic content to the flow by clicking on Add dynamic content. There are options to see more and less dynamic contents that refer to each previous action and trigger. We can use these dynamic contents according to our needs.

This is how to check the dynamic contents in Power Automate.

Read Power Automate flow with Microsoft teams

Power Automate dynamic content not available or missing

Sometimes we faced trouble getting the dynamic contents in Power Automate. For example, here we have created an automated flow that triggers it when an item is created in the SharePoint list.

Log in to the Power Automate > +Create > Automated cloud flow > When an item is created (under SharePoint).

Power Automate dynamic content missing
Power Automate dynamic content missing

Next, we will add a compose action and select the input field to use dynamic content as the input. But unfortunately, we don’t get any dynamic content here. Click on +New step > Compose.

Power Automate dynamic content not showing
Power Automate dynamic content not showing

As the power Automate is not targeting any site and list, so it did not get any information to fetch. That’s the reason why the dynamic content is missing in the Power Automate.

After configuring the trigger, we can see the dynamic content in the Power Automate. Let’s configure the trigger by inserting the SharePoint site address and the list name. We can see the dynamic content that comes from the triggered SharePoint list.

Power Automate dynamic content not available
Power Automate dynamic content not available

Note- Before working on the next action make sure to configure your flow with the appropriate connector.

This is how to get the missing dynamic content in the Power Automate.

Read Power Automate vs Nintex

Power Automate dynamic content today’s date

Here we will see how to get today’s date that changes dynamically in Power Automate.

For this, here we have created an instant button flow that will trigger the flow manually.

Go to +Create flow > Instant cloud flow > Manually trigger the flow.

Trigger a button flow manually
Trigger a button flow manually

Then we will add a compose action and choose Date from dynamic content that will show the date current date i.e. the flow was triggered.

Power Automate dynamic content today's date
Power Automate dynamic content today’s date

Let’s save the flow and test it manually. We can see the current date comes in ‘2022-01-09’ format.

Get current date from instant flow
Get current date from instant flow

Instead of Date, we can use expression inside the Compose action that will show the current date:

utcNow()
Current date using Dynamic content in Power Automate
Current date using Dynamic content in Power Automate

Also, we can format this date in ‘dd-MMMM-yyyy’ format using an expression in Compose action.

formatDateTime(outputs('Current_date'), 'dd-MMMM-yyyy')
Get Today’s date in Power Automate
Get Today’s date in Power Automate

Let’s save the flow and test it manually. We can see the current date will come as ’09-January-2022′.

date dynamic content in Power Automate expression
Date dynamic content in Power Automate expression

This is how to check today’s date using dynamic content in Power Automate.

Read Power Automate or Microsoft Flow delete all files in a folder

Power Automate dynamic content if expression

Here, we will see how to use dynamic content in if expression on Power Automate. For example, we will create a simple flow that will check whether the number is grater than another number or not.

The number should come from dynamic content or we can insert any 2 numbers dynamically.

First, we will create an instant flow or a button flow that will trigger the flow manually.

Go to + Create > Instant cloud flow > Manually trigger the flow.

Inside this trigger, we will add 2 numbers input by clicking on +Add an input.

Power Automate dynamic content if expression
Power Automate dynamic content if expression

Next, we will add a condition action that will compare the 2 dynamic numbers whether the number1 is greater than another number or not.

For this, click on +New step > Condition control. Set the Parameters such as:

  • Choose a value- Select Number from Dynamic content that refer to the trigger.
  • Operator- Is greater than
  • Choose a value- Select Number1 from Dynamic content that refer to the trigger.
If expression using dynamic content in Power Automate
If expression using dynamic content in Power Automate

In both, If yes and if no part, we will add a compose action using the dynamic content that will show which number is greater.

If statement in expression, dynamic content
If statement in expression, dynamic content

Now our flow is ready to run. Test it manually. We can see it will ask to insert 2 numbers for comparison. For example, we will 2 numbers i,e. 20 and 15.

If expression using dynamic content on Power Automate
If expression using dynamic content on Power Automate

Then click on Run flow. It will show the result as below:

Power Automate If expression using Dynamic content
Power Automate If expression using Dynamic content

This is how to use the dynamic content in Power Automate If expression.

Read Upload PowerApps Attachments to SharePoint Library Folder

Power Automate dynamic content in expression

Now we will see how to use the dynamic content in an expression using Power Automate. For example, we have created a Sharepoint list where the equipment’s order will be inserted with their respective order date.

An example of simple SharePoint list having date column
An example of simple SharePoint list having date column

In the SharePoint list, the date will be stored in ‘MM/dd/yyyy‘ format i.e. 01/10/2022 but as per our requirement, when the order details will send via outlook it will convert the date in ‘dd-MMMM-yyyy‘ format i.e. 10-January-2022. For this, we are going to an automated flow and the following steps are:

Step-1:

Let’s create an automated flow that will trigger the flow when an item is created in the SharePoint list.

Go to +Create > Automated cloud flow > When an item is created. Here we can give a name to the flow.

 dynamic content in expression Power Automate
Dynamic content in expression Power Automate

Then click on Create. Here we will configure the trigger with the SharePoint site address and the list name to fetch the data with SharePoint list.

Configure the trigger to fetch with SharePoint list
Configure the trigger to fetch with SharePoint list

Step-2:

Next, we will add a Compose action using an expression that will format the dynamic date into desired format.

formatDateTime(triggerOutputs()?['body/OrderDate'],'dd-MMMM-yyyy')
Using dynamic content in expression in Flow
Using dynamic content in expression in Flow

Step-3:

Then we will add an action to send an notification to the user about the order details using this formatted date. Go to +Create > Send an email(v2). Here it will ask to set the parameters as below:

  • To– Set the user id to whom you want to notify.
  • Subject– Give a subject name to the notification.
  • Body– Set the email body using dynamic content and the formatted date.
How to use Expressions in Dynamic content
How to use Expressions in Dynamic content

Let’s save the flow and test it manually. Then insert a data to run the flow.

Dynamic Content in Power Automate expression
Dynamic Content in Power Automate expression

We can see it will send a notification via outlook with formated date:

Expression Functions in Power Automate
Expression Functions in Power Automate

This is an example of how to use dynamic content in Power Automate expression.

Read Power Automate add days to date

Power Automate dynamic content excel

Here, we will see how to use dynamic content in excel using Power Automate. For this, we will create a Microsoft form where the user submits their responses and the data will automatically be stored in the excel file via Power Automate.

So we need two things here:

  • Excel sheet where the responses will be stored
  • Microsoft Form where the responses will submitted.

Here is a step-by-step guide to implementing this:

Step-1:

First, we will create an excel sheet under the SharePoint site.

On SharePoint, go to App launcher(Apps) > Excel.

Power Automate dynamic content excel
Power Automate dynamic content excel

Then it will open an excel sheet where we will create a sheet based on the Employee Information having columns such as ID, Name, Department, JoinDate, Contact, EmpNo.

After creating an excel sheet, we will set a table name. For this, go to Insert > Table > Table Design > table name.

Power Automate using dynamic content in excel
Power Automate using dynamic content in excel

Step-2:

Next, we will create a Microsoft form. Similarly, on SharePoint, select Form.

Create a Microsoft form
Create a Microsoft form

To create a Microsoft form, click on + New Form.

Next, we will give a name to the form and then click on +Add new to add questions according to the excel sheet.

  • Full Name- Text
  • Department- Choice
  • Join Date- Date
  • Contact- Text
  • Employee No- Text
How to create a Microsoft form under SharePoint
How to create a Microsoft form under SharePoint

After adding all questions the form will look like below:

Creating a Microsoft form
Creating a Microsoft form

Next, we will open this flow in the browser so that we can submit our responses.

Go to Share > Copy the link > Open it to another tab or browse.

Open Microsoft form in another tab
Open Microsoft form in another tab

Step-3

Now we will create an automated flow, it will store the data automatically in the excel file when a response is submitted via Microsoft form.

On Power Automate, go to +Create > Automated cloud flow > Select the trigger ‘When a new response is submitted’ > Create.

Power Automate Forms to Excel using dynamic content
Power Automate Forms to Excel using dynamic content

Then it will ask to select the form Id from the dropdown list. Here we will select the form name that we have created i.e. Employee Information.

Trigger the flow when a new response is submitted on Microsoft flow
Trigger the flow when a new response is submitted on Microsoft flow

Step-4:

Then we will add an action that retrieves a form response. Click on +New step > Select the action ‘Get response detail‘. It will ask to set the parameters such as Form Id and Response Id.

  • Form Id- Select Employee Information from the Dropdown.
  • Response Id- Select Response Id from the trigger.
Using dynamic content in excel
Using dynamic content in excel

Step-5:

Now we will add an action that will add a new row into the Excel table that comes from the form response.

Go to +New step > select the action Add a row into a table. Set the parameters such as:

  • Location– Select the sharepoint document library location from the dropdown list.
  • Document Library– Select the document library from the dropdown.
  • File– Select the excel file.
  • Table– Choose the table name fro the dropdown list.
Excel Get Rows using Power Automate
Excel Get Rows using Power Automate

After selecting the table, it will show us all the columns that are available in the table such as:

Note- Select all the fields from the dynamic content.

  • ID– Response ID
  • Name- full name
  • Department– Department
  • JoinDate– JoinDate
  • Contact– Contact
  • EmpNo– EmpNo.
How to access Excel with a dynamic path
How to access Excel with a dynamic path

Let’s save the flow and select to test it manually. Now we will fill the form and submit it to run the flow. For example, here we will set the employee name John and his information like below

Create and fill an Excel file dynamically with Power AutomateCreate and fill an Excel file dynamically with Power Automate
Create and fill an Excel file dynamically with Power Automate

We can see the response got updated in the excel sheet.

Allow Dynamic Content in Excel File fields
Allow Dynamic Content in Excel File fields

This is how we can insert data dynamically in excel via Microsoft form using Power Automate.

Read Power Automate Increment Variable

Add dynamic content Power Automate

Now we will see how to add dynamic content in Power Automate. For this, we will create an instant cloud flow having 2 number inputs.

Go to +Create > Instant cloud flow > Manually trigger the flow > + Add an input > Number.

Add dynamic content Power Automate
Add dynamic content Power Automate

Next, we will add a compose action with an expression using add function. Go to + New step > Compose.

add(triggerBody()['number'],triggerBody()['number_1'])
Power Automate Add dynamic content
Power Automate Add dynamic content

Let’s Save the flow and test it manually. It will ask to insert any 2 numbers dynamically to run the flow:

Add function with dynamic content
Add function with dynamic content

Then click on Run flow. It will show the addition of the two numbers in the compose:

dynamic content Power Automate Add
Dynamic content Power Automate Add

This is how to add dynamic content in Power Automate.

Read Power Automate SharePoint Get items filter query contains is not valid

Concat dynamic content Power Automate

Here we will see how to concatenate dynamic contents in Power Automate. For example, we have a SharePoint list based on Child’s registration having columns such as father’s name, child’s name, birthdate.

As per our requirement when we insert the data on the SharePoint list, it will concatenate all the data and update it in another column i.e. details.

Concat dynamic content Power Automate
Concat dynamic content Power Automate

Now we will create an automated flow that will trigger when an item is created in the SharePoint list.

Go to My flow > + New flow > Automated Cloud flow.

How to create an automated flow on Power Automate
How to create an automated flow on Power Automate

Then select the trigger ‘When an item is created> Create. Then configure the trigger to fetch the SharePoint list by giving the site address and list name.

fetch the trigger with the SharePoint list
fetch the trigger with the SharePoint list

Then we will add Compose action using an expression that will concatenate all the details inserted in the list. Go to + New step > Compose.

concat(triggerOutputs()?['body/FatherName'],triggerOutputs()?['body/ChildName'],'-',triggerOutputs()?['body/BirthDate'])
Power Automate concatenate dynamic content
Power Automate concatenate dynamic content

Next, we will add an action that will update the concatenated result in the SharePoint list. Click on +New step > Update item. Set the properties like below:

  • Site Address– Set the SharePoint site address.
  • List Name– Specify the list name.
  • Id– select ID from the dynamic content.
  • Details– Select Output from the compose.
Power automate concat expression dynamic content
Power automate concat expression dynamic content

Now save the flow. Test it manually. Let’s insert the data in the SharePoint list:

How to concat dynamic content Power Automate
How to concat dynamic content Power Automate

It will concat the all the data and update the details in the SharePoint list:

How to concatenate dynamic content in Power Automate
How to concatenate dynamic content in Power Automate

This is how to concatenate dynamic content in Power Automate.

Read Power Automate copy list item to another list with attachments

Power Automate convert dynamic content to string

Here we will see how to convert dynamic content to string on Power Automate. In Power Automate, the string function allows converting the dynamic into upper case, lower case, number to a string, extracting the substring from the given string, etc.

Example-1: dynamic content (number) to string

Let’s create an instant flow that triggers manually. On Power Automate, go to My flow > +New Flow > Instant cloud flow > Manually trigger a flow.

Next, we will add a number input where we will insert any number dynamically.

Power Automate convert dynamic content to string
Power Automate convert dynamic content to string

Next, we will add a Compose action using an expression that will convert the dynamic number to a string:

string(triggerBody()['number'])
convert dynamic content to string Power Automate
convert dynamic content to string Power Automate

Let’s save the flow. Test it manually. It will ask to insert a dynamic number. Then click on Run Flow.

Power Automate convert the dynamic content to string
Power Automate convert the dynamic content to string

This is how to convert a dynamic number to a string using Power Automate.

Example-2: convert dynamic content(string) to uppercase string

Similarly, we will see how to convert any dynamic string to upper case i.e. xyz to XYZ using Power Automate:

Here, we will trigger the flow manually using a text input, and then we will add a compose action using an expression that will convert the dynamic string to uppercase.

toupper(triggerBody()['text'])
Dynamic content to uppercase string on Power Automate
Dynamic content to uppercase string on Power Automate

Let’s test this flow manually. It will ask to insert a text and then run the flow. We can see it will convert the string into uppercase.

dynamic content to uppercase string using Power Automate
Dynamic content to uppercase string using Power Automate

This is how to convert dynamic content to uppercase string using Power Automate. Similarly, we can convert the dynamic content to lowercase. This is how to convert dynamic content to string in Power Automate.

Read Power Automate save email attachment to SharePoint

Trim dynamic content Power Automate

In Power Automate, there is a function names ‘trim’ that will remove the extra space from the beginning and the end of the string. But it will not remove spaces from the space between the string.

For example, if we insert a dynamic string ‘ xyz ‘ then the output will come as ‘xyz’.

Let’s create an instant flow that will trim the extra space from the given string.

On Power Automate > My flow > +New flow > Instant cloud flow > Trigger the flow manually.

Here we will trigger the flow manually by using a text input where we will insert any dynamic text to run the flow. Click on + Add an input > text.

Next, we will add a Compose action using an expression that will remove the space from the given string. Click on + New step > Compose.

trim dynamic content Power Automate
Trim dynamic content Power Automate

Now just save the flow and it will ask to insert a text when we test it manually. Let’s insert a text with some spaces i.e. TSInfo Technology.

Removing trailing spaces from dynamic content
Removing trailing spaces from dynamic content

Then click on Run flow. It will retun the string by removing it’s extra spaces:

Using Trim expression with Dynamic Content in Power Automate
Using Trim expression with Dynamic Content in Power Automate

This is how to use trim expression with Dynamic Content in Power Automate.

Power automate condition dynamic content

Here we will see how to use conditions in dynamic content using Power Automate. For example, we have created a SharePoint list based on voter details having columns such as title, age, and their eligibility whether he is eligible for voting or not.

power automate condition dynamic content
power automate condition dynamic content

Let’s create an automated flow that will trigger the flow when an item is created. For this, go to +Create > Automated cloud flow > select the trigger When an item is created. Then configure the trigger with the SharePoint site address and the list name.

Condition dynamic content Power Automate
Condition dynamic content Power Automate

Next, we will add a condition action that will check if the age is greater than or equal to 18 then the voter is eligible for voting otherwise he is not eligible for voting. Go to +New step > Condition. Set the properties like below:

  • Choose a value– select Age from dynamic content.
  • Operator– is greater than or equal to
  • Choose a value– 18
Condition using dynamic content  Power Automate
Condition using dynamic content Power Automate

If the condition got satisfied then it will update the eligibility as ‘Yes’ otherwise it will update as ‘No’.

In both If yes and If no, click on Add an action > Update item. Then set the properties like below:

  • Site Address– Set the SharePoint site address
  • List Name– Choose the SharePoint list name
  • Id– Select ID from the dynamic content
  • Title– Select Title from the dynamic content
  • Eligibility– set as Yes in If yes part and set it as No in If no part.
Using Power Automate conditions with dynamic content
Using Power Automate conditions with dynamic content

Let’s save the flow and test it manually. Then we will insert a data on the SharePoint list:

power automate condition using dynamic content
Power Automate condition using dynamic content

Now refresh the list, then it will show the eligibility of that voter.

power automate use dynamic content in condition
Power Automate use dynamic content in condition

This is how to do Power Automate use dynamic content in condition.

Power Automate combine dynamic content with string

Now we will see how to combine dynamic content with string in Power Automate. For example, we have created a SharePoint list based on employee details having columns such as Title, EmpID, Surname, Fullname.

power automate combine dynamic content with string
Power Automate combine dynamic content with string

Now we will create a flow that will combine the EmpID and the Surname with a specified string. For this, first, we will create an automated flow that trigger the flow when an item is created.

On Power Automate, go to +Create > Automated cloud flow > select the trigger ‘when an item is created‘. Next we will configure the trigger with the SharePoint site address and the list name.

Trigger the flow when an item is created in SharePoint list
Trigger the flow when an item is created in SharePoint list

Next we will add a compose action using an expression that will combine the dynamic content with the string. Click on +New step > Compose > Expression.

concat('TsInfo','-',triggerOutputs()?['body/EmpID'],'-',triggerOutputs()?['body/Surname'])
combine dynamic content with string in Power Automate
Combine dynamic content with string in Power Automate

Next, we will add an action that will update the full name with the output of the compose in the SharePoint list. Go to + New step > Update item. Set the properties like below:

  • Site Address- Set the SharePoint site address
  • List Name- Choose the SharePoint list name .
  • Id- Select ID from the dynamic content.
  • Title- Select Title from the dynamic content.
  • Full NameOutput from the compose action.
Combine the dynamic content with String Functions in Power Automate
Combine the dynamic content with String Functions in Power Automate

Let’s Save the flow and test it Manually. Then insert a data to trigger the flow.

Combine dynamic Content with string using Power Automate
Combine dynamic Content with string using Power Automate

Now refresh the SharePoint list, it will update the Full Name to ‘string(TSInfo)-EmpID-Surname’.

combine the dynamic content with string in Power Automate
combine the dynamic content with string in Power Automate

This is how to combine the dynamic content with string in Power Automate.

Power Automate dynamic content email

Let’s take an example, where we will use dynamic content in email through Power Automate. To implement this, we are going to use the previous SharePoint list(Employee Details) and the previous flow that we have created to combine a string with dynamic content.

In this flow, we will add action that will send an email to the user or teamlead about the employee via outlook.

After update item, click on + New step > Send an email(v2).

power automate dynamic content email
power automate dynamic content email

Click on that action and it will add on the flow. Then set the following parameters like below:

  • To- Set an user ID to whom you want to send the email.
  • Subject– Set a subject to the email.
  • Body– Specify the body using dynamic content from the previos actions and trigger.
Send an email (V2) using Dynamic Content
Send an email (V2) using Dynamic Content

Let’s save the flow and test it manually. To trigger the flow, we will insert a data in the SharePoint list:

Power Automate using dynamic content in email
Power Automate using dynamic content in email

Now we can see the details in the email via outlook:

Dynamic Content in Power Automate Email
Dynamic Content in Power Automate Email

This is how to use the dynamic content in Power Automate Email.

In Power Automate email, it allows us to send the details of any item via link. In the previous example, we have seen how to send an email using dynamic content. But now, we will see how to send an email using a link.

For this, go to the flow that we have created previously. Then open it in Edit mode and expand the ‘Send an email(v2)‘ action.

In Body, there is an option for Link. Click on that and it will ask to give a title of the link and target of the link.

power automate dynamic content email link
power automate dynamic content email link

Let’s set a title and target of the link.

Note- Here we are going to give the SharePoint site URL as Link Target.

Dynamic Content in Power Automate Email Links
Dynamic Content in Power Automate Email Links

There is an option that allow to open link in new window. Then click on Add. We can see the link will merged with the Link Title and comes in a blue color link.

Power Automate Dynamic Content Email Links
Power Automate Dynamic Content Email Links

Similarly, in email we can see the link comes with blue color. When we click on that link it will open in another tab.

Power Automate Dynamic Content in Email Links
Power Automate Dynamic Content in Email Links

This is how to send email links in Power Automate Dynamic content.

Power Automate dynamic content file name

Now we will see how to change the file name using dynamic content in Power Automate. For example, when we upload a file in a folder it will store in the name with the current date.

Let’s say we will upload a file in the SharePoint folder named as Samplesheet.pdf.

Dynamic content file name using Power Automate
Dynamic content file name using Power Automate

But as per our need, we want to store this pdf with the current date such as Samplesheet(current date).pdf. To implement this, we will create an instant flow and the following steps are:

Step-1:

On Power Automate, go to +Create > Instant cloud flow > Manually trigger a flow > Create.

power automate dynamic content file name
Power automate dynamic content file name

Step-2:

Next, we will add an action that will get the file contents using file identifier. Click on +New step > Get file content. Here we will set the SharePoint site address and file identifier(file path).

How to use dynamic file name to get file content Power Automate
How to use dynamic file name to get file content Power Automate

Step-3:

Next, we will add a Compose action using an expression that will retrieve the current date in ‘dd-MMM-yyyy‘.

Go to +New step > Compose > Expression > Update.

formatDateTime(utcNow(),'dd-MMM-yyyy')
Creating unique file names in a SharePoint library using Power Automate
Creating unique file names in a SharePoint library using Power Automate

Step-4:

Next, we will add an action that will create the file in the existing SharePoint library. Click on +New step > Create file. Set the properties like below:

  • Site Address– Set the SharePoint site address
  • Folder Path– Select the folder path of the files
  • File Name– Set a file name with the output of the compose
  • File Content– Select file content from the dynamic content.
Working with Dynamic Excel File Names Power Automate
Working with Dynamic Excel File Names Power Automate

Step-5:

After creating a file, we will add an action that will delete the old file from the SharePoint folder.

Go to + New step > Delete file. Set the SharePoint site address and it the File identifier, set the file path.

How to use dynamic content in file name Power Automate
How to use dynamic content in file name Power Automate

Let’s Save the flow and test it manually. Then click on Run flow. We can see it will create a new file with current date and also, delete the old file from the SharePoint document library.

Using Dynamic content file name in Power Automate
Using Dynamic content file name in Power Automate

This is how to use the Dynamic content file names in Power Automate.

Power Automate split dynamic content

A split function is used to break a text string into a table of substrings. It requires a separator to split the string.

Here we will see how to use this function to split the dynamic string in Power Automate. We can split a string, also, it allows us to split the string into an array that we have inserted dynamically.

Example-1: Split the string

In this example, we will see how to split a text string. To implement this, we are going to create an instant button flow.

On Power Automate, go to +Create > Instant cloud flow > Manually trigger a flow.

How to trigger a flow manually
How to trigger a flow manually

Next, add a text input where we will insert any string dynamically.

Inside the trigger, click on +Add an input > Select Text.

Trigger a button flow manually in Power Automate
Trigger a button flow manually in Power Automate

Let’s say we will insert a dynamic string such as ‘If it is yes then it will be approved; otherwise it will be rejected and we want to split this string into two strings using separator ‘;‘.

For this, we will add a Compose action with an expression using a Split function. Go to +New step > Compose > Expression > update.

split(triggerBody()['text'],';')

It indicates when we will insert any strings in the textbox that contains semicolons then the string will be split.

power automate split dynamic content
Power automate split dynamic content

Next, we will add another compose action to show the output of this compose.

splitting dynamic content in Power Automate
splitting dynamic content in Power Automate

Let’s save the flow and test it manually. It will ask to insert a text to trigger the flow.

Power automate split string dynamic content
Power automate split string dynamic content

Then click on Run flow. We can see the output will come as like below:

How to split dynamic content string in Power Automate
How to split dynamic content string in Power Automate

This is how to split the dynamic content in Power Automate.

Example-2: Split the string into an array

Similarly, here we will add a compose action using an expression that will split the string by comma.

Under the trigger, Click on +New step > Compose > Expression.

split(triggerBody()['text'], ',')
Split the string into an array in Power Automate dynamic content
Split the string into an array in Power Automate dynamic content

Let’s save the flow and test it manually. It will ask to insert the string. Here we will insert some strings using a comma ex: John, Johny, Jack, Joy, Jullie.

Power automate split string into an array with examples
Power automate split string into an array with examples

Then click on Run flow. The output will appear as an array.

Split string into array using dynamic content Power Automate
Split string into an array using dynamic content Power Automate

This is how to split the string into arrays using dynamic content Power Automate.

Power Automate teams dynamic content

Now we will see how to use the dynamic content in the Microsoft teams via Power Automate. For example, when we will create an item in the SharePoint list it will notify the recipient via the Microsoft team instead of outlook email.

Here we have created a simple SharePoint list based on tasks having columns such as Title, submit date.

Example of simple SharePoint list with columns
Example of simple SharePoint list with columns

Now we will create an automated flow, that will trigger the flow when an item is created in the task list and notify the recipient via the Microsoft team.

On Power Automate, go to +Create > Automated cloud flow > select the trigger When an item is created or modified > Create.

Trigger the flow when an item is created or modified in SharePoint list
Trigger the flow when an item is created or modified in the SharePoint list

Next, configure the trigger with the SharePoint site address and the list name.

Trigger the flow when an item is created or modified in the SharePoint list
Trigger the flow when an item is created or modified in the SharePoint list

Then we will add an action that will post a message to a chat or a channel. Go to + New step > posts a message in a chat or a channel. Set the parameters like below:

  • Post as– flow bot
  • Post in– Chat with flow bot
  • Recipient– Set an user ID
  • Message– Set a message using dynamic contents such as Title and Submit date from the previous trigger.
power automate teams dynamic content
Power Automate teams dynamic content

Now save the flow. Test it manually. Then Modified the submit date or you can create a new item in the SharePoint list. Here we have modified the Submit date to 1/25/2022.

Teams Message Body dynamic content in Power Automate
Teams Message Body dynamic content in Power Automate

Now we can see a message in the recipient’s team:

Dynamic content teams in Power Automate
Dynamic content teams in Power Automate

This is how to use dynamic content teams in Power Automate.

Here we will see how to create a hyperlink using dynamic content on Power Automate. Let’s create a flow using dynamic content as a hyperlink.

For this, we will trigger the flow manually on Power Automate. On the left navigation of Power Automate, go to My flow > New flow > Instant cloud flow.

power automate hyperlink dynamic content
Power Automate hyperlink dynamic content

Then select the trigger to start the flow manually. Click on Create.

Create a button flow on Power Automate
Create a button flow on Power Automate

Now our flow is created. Then we will add an action that will initialize a string variable.

Click on + New step > Initialize variable. Set the parameters like below:

  • Name– give a varibale name (ex- VarLink)
  • Type- String
power automate dynamic content create hyperlink
power automate dynamic content create a hyperlink

After initializing a variable, we will add an action that will set the variable with a URL. Click on +New step > Set variable. It will ask to set the following properties:

  • Name– Select the initialized varibale(i.e. Var Link)
  • Value– Set a URL(ex- https://india.flow.microsoft.com/)
Add Dynamic Hyperlinks in Emails Sent by Microsoft Power Automate
Add Dynamic Hyperlinks in Emails Sent by Microsoft Power Automate

Now we will add an action that will send an email using the variable as a dynamic hyperlink. Go to +New step > Send an email(v2). Here we will set the parameters like below:

  • To- Set an user ID to whom we want to send the email.
  • Subject- Set a subject to the email.
  • Body- Specify the body of the email. (ex- Hi, There is an important notification. Kindly have a look at that:)
Adding link with dynamic content in send an email action
Adding link with dynamic content in send an email action

To add a hyperlink click on the Code view symbol ‘</>’ in the body. It will open as an HTML view. Then add the below HTML expression to create a hyperlink on the email body.

<a href= "@{variables('Var Link')}"> Click here </a>
Working With Dynamic Hyperlinks in the Outlook Send an email
Working With Dynamic Hyperlinks in the Outlook Send an email

Let’s Save the flow and test it manually. Click on run flow.

How To Update Hyperlink Fields With URL using Power Automate
How to update hyperlink fields with URL using Power Automate

This is how to create a hyperlink with a URL using Power Automate.

Power Automate switch dynamic content

Now we will see how to use the dynamic content in switch case on Power Automate. For this, we have prepared a Sharepoint list based on Employee details having some columns such as Title, EmpID, Department(Choices i.e. IT, finance, Testing, HR), Team.

power automate switch dynamic content
power automate switch dynamic content

As per our requirement, if the department is IT then the employee should be in TeamA, If the department is Finance then the employee should be in TeamB. Otherwise, it will switch to TeamC.

Let’s create a flow that will update the team according to department automatically. For this, on Power Automate, go to +create > Automated cloud flow > Select the trigger ‘When an item is created‘. Then configure the SharePoint site address and the list name.

Power Automate Switch case using Dynamic content
Power Automate Switch case using Dynamic content

Then we will add a switch condition. It will ask to set the parameter ‘on‘ i.e. on which we want to apply condition. Here we will set the Department from the dynamic content.

Switch Control Action in Power Automate Dynamic content
Switch Control Action in Power Automate Dynamic content

It will show the case section, where we will set the Department values or choices. If the condition met then it will update the team in the SharePoint list.

In Case1, set the Equals to IT. Then click on +Add an action > update item. Set the properties like below:

  • Site Address– Set the SharePoint site address
  • List Name– Select the SharePoint list name
  • Id- Select ID from dynamic content
  • Title- Select Title from dynamic content
  • Team- TeamA
How to use switch condition in power automate Dynamic content
How to use switch condition in power automate Dynamic content

Then click on ‘+‘ symbol to add another case. Similarly, here we will add another condition if the value equals to Finance then it will update the team as TeamB.

Power Automate Switch Control Action In Workflows using Dynamic content
Power Automate Switch Control Action In Workflows using Dynamic content

After case1 and case2, we will set the Default section. If the department is not equal to IT and Finance, then it will move to default section where it will update the team as TeamC.

In side the Default case, click on +Add an action > Update item. Set the following parameters like below:

  • Site Address– Set the SharePoint site address
  • List Name– Select the SharePoint list name
  • Id- Select ID from dynamic content
  • Title- Select Title from dynamic content
  • Team- TeamC
Dynamic Content In Power Automate Switch condition
Dynamic Content In Power Automate Switch condition

Now Save the flow and test it manually. Insert a new data in the Employee details list.

Power Automate Dynamic Content Switch
Power Automate Dynamic Content Switch

This is how to use switch case in Power Automate dynamic content.

Power Atomate compose dynamic content

Now we will see how to use dynamic content in compose action on Power Automate. For example, we have prepared a SharePoint list based on the equipment’s orders. When we insert an order date then it will update the expected delivery date of the equipment.

power automate compose dynamic content
Power Automate compose dynamic content

Now we will create an automated flow that will trigger the flow when an item is created.

On Power Automate, go to +Create > Automated cloud flow > Select the trigger ‘When an item is created‘. Configure the SharePoint site address and the list name.

using compose dynamic content in Power Automate
using compose dynamic content in Power Automate

Next, we will add a Compose action using an expression that will add days in the order date. Here the order date is a dynamic content.

addDays(triggerOutputs()?['body/OrderDate'],10,'MM/dd/yyyy')
Power Automate Dynamic content in compose action
Power Automate Dynamic content in compose action

Next, we will add an action that will update the date in the Expected delivery date column(a single line column).

Click on + New step > Update item. Set the parameters like below:

  • Site Address– Select the SharePoint site address
  • List Name– Choose the SharePoint list name
  • Id– Select ID from the dynamic content
  • Title- Select Title from the dynamic content
  • Expected Delivery DateOutput of the compose action
Use dynamic Content in Compose
Use dynamic Content in Compose

Now save the flow and test it manually. Insert a data in the SharePoint list:

Compose with dynamic content in Power Automate
Compose with dynamic content in Power Automate

Let’s refresh the browser to see the Expected Delivery Date.

Flow with dynamic content in Compose
Flow with dynamic content in Compose

This is how to use compose dynamic content in Power Automate.

Power Automate dynamic content in HTML

In this section, we will see how to convert a HTML document into plain text using dynamic content in Power Automate.

For this, we will create a button flow. On Power Automate, go to +Create > Instant cloud flow > Manually trigger the flow > Create.

Create an instant flow on Power Automate
Create an instant flow on Power Automate

Next, we will add a Compose action using a sample HTML document as inputs. For example:

<html> 
<body>

<p> Delivering Business At The Best </p>
<a href= "https://www.tsinfotechnologies.com/"> See Details </a>

</body>
</html>
power automate dynamic content in html
Power Automate dynamic content in html

Next, we will add an action that will convert the HTML documents to plain text. Go to + New step > Html to text. Here we will add the output of the compose from the dynamic content.

power automate dynamic content to convert html to plain text
Power Automate dynamic content to convert html to plain text

To get the output of the HTML to the plain text, again we will add another compose action. Here we will pass ‘the plain text content‘ from the dynamic content of Html to text.

Microsoft Flow How to Working with Dynamic Content HTML
Microsoft Flow How to Working with Dynamic Content HTML

Now our flow is ready. Let’s save it and test the flow manually. We can see the output will convert into plain text from the HTML.

How to add dynamic data in an HTML document via Power Automate flow
How to add dynamic data in an HTML document via Power Automate flow

This is how to add dynamic data in an HTML document via Power Automate flow.

Power Automate dynamic content in html table

Here we will see how to create an HTML table using dynamic content in Power Automate. To implement this, we have prepared a SharePoint list based on Office’s equipment orders having columns such as Title, Requestor, Order Date, Approver.

Example of a simple SharePoint list
Example of a simple SharePoint list

Next, we will create an instant cloud flow on Power Automate. Go to My flow > +New flow > Instant cloud flow.

How to create an instant cloud flow
How to create an instant cloud flow

Then select the trigger ‘Triiger a flow manually> Create. Also, we can give a name to the flow.

How to trigger a flow manually in Power Automate 1
How to trigger a flow manually in Power Automate

It will create a flow on the Power Automate. Then we will add an action that will get all the items from the specified SharePoint list.

Go to + New step > Get items. Then configure the action with the SharePoint site address and the list name.

Configure the actions with the SharePoint
Configure the actions with the SharePoint

After getting all the items from the SharePoint list, we will add an action that will create an HTML table from the dynamic content. Go to + New step > Create HTML table. Set the following properties below:

  • From– Select value from the get items dynamic content.
  • Columns- set as custom.

It will ask to set the Header (it should be columns name)and its value(Select the values from the dynamic content).

Power Automate create an HTML table
Power Automate create an HTML table

It will create an HTML table and now, we will add a compose action(using an expression)that will format the HTML table by adding the CSS code in it. Go to +New step > Compose > Expression.

replace(body('Create_HTML_table'),'<table>','<table border = "2">')
Power Automate HTML Table using Dynamic Table
Power Automate HTML Table using Dynamic Table

Then we will add an action to send the HTML table via outlook. Click on +New step > Send an email. Set the following properties below:

  • To- Set the user ID to whom we want to send the email.
  • Subject- Set the subject of the email.
  • Body- Insert the Output from the dynamic content of the Compose.
Power Automate dynamic content HTML table
Power Automate dynamic content HTML table

This is what the entire flow looks like:

Create HTML Table Using Microsoft Flow
Create HTML Table Using Microsoft Flow

Now our flow is ready to run. Let’s save the flow and test it manually. We can see the Html table in the email:

HTML tables in Power Automate using Dynamic content
HTML tables in Power Automate using Dynamic content

This is how to create an HTML table using Dynamic content in Power Automate.

Power Automate create file dynamic content

In this example, we will see how to create a file using dynamic content in a SharePoint folder. Let’s say it will create a new file in the SharePoint folder if the attachment is in excel or pdf format.

To implement this, we will create an automated flow that will trigger when an email will arrived.

Click on +create > Automated cloud flow > Select the trigger ‘When a new email arrives (V3)> Create.

Trigger the flow when a new email arrives
Trigger the flow when a new email arrives

We can see it will start the flow. Next, we will add action to get the attachments from the email by id. Click on +New step > Get Attachment(V2) under outlook. It will ask to set the parameters such as:

  • Message Id– Select Message Id from the dynamic content.
  • Attachement Id– Select Attachment Id from the dynamic content.

Note- We can when we select the attachment id, it will create a apply to each loop that means if there are multiple attachments in the email then it will check each attachment by their id.

power automate create file dynamic content
power automate create file dynamic content

Next, we will add a condition as per our requirement i.e. it will check if the attachment is in pdf or excel format or not.

Inside the loop, Click on +Add an action > Condition. Here we will set two conditions using OR operator. Set the value as below:

  • Choose a value – Select Name from dynamic content (that indicates the file name)
  • Operator– contains
  • Choose a value- .pdf

Similarly, add another condition:

  • Choose a value– Select Name from dynamic content (that indicates the file name)
  • Operator– contains
  • Choose a value– .xlsx
Create a file dynamically with Power Automate
Create a file dynamically with Power Automate

IF the condition got satisfied then it will move to the if yes part and create a new file in the specified SharePoint folder.

Inside the If yes part, click on +Add an action > Create file. Set the parameters such as:

  • Site address- Select the SharePoint Site Address
  • Folder path- Choose the folder path where you want to create a new file
  • File name- Select Name from dynamic content of get attachment action
  • File content-Select Content Bytes from the dynamic content.
Working with File Contents and Files in Power Automate
Working with File Contents and Files in Power Automate

Now our flow is ready to run. So Save the flow and test it manually. For testing purposes, we will send an email to our id from another user-id that contains some attachments.

create file dynamic content in Power Automate
create file dynamic content in Power Automate

We can see it only create 2 files in the specified SharePoint folder excluding the word file.

Dynamic Content in Power Automate create file
Dynamic Content in Power Automate create a file

This is how to create new files in the SharePoint folder using Power Automate Dynamic content.

Related Power Automate tutorials:

Conclusion

We learned all about Power Automate dynamic content. Also, we learned the below topics:

  • What is Power Automate dynamic content?
  • How to retrieve if the dynamic content is missing or not showing in Power Automate?
  • How to use Power Automate dynamic content in expression?
  • How to do date format in Power Automate dynamic content?
  • How to use dynamic content list in Power Automate?
  • How to use dynamic content if expression in Power Automate?
  • How to use the dynamic content in excel using Power Automate?
  • How to show today’s date using Power Automate dynamic content?
  • How to use Power Automate dynamic content in excel?
  • How to add dynamic content in Power Automate?
  • How to concatenate dynamic content in Power Automate?
  • How to convert dynamic content (number) to string?
  • How to convert dynamic content(string) to uppercase string?
  • How to trim dynamic content in Power Automate?
  • Power automate condition dynamic content
  • Power Automate combine dynamic content with string
  • Power Automate dynamic content email
  • Power Automate dynamic content email link
  • Power Automate dynamic content file name
  • Power Automate split the string dynamic content
  • Power Automate Split the string into an array
  • Power Automate teams dynamic content
  • Power Automate hyperlink dynamic content
  • Power Automate switch dynamic content
  • Power Atomate compose dynamic content
  • Power Automate dynamic content in HTML
  • Power Automate dynamic content in html table
  • Power Automate create file dynamic content
  • >