Curious if you can use Save Attachehment for a Url Link file?

Hey all,

I am trying to figure out if there is a way I can use the Save attachment activity for a link that I have extracted from the Email as a variable? I have seen some other forums on here suggesting HTTP request? but I have not made my way out of learning the process part of UiPath I have not even visited Orchestrator yet first I want to build to perfect bot

Download link Variable looks like this once it is extract - https://s3.amazonaws.com/files.formstack.com/uploads/1687006/24079710/511982521/24079710_pool_plan_guzman_6-12.pdf

It shows up as a hyperlink in the HTML body of the Email.
I am trying to download this without having to open windows and click all over the place to make it function properly the goal for the first step of my workflow was to keep it all Hidden or behind the scenes work so it does not need screen recognition and my mouse to work.
Is this possible?

After I figured out how to download it without going through a ton off browser activities, I want it to go to a dropbox folder using the name field & Date
is this as simple as having it save to
"C:\etc\etc\etc\Dropbox"+ClientName+“Pool Project Plan” +Now.Date.ToString

Is the code above correct? Do I need spaces between my +'s.

Thanks in advance for all the help I am going to post a picture so it should help a bit on what I’m looking to succeed in


Currently, this is how I have it set up and it does not work very cleanly sometimes it incorrectly clicks on certain areas which messes up the whole workflow

As well in more of a general question My goal for the Workflow was suppose to looking something like the picture below. But I feel I cannot use these other areas because of the fact im Stuck in a For Each Loop Because of Each email being different and the Variables change to the Final For Each as they exit so the variables previous are now unusable if i do not put it in this loop. Is there a way to fix this Probably a better way to construct the workflow?

Use the HTTP Request activity to get the image.

Put the file url as the EndPoint and the local filepath where you want to save it as the ResourcePath.

3 Likes

Thanks for the quick reply excited to try this.
But i only have the option for
Orchestrator HTTP Request
which looks different then this, Is this a added on package activity?

Install the UiPath.Web.Activities package to get the http request.

You can have a space between your + or not, it doesn’t matter to the robot.The filepath you have here looks like it doesn’t have slashes in between your variables. You’ll need to add a “\” after “Dropbox” and change “Pool Project Plan” to “\Pool Project Plan\” for the file to be saved correctly.

1 Like

Just read the above note above the quote… Thanks Your awesome gonna try this out

1 Like

Thanks for all the advice I am way closer to what i’m trying to achieve here.
It says that a folder does not exist i assume that this process cannot make the folders itself if it does not exist? show i just make new folder before the HTTP request?

Yeah, just toss a Create Directory activity in there. If I recall correctly that activity will make the folder if it doesn’t exist, otherwise it’ll just do nothing. So it won’t mess up if it tries to make the folder again once it’s already been created.

Hi @MrJoints
Lets get to this one by one

Yes of course that’s possible buddy, well getting the url part is quite easy, well if you feel like getting with string manipulation kindly have view on this buddy…

And for this

Use like this
"C:\etc\etc\etc\Dropbox"+ClientName+“Pool Project Plan” +Now.Date.ToString(“dd_MM_yyyy”) as sometimes // or \ may not be taken as string

Cheers @MrJoints

1 Like

Thank you for this. I believe I got most of this done already except for the now.date command i was unaware you had to put the (“dd_MM_yyyy”) this should help me greatly with my organization of these files.

Any chance you caught the last part of my post talking about how my workflow was to be broken up into sections? Do you think with the way this is built i will have to make it one solid long sequence to have this as a per client automation. Each email is a client or a revised version of an existing client

If the processing of each email is similar then I would put that into its own workflow. Then in your For Each loop you can invoke that workflow to handle the email. Any variables you’re using now can be passed to the workflow as arguments and from there the workflow can figure out what to do with them.

Additionally you can use multiple try/catch blocks to handle exceptions that are causing the whole workflow to break. Inside the catch you can tell the robot how it should attempt to recover from an error.

I understand the try catch area as that has saved me before on an automation.

I’m having trouble differentiating processing the email and handling the email?

  • My workflow starts off as grabbing all emails pertaining to a from category and subject category
  • it right now is grabbing up to 5 at a time which I think is plenty sufficient as I typically don’t get more theb 5 or so in a two day period
  • after it grabs those emails it uses the for each to pull all that info from each email and uses that data for saving file and uploading to the crm which is not yet put. Together.

What I’m getting at is my variables are changing per email it grabs so if it grabs 5 emails that variable is going to change 5 times through out that for each so how can I transfer that through an argument?

Should I have this bot just transfer one at a time for its whole lifecycle workflow then just have it check the email every hour or so to try another run?
I feel otherwise I have to put the whole section of a workflow in the for each activity. Am I not understanding this correctly?

Nvm I think I am over thinking it I will start by getting email in workflow then for each on every sequence after that should do the trick :] thanks for all your help everyone!

Wish I could click multiple solutions because you both helped out so much and I had multiple questions! Thanks again!

Hey Daniel,

I am trying to use this and it is making the folder correctly but then at first when I tried http request save to that location it said it could not find it so I put it on a 5 sec delay and it now is giving me an system security authentication error.

Now this folder is in a Dropbox sync folder I’m not sure if that is what is effecting it what are your thoughts?

NVM I just used some different commands

Thanks again

1 Like

Is it all working now?

Yes I have it working super clean everything does exactly what it needs to now. I’m struggling on a new problem now with OCR Pdf extraction text is small and causing it to come out all messed up was stuck for hours not sure if there is a way around it.

If you’re stuck go ahead and open another topic with all of the details so we can help out.

1 Like

Will do dont know if I will be able to get past this one though unfortunately without human eyes as the text is small and it is considered a image because it is a CAD plan that was flattened. Will make a new post with examples soon thanks again for the help!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.