In this Power Automate article, we will learn how to add hyperlinks to SharePoint list items using Power Automate.
Add Hyperlinks to SharePoint List Items using Power Automate
Let us see how to generate and add a SiteURL column with a URL and description in Share Point list items using Power Automate or Microsoft Flow.
In this example, We will use the below SharePoint list called Training Courses, consisting of two columns.
- SiteName – Default title column
- SiteURL – Hyperlink column
- On Power Automate, create an Automated cloud flow and enter the flow name and select the trigger when an item is created, and click on the create option.
- Configure the trigger with the SharePoint site address and List Name.
- Initialize the variable of string data type, to generate the URL based on the title name.
- To remove the empty space and to convert the title value from upper case to lower case add the below formula:
toLower(replace(triggerOutputs()?['body/Title'],' ',''))
Add a compose action and Pass the input as the dynamic content value of the title.
https://www."@variables('VarTitle')".com/
Select + New step, and Add a Send an HTTP request to the SharePoint action. Also, set the properties such as:
- Method – POST
- Uri – /_api/web/lists/getbytitle(‘Training Courses’)/items(@{triggerOutputs()?[‘body/ID’]})
- Headers –
- content-type – application/json;odata=verbose
- X-HTTP-Method: MERGE,
- IF-MATCH: *
- Body– (Insert the below REST API code)
{'__metadata': {'type':'SP.Data.Training_x0020_CoursesListItem'},'HyperLink':
{'Description': '@{triggerOutputs()?['body/Title']}',
'Url': '@{outputs('Compose')}'}
}
Save and test the flow manually, The flow trigger when you create a new item in the SharePoint list like the below:
Once the flow ran successfully the generated URL will be updated in the SharePoint list SiteURL column.
In the below screenshot, we can see that the URL has been added to the HyperLink column using Flow.
This is how to generate and add a SiteURL column with a URL and description in Share Point list items using Microsoft Flow (Power Automate).
In this Power Automate article, we have learned how to add hyperlinks to SharePoint List items using Power Automate.
You may also like:
- Power Automate error: Cannot find the resource for the request addroleassignhments
- Power Automate find item in sharepoint list
- Create a SharePoint Online Team site using Power Automate
- Create Content Type in SharePoint using Power Automate
- Add Attachments to SharePoint List Items using Power Automate
After working for more than 15 years in Microsoft technologies like SharePoint, Office 365, and Power Platform (Power Apps, Power Automate, and Power BI), I thought will share my SharePoint expertise knowledge with the world. Our audiences are from the United States, Canada, the United Kingdom, Australia, New Zealand, etc. For my expertise knowledge and SharePoint tutorials, Microsoft has been awarded a Microsoft SharePoint MVP (9 times). I have also worked in companies like HP, TCS, KPIT, etc.