Download __mail.html in Email Trigger process

Hi,
I am able to trigger a process by sending mail. I can see __mail.html file generated in workitem. When i try to download the file with this code

${path} = Get work item file __mail.html ${OUTPUT_DIR}
Log To Console ${path}
${mail_content} = Download ${path} target_file=${ATTACHMENTS_DIR}

it fails with this error:
InvalidSchema: No connection adapters were found for ‘:/home/worker/instance/runs/0ef2284d-2d49-4317-a35a-6831a58a059f/package/__mail.html’

This is the log screen shot:

Because that location is not web link. It seems to be local file path.

Thanks for your reply. I am not able to find it on local drive anywhere

But you already have that path in ${path} variable, right? By previous Get Work Item File keyword?

If you want to open it in browser you can just use
Open Available Browser ${path}

This i had tried. I get the following error, probabaly becuase i am running the process in control center and it can not load the web driver

WebDriverException: Message: unknown error: net::ERR_NAME_NOT_RESOLVED (Session info: headless chrome=105.0.5195.102) Stacktrace: #0 0x556ae90961a3 #1 0x556ae8e62ac3 #2 0x556ae8e5fe10 #3 0x556ae8e540f5 #4 0x556ae8e55071 #5 0x556ae8e543b6 #6 0x556ae8e53875 #7 0x556ae8e52749 #8 0x556ae8e52a11 #9 0x556ae8e64654 #10 0x556ae8ecca73 #11 0x556ae8eb8022 #12 0x556ae8ecc3cc #13 0x556ae8eb8443 #14 0x556ae8e8e48b #15 0x556ae8e8f975 #16 0x556ae91122a0 #17 0x556ae90cd81a #18 0x556ae90cd34a #19 0x556ae90cde75 #20 0x556ae910e14b #21 0x556ae90ce1de #22

yes, I get this path which is not in my local drive, I don’t know where is this path. I am using windows machine

/home/worker/instance/runs/0ef2284d-2d49-4317-a35a-6831a58a059f/package/__mail.html

That run seems to be on cloud container, done by Worker. Our cloud containers run linux, they are not windows machines. And if something is run on cloud, then it is not available on your own windows machine. But if your robot (running in cloud container) wants to access that file, it should be able to do it directly there (on cloud container).

If you want to run it on your own machine, you can either use Assistant, or you can setup your own worker. See this for more details: Find the correct setup for you | Robocorp documentation

Anyway, maybe I got your use-case wrong, so it might help, if you explain what your are trying to do?

Yes, i want to download that file but not able to access it.

I think i can not use Assistance because my process is trigger by sending an email

My bad, sorry. So no Assistant for email triggers. Just Worker setups then.

Keyword “Get Work Item File” has already downloaded it into cloud container directory. And that file should be already place where variable ${path} points to. Just let your robot access and use it, nothing else to download (to cloud container).

Can you please try to verify its existence using keyword: RPA.FileSystem library | Robocorp documentation