Sending newly and randomly generated file by email?

Hello guys

I want send a constantly newly created notepad-file (it generates a random name every time i run the process) through “Send Outlook Mail Message” but i dont know how to attach the NEWLY created files?

It will generate a name like this: message12321.txt
The code: “message” + randomFileName.toString

@Ibra assign new generated filename along with path to variable use that variable here. each time file is created variable contains path of new file.

How do i sign it along with the path? I dont quite understand that.

@ibra how u create new file every time tell me, then i will tell u how to assign it to a variable

First i open up a new notepad.exe file every time i run the process
Then i do these steps:

  • using the DESKTOP recorder to record my action:
  1. type something in the notepad
  2. go to file -> save as -> point to my directory and save with the following name: message (and a random generated digits with an ‘Assign’ function that has these values: randomFileName = new Random().Next(1,99999)
  3. click on SAVE

Now im done with my recording part
Now i assign a ‘Send Outlook Mail Message’ with an email and subject.
Then i have to attach the file i want to send to an email and this is the part where im stuck because the filename changes constantly.

@ibra instead of numbers in sendoutlook activity use randomFileName. ToString, so recently created file will have that filename, so that file will be sent in mail. Replace number after message word with randomFileName like below.