Sunday, July 09, 2023

Organizing my Gmail

 With a little bit of help from ChatGPT and trial-and-error, I have a script that helps me keep my Gmail accounts more organized.  

I have five labels:

**0**, **1**, **2**, **3** and **4**

What the script does:

For mail over 12 hours old, add label **0** and **1**

For mail over 30 days old, remove label **1** and add label **2**

For mail over 90 days old, remove label **2** and add label **3**

For mail over 1 year old, remove label **3** and add label **4**

For any mail that's read, flip it back to unread.

It runs every hour.  (Label **0** is a holdover from something else and it's less important.)


Anyhow, this allows new emails to come into my inbox and if I deal with them right away (that is, I delete them), then everything's good.  If it's not something I can handle right away, it moves out of the inbox.  

It means when I open my mail on my phone, it's never going to be overwhelming, it's just going to be the new stuff.  (I have other filters that move a lot of commercial/bulk mail out of the inbox right away because I don't need to be alerted about sales coupons.)


function processEmails() {
var threads = GmailApp.search("older_than:1y label:**3** -in:trash -in:sent -is:chat");

for (var i = 0; i < threads.length; i++) {
var thread = threads[i];
thread.addLabel(GmailApp.getUserLabelByName("**4**"));
thread.removeLabel(GmailApp.getUserLabelByName("**3**"));
}

var threads = GmailApp.search("older_than:90d label:**2** -in:trash -in:sent -is:chat");

for (var i = 0; i < threads.length; i++) {
var thread = threads[i];
thread.addLabel(GmailApp.getUserLabelByName("**3**"));
thread.removeLabel(GmailApp.getUserLabelByName("**2**"));
}

var threads = GmailApp.search("older_than:30d label:**1** -in:trash -in:sent -is:chat");

for (var i = 0; i < threads.length; i++) {
var thread = threads[i];
thread.addLabel(GmailApp.getUserLabelByName("**2**"));
thread.removeLabel(GmailApp.getUserLabelByName("**1**"));
}

var threads = GmailApp.search("older_than:12h -label:**0** -in:trash -in:sent -is:chat ");

for (var i = 0; i < threads.length; i++) {
var thread = threads[i];
thread.addLabel(GmailApp.getUserLabelByName("**0**"));
thread.addLabel(GmailApp.getUserLabelByName("**1**"));
thread.moveToArchive();
}

var query = "is:read -in:trash -in:sent -is:chat"; // Replace with your desired query
var threads = GmailApp.search(query);
threads.forEach(function(thread) {
var messages = thread.getMessages();
messages.forEach(function(message) {
message.markUnread();
});
});


}



To use this script, follow these steps:
  1. Open your Gmail account in a web browser.
  2. Click on the gear icon in the top right corner and select "View all settings".
  3. Go to the "Advanced" tab.
  4. Scroll down to the "Desktop notifications" section and enable the "Allow external programmatic access to Gmail" option.
  5. Click "Save Changes" at the bottom of the page.
  6. Open the Google Apps Script editor by visiting https://script.google.com/.
  7. Create a new script file and replace the default content with the script provided above.
  8. Save the script and give it a name (e.g., "EmailProcessor").
  9. Click on the clock icon in the toolbar to set up a time-driven trigger.
  10. Configure the trigger to run the processEmails function at your desired interval (e.g., every hour, every day).
  11. Save the trigger and confirm any necessary permissions.
The script will now run automatically based on the trigger you set up and perform the specified actions on your Gmail messages. Make sure to review and adjust the script as needed before deploying it to your Gmail account.

Saturday, July 01, 2023

Evil Pastors

AN INCOMPLETE POST - MAY CONTAIN SPELLING ERRORS, INCOMPLETE/CONTRADICTORY THOUGHTS.

ORIGINALLY STARTED IN JULY 2017.  

WILL POST AUTOMATICALLY ON JULY 1, 2023 IF I DON'T DO ANYTHING OR IF I DIE BEFORE THEN.

A friend of mine recently posted this (An Open Latter to My Parents' Pastor, Carrie Surbaugh, 07/13/2017) on Facebook. Surbaugh came out last year as a lesbian after years of trying to deny it. She has been active in church her entire life and even recently preached at her church. Her parents have been very involved in their church. But now, after some very public condemnation from the pulpit, her parents feel that they must leave that church.

There was a smattering of comments in response to his post and I felt compelled to weigh in (when am I not?).  I wanted to later share it with Lori but couldn't find it and worried they'd deleted the entire post.  Finally found it a few days later.  Posting a version of it here.

This (Carrie's letter) is a sad letter. Nearly every church I have ever attended has demanded we take a "side" on the issue - either homosexuality is (a) a sin or (b) it is a sin and you're sinning for trying to say it isn't and you should leave because you're not being honest and you don't agree with us.

I'll be honest. For decades I've wrestled the whole notion of whether homosexuality was a personal choice or something someone had no control over, any more than they could choose (at birth) their parents, their gender or their race.  But it was only a theoretical question.

For a long time I was on the other "side" of this argument - for that's what it is - the church demands we take a "side" and then we are either welcome or unwelcome depending on the church. I believed homosexuality to be a sin.

We seize upon this "sin" (if it is one) and hold it up as separate, distinct, more grievous while we all continue in sins of our own. Confident in our salvation, quick to shame and condemn this one particular sin because it's one we ourselves can never see ourselves engaging in.

And that's not love. If you believe it is a sin and someone can be saved from a life of it (hush, I'm trying to make a point), we don't do that by casting them out into the darkness. We do it by showing the light and love of God and making a sinner decide "I want that life."

A person has to be pretty out of touch not to know that those who don't identify hetero struggle, often in silence.

To preach against this sin from the pulpit isn't a charge the "sinner" to repent, it's a wink and a nod to the rest of the congregation that it's ok to continue to be hard-hearted.

Saturday, April 15, 2023

The Adults Lied

The music should have been the first clue.  Ask anyone when the best music came out and most people will tell you of a time when they were in their teens. How can so many people think the music of their teens was the best music ever? 

Aren't we, as a collective, supposed to be getting smarter about knowing what people want? Shouldn't music be getting better every year?

The adults told us that things would get better as we got older. The promise was that we'd have more power, more authority, more autonomy, more spending power, more freedom. "Things get better," they said. Finish high school. Go to college. Start a career. Get married. Have kids. Buy a house. Own a brand new car that no one else has ever driven. Travel to interesting places.

I'm probably part of the last generation that it was very easy to mislead. We had nothing but their word to go on, so we followed the path the path they laid out for us. And by the time we realized it was all a lie, it was too late. Some things got better. Some times were better. But so much turned out to be a lie. Now as adults, it was our turn to lie to the kids.

Only... something happened. Social media happened. No longer did careers and family life take you out of the conversation, leaving only authority figures, religious figures, political figures and capitalist figures to do the talking. Now anyone could say "uh... yeah... no..." 

Things don't get better. The adults lied.

Thursday, April 06, 2023

Gmail Script

 function autoReply() {

var label = GmailApp.getUserLabelByName('reject'); // Change 'reject' to the label name you want to use
var threads = label.getThreads();
for (var i = 0; i < threads.length; i++) {
var thread = threads[i];
var messages = thread.getMessages();
for (var j = 0; j < messages.length; j++) {
var message = messages[j];
// Change the signature of the reply message as per your requirement
var replyBody = "Hi - thanks for contacting me about this opportunity. After review*, it does not appear to be fit.\n\nIf you'd like more specifics about why it's not a fit, please ask.\n\nThanks,\n______\n\n* Notes: If you've emailed me multiple times, you may receive multiple copies of this note. In some cases, the review is performed automatically without me even seeing the email based on certain words or phrases in your email. Also, please check your database. I may be replying from a different email address than the one you emailed. This is the correct one (__@gmail.com) for all recruiter communications.\n---\n+ Looking for an Email Marketing job? https://emailmktgjobs.blogspot.com/\n+ Connect with me on LinkedIn: https://www.linkedin.com/in/___/\n+ Schedule a call: ___";

if (message.getFrom.getAddress === '_____@gmail.com' || message.getFrom.getAddress === '______@gmail.com') {
// Do nothing.
return;
}
GmailApp.sendEmail(message.getFrom(), 'Re: ' + message.getSubject(), replyBody);
thread.removeLabel(label);
thread.moveToTrash();
}
}

var label = GmailApp.getUserLabelByName('_SHARE');
var removelabel1 = GmailApp.getUserLabelByName('_WAITING');
var removelabel2 = GmailApp.getUserLabelByName('LINKEDIN');

var threads = label.getThreads();
for (var i = 0; i < threads.length; i++) {
var thread = threads[i];
var messages = thread.getMessages();
for (var j = 0; j < messages.length; j++) {
var message = messages[j];

thread.removeLabel(removelabel1);
thread.removeLabel(removelabel2);
GmailApp.moveThreadToArchive(thread);
GmailApp.markThreadUnread(thread);
}
}

var label = GmailApp.getUserLabelByName('_WAITING');
var removelabel1 = GmailApp.getUserLabelByName('LINKEDIN');

var threads = label.getThreads();
for (var i = 0; i < threads.length; i++) {
var thread = threads[i];
var messages = thread.getMessages();
for (var j = 0; j < messages.length; j++) {
var message = messages[j];

thread.removeLabel(removelabel1);
GmailApp.moveThreadToArchive(thread);
GmailApp.markThreadUnread(thread);
}
}

var label = GmailApp.getUserLabelByName('rate');
var addlabel = GmailApp.getUserLabelByName('_WAITING');
var threads = label.getThreads();
for (var i = 0; i < threads.length; i++) {
var thread = threads[i];
var messages = thread.getMessages();
for (var j = 0; j < messages.length; j++) {
var message = messages[j];
// Change the signature of the reply message as per your requirement
var replyBody = "Thanks for sharing this role. What's the budgeted compensation range?\n(Per California state law - see below - this should have been included in the original email.)\n\nThanks,\n______\n\nPay Transparency Laws: \n* The salary range must be posted -- even if the role is ultimately performed elsewhere -- if it *could* be performed in California, Colorado, Washington state as well as New York City; Westchester County, NY; Ithaca, NY and Jersey City, NJ. Also effective for New York State on 9/17/2023. Statewide laws are currently being considered in Massachusetts, South Carolina and Tennessee. \n* Recruiters must provide the salary range - if requested - if the candidate lives in Connecticut, Maryland or Rhode Island.\n* It is illegal to ask for someone's salary history if they live in California, Colorado, Connecticut, Delaware, Hawaii, Illinois, Maine, Maryland, Massachusetts, Missouri, Nevada, New Jersey, New York State, Oregon, Puerto Rico, Rhode Island, Vermont and Washington state. Also Atlanta; Cincinnati; Columbia, SC; Louisville; New Orleans; Toledo; Philadelphia and Richland County, SC. Note: In Alabama, you can ask for it, but if you discriminate against a prospective candidate who refuses to provide, they can sue you.\n---\n+ Looking for an Email Marketing job? https://emailmktgjobs.blogspot.com/\n+ Connect with me on LinkedIn: https://www.linkedin.com/in/_____/\n+ Schedule a call: https://calendly.com/____";
GmailApp.sendEmail(message.getFrom(), 'Re: ' + message.getSubject(), replyBody);
thread.removeLabel(label);
thread.addLabel(addlabel);
GmailApp.moveThreadToArchive(thread);
GmailApp.markThreadUnread(thread);
}
}

}

Friday, February 10, 2023

Extroverts and Introverts: Understanding the Differences and Working Effectively Together

It's no secret that people have different personalities, and this extends to the way they approach work and collaborate with others. While extroverts are often seen as outgoing and sociable, introverts are often perceived as reserved and introspective. When working together, it's important for extroverts to understand and respect these differences to build a more harmonious work environment. In this blog post, we'll explore how extroverts can change their approach when working with introverts to get the best results.

1. Respect Their Need for Alone Time

Introverts often need alone time to recharge their batteries and process information. They may retreat to a quiet corner, take a walk outside, or simply take a break from the constant stimulation of a noisy office environment. Extroverts can support their introverted colleagues by respecting their need for alone time and not taking it personally.

2. Be Considerate of Their Communication Style

Introverts tend to think before they speak, while extroverts are often more spontaneous and speak first, think later. When working with introverts, extroverts can make a conscious effort to listen and not interrupt. Additionally, introverts may prefer email or written communication to face-to-face meetings. Extroverts should be aware of this preference and make an effort to use the communication channels that work best for the introvert.

3. Allow Them to Contribute in Their Own Way

Introverts may not jump in to a conversation or meeting as readily as extroverts. However, this doesn't mean they don't have valuable contributions to make. By allowing introverts to contribute in their own way, such as through written comments or a more reserved approach to a group discussion, extroverts can ensure that the introvert's ideas and perspectives are taken into account.

4. Provide a Comfortable Work Environment

Introverts may feel overwhelmed in a highly social and noisy work environment. Extroverts can help create a more comfortable work environment for introverts by reducing noise levels, encouraging quiet spaces, and promoting an environment where introverts feel comfortable sharing their thoughts and ideas.

5. Encourage Them to Step Out of Their Comfort Zone

While it's important to respect an introvert's natural tendencies, extroverts can also encourage introverts to step out of their comfort zone and participate in team building activities or social events. This can help introverts develop new skills and build stronger relationships with their colleagues.

In conclusion, working with introverts can be a valuable and enriching experience for extroverts. By respecting their differences, being considerate of their communication style, allowing them to contribute in their own way, providing a comfortable work environment, and encouraging them to step out of their comfort zone, extroverts can help create a more harmonious and productive work environment for everyone.

Written by an AI

Tuesday, January 31, 2023

5 Strategies for Overcoming Procrastination in the Workplace

Procrastination is a common challenge that many professionals face at some point in their careers. It can lead to missed deadlines, decreased productivity, and increased stress levels. However, the good news is that it can be overcome with the right strategies and habits. 1. Set clear and achievable goals: When you have a clear understanding of what you need to achieve, it becomes easier to prioritize your tasks and take action. Break down large projects into smaller, manageable tasks and set deadlines for each. 2. Eliminate distractions: Distractions are a major cause of procrastination. Create a work environment that is conducive to productivity by minimizing interruptions, such as turning off notifications on your phone, or using noise-cancelling headphones. 3. Use the Pomodoro Technique: This is a time management method that involves working for a set period of time, typically 25 minutes, and then taking a short break. Repeat this cycle several times throughout the day to maintain focus and avoid burnout. 4. Prioritize self-care: Taking care of yourself is crucial to maintaining focus and avoiding procrastination. Make time for exercise, eating well, and getting enough sleep, as these activities can help reduce stress and improve mental clarity. 5. Surround yourself with positive influences: The people you surround yourself with can have a significant impact on your motivation and productivity. Seek out positive and supportive colleagues who will encourage you to stay on track and reach your goals. In conclusion, procrastination is a common challenge, but it can be overcome by implementing these strategies and forming positive habits. By setting clear goals, eliminating distractions, using time management techniques, prioritizing self-care, and surrounding yourself with positive influences, you can stay focused and achieve your professional goals.