web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Transform a short URL ...
Power Automate
Unanswered

Transform a short URL to a long URL using a Power Automate Flow

(0) ShareShare
ReportReport
Posted on by 8

Hello,

 

I am trying to create a flow in Power Automate. Can anyone please help/advise?

Use case:

    -I have a CSV file in SharePoint

    -I have a table with a column which contains the SHORT URL

     -I want to transform the SHORT URL into a long URL

 

How can I automatically achieve that using Power Automate Flow?

 

I am thinking that the flow will be: open the file, read/open the short URL row by row and then extract the long URL and write it in a new column or update the existing column. 

Can anyone help/advice? 

I have the same question (0)
  • Deenuji_Loganathan_ Profile Picture
    6,250 Moderator on at

    @ElinaMirin 

     

    Please follow the below suggested flow and this is PAD way of doing but again we can do this same using some scripting language too.

    Deenuji_0-1710348697017.png

    Output:

    Deenuji_1-1710348787050.png

     

    Code[Do normal copy and paste the below code into your power automate desktop workspace it will work]:

     

    WebAutomation.LaunchChrome.LaunchChrome Url: $'''www.google.com''' WindowState: WebAutomation.BrowserWindowState.Minimized ClearCache: False ClearCookies: False WaitForPageToLoadTimeout: 60 Timeout: 60 BrowserInstance=> Browser
    Excel.LaunchExcel.LaunchAndOpenUnderExistingProcess Path: $'''C:\\Users\\deenu\\OneDrive\\Documents\\URL.xlsx''' Visible: True ReadOnly: False Instance=> ExcelInstance
    Excel.ReadFromExcel.ReadAllCells Instance: ExcelInstance ReadAsText: False FirstLineIsHeader: True RangeValue=> ExcelData
    SET Counter TO 2
    LOOP FOREACH CurrentItem IN ExcelData
     SET LongURL TO $'''%''%'''
     SET ShortURL TO CurrentItem[2]
     WebAutomation.GoToWebPage.GoToWebPage BrowserInstance: Browser Url: ShortURL WaitForPageToLoadTimeout: 60
     WebAutomation.GetDetailsOfWebPage BrowserInstance: Browser DetailsType: WebAutomation.DetailsType.URLAddress Details=> LongURL
     Excel.WriteToExcel.WriteCell Instance: ExcelInstance Value: LongURL Column: $'''D''' Row: Counter
     Variables.IncreaseVariable Value: Counter IncrementValue: 1
    END

     


    Thanks,
    Deenuji Loganathan
    🤖 Automation Evangelist
    Deenuji - Follow me on LinkedIn

    -------------------------------------------------------------------------------------------------------------
    If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🌟

     
  • ElinaMirin Profile Picture
    8 on at

    Very nice! This is working in Power Automate Desktop. Do you know if I can do something similar using Automated Cloud Flow? 

  • ElinaMirin Profile Picture
    8 on at

    @Deenuji I will have a file in SharePoint that will be updated on a weekly basis (new short URLs will be added weekly) and I would like to automate this process in Power Automate by using an Automated Cloud Flow.

  • Deenuji_Loganathan_ Profile Picture
    6,250 Moderator on at

    @ElinaMirin 

    I have some idea of how to accomplish that in a cloud flow as well. However, could you please provide a short URL for testing?

    It seems to work well with Microsoft short URLs like "https://aka.ms/ppac," but not with other short URLs such as those from shortly or Bitly


    Thanks,
    Deenuji Loganathan
    🤖 Automation Evangelist
    Deenuji - Follow me on LinkedIn

    -------------------------------------------------------------------------------------------------------------
    If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🌟

     
  • ElinaMirin Profile Picture
    8 on at

    Hi @Deenuji! The short links are Bitly. An example is here: bit.ly/4a9BNic

  • Deenuji_Loganathan_ Profile Picture
    6,250 Moderator on at

    @ElinaMirin 

    Please refer the below link for CSV read and write.

    Parse CSV File Using Power Automate (c-sharpcorner.com)

     

    Once you get bitly short url then use the below actions in your power automate cloud flow.

    Deenuji_1-1710427031288.png

     

    Input variable expression: @{actions('HTTP').outputs.headers.Location}

    Once you get the long url then you write into your csv column.

     


    Thanks,
    Deenuji Loganathan
    🤖Automation Evangelist
    Deenuji - Follow me on LinkedIn

    -------------------------------------------------------------------------------------------------------------
    If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🌟

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 594

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 281 Super User 2026 Season 1

Last 30 days Overall leaderboard