So to get this final-destination-link/redirected-URL as of now I am using 2 extra activities one is browser activity to open the link I have and then get attribute activity to get the redirected URL. But as you can feel it’s not the best practice to do it and opening browser is unnecessary here.
Please help me with a better option to fetch this redirected-URL. Thanks In Advance.
I tried using the HTTP request activity to directly download the image using the link that I have but it doesn’t allow me rename.
Hi @Tejaa,
I think you can make it with HTTP Request as below I did understand what do you mean with ( it doesn’t allow me rename.) however please apply below steps and update us if it works with you or you still face issue
Add Http Request Activity:
Drag and drop an Http Request activity into your workflow.
Configure the Activity:
In the properties panel of the Http Request activity, configure the following settings:
Set the Endpoint property to the original URL that you have (e.g., https://unsplash.com/photos/7EqQ1s3wIAI/download?ixid=M3wxMjA3fDB8MXxzZWFyY2h8M3x8dHJlZXN8ZW58MHx8fHwxNzAzMzg3NzQxfDA&force&w=640).
Set the Method property to GET.
Optionally, you can set other headers or parameters if needed.
Capture Redirection URL:
After the Http Request activity, add a Log Message activity to log the redirection URL. You can also assign the redirection URL to a variable if you want to use it further.
In the Log Message activity, use the following expression to capture the redirection URL from the response headers:
I checked the above link and there is no redirect response. (Response code is 200)
We can get the image using HTTP Request activity with FileNameForResponseAttachment property, as the following. Can you try this?