Compose Gmail using text from Word template as Body of Email

Hi. I created a simple script which opens Gmail, composes a new message and inputs the Subject line. Now, I would like to input text from a Word document into the body of this email. Please advice if there is a sample script or instructions on how to do this. Thanks.

1 Like

Hi @jrega17

Based on type into activity you would have entered it pass it to word application scope activity

Thanks
Ashwin.S

Hi
Welcome to uipath community
Yes of course that’s possible
—goto design tab → manage packages → in official tab search for uipath.word.activities and install them
— use word application scope activity and pass the file path as Input
— use read activity and get the output as a variable of type string
— now while sending mail we can pass this as a string while mentioning the body of the mail either with the special activities like send exchange mail activity or send outlook mail activity or uipath team.gmail.activities or by simple type into activity

Simple isn’t it
Hope this would help you
Kindly try this and let know for any queries or clarification
Cheers @jrega17

1 Like

Thank you. Your solution worked perfectly!

When I ran the bot, it copied the data from my Word file into Gmail but did not format some of the links as hyperlinks. I created an HTML file and used Get Text to import the data (it is a simple one page email that includes links). When I ran the bot, the HTML code was copied into the email, instead of the formatted text and links. Do you have any recommendations for how to copy HTML data into a Gmail message?

Fantastic
hope this thread could add some insights

Cheers @jrega17

Thanks. I read through that thread but it was hard for me to understand.

As a first step, I would like to have the bot access the HTML file. (This is the file that contains the text that I want to copy into the email.) Would I need to use Get Text in order to do this? If so, how do I reference the file path of the HTML file that I would like it to read?