Editing a Google script for Gmail (5 minute work, if you know google scripts)
$10-30 USD
Cancelled
Posted over 8 years ago
$10-30 USD
Paid on delivery
I would like to forward gmail emails to a specific email address.
I will have two way of triggers:
1) Starred emails
2) Emails with specific label
1) I have found a script on the internet for the "starred email trigger", but I need some modifications on it.
a) I want to add a preceeding text ("Email:") in front of the subject,
b) I want add a link at the top of the body of the forwarded email which will take me to the linked email in Gmail web site,
c) I also want to know the option just to put the link of the email which will take me to the Gmail web site on the body. The body should only include the link, the original body of the email needs to be deleted prior to forwarding.
Here is the script:
function TJ() {
var threads = [login to view URL]('is:starred');
for (var h = 0; h < [login to view URL]; h++) {
var messages = threads[h].getMessages();
for (var i = 0; i < [login to view URL]; i++) {
if (messages[i].isStarred())
{
[login to view URL](messages[i].getSubject());
messages[i].unstar();
messages[i].forward("recipient1 at [login to view URL]", {
// Advanced parameters: [login to view URL],Object%29
cc: "myboss at [login to view URL]",
bcc: "mybosses-boss at [login to view URL],vp at [login to view URL]"
});
}
}
}
}
2) I want to do the same with specific labels (lets say "Asana"), instead of starring an email. The label needs to be unlabelled after the script runs.
Note: I am inputting these scripts at script.google.com. And the script runs every minute automatically.