i need to get mails from gmail using gmailactivity need help.thank you
@priyankavivek use get imap mail activity
without using outlook mail
@priyankavivek sorry didn’t get what you said.
there is activity like gmail can you please help me how to use?
can you please help me in elborate one
Hi @priyankavivek ,
Can you check the below link:
i dont need to use by imap ,just trying with gmail activities.
Hello Priya,
In this video I do a lot of stuff with Gmail:
1:00 Gmail configuration inside settings
2:50 Read Emails and Send Emails
10:30 Filters for emails
17:40 Trigger for Orchestrator
23:30 Google script add data on Orchestrator Queue and start UiPath process
Code:
function myFunction() {
var threadList = Gmail.Users.Threads.list('me', {
q: 'is:unread label:inbox'
});
if (threadList.threads && threadList.threads.length > 0) {
threadList.threads.forEach(function(thread)
{
var id2 = thread.id;
var tdata = Gmail.Users.Threads.get(userId='me', id=id2);
var msg = tdata.messages[0];
var subject = '';
var date = '';
var from = '';
var payload = msg.payload.headers;
payload.forEach(function(heads)
{
if (heads.name=='Subject') subject = heads.value;//Logger.log('Header Subject: %s', heads.value);
else if (heads.name=='Date') date = heads.value;//Logger.log('Header Date: '+heads.value);
else if (heads.name=='From')
{
This file has been truncated. show original
Thanks,
Cristian Negulescu