Need gmail script to reply to selected message, change subject, and send. Then change label

So I’m a recent convert of Outlook+Exchange to Gmail (company forced). I approve a lot of requisitions and such in email for automated processing by other applications. To do this, I simply review the message and if I approve it, reply and add “Approved” to the end of the subject. In Outlook, I created the VBA macro that would take the selected message and do the this task automatically: reply; modify the subject; send; and move the original message. This made for 2 click process… 1 to select the message and review it, one to respond with approval and archive the original message.

I’m an old hand with VBA but completely green with google script. From what I’ve seen, it looks intuitive but I need some help getting started. I’d appreciate some pointers. I’ve included a snippet of the VBA code below:

Dim obj As Object
Dim msg As Outlook.MailItem
Dim msgReply As Outlook.MailItem

Set obj = GetCurrentItem 'grabs the currently selected item.
If TypeName(obj) = "MailItem" Then 'make sure the item is a mailitem
    Set msg = obj 'msg is now the mail item to work on
    If msg.Parent = "AP Invoices" Then 'need to make sure the msg is in the AP Invoices folder 
        Set msgReply = msg.ReplyAll 'this initiates a reply all to the msg
        msgReply.Subject = msgReply.Subject & "Approved" 'adds "Approved" to end existing subject
        msgReply.Display 'displays the message
        msgReply.Send 'sends the message
        msg.UnRead = False 'marks the original msg as read
        msg.Move olProcessedFolder 'moves the original msg to a different folder
    end if
end if
 

In Outlook, I used rules to get the email into the “AP Invoices” folder and I have gmail doing the same for a label using a filter.

Question: Once I have a script, how do I manually initiate it? On Outlook, I added a command button on the toolbar that launched the VBA macro… not sure if that is possible in Gmail.

Appreciate any assistance.

network – Snort analyze reply based on request

I’m trying to write a snort rule which detects if certain binary files where requested via HTTP based on a regex rule matching there names.
But it should only send an alert if the file exists (e.g. HTTP 200 OK reply).

Is it possible to have this kind of “statefull” scan?
What kind of technique could I use else since the files have no reliable information in them I could search for.

The current look of my rule:

alert TCP $EXTERNAL_NET any -> $HOME_NET $HTTP_PORTS (pcre:"/d{6}-d.d.pdf$/U"; sid:90000512; classtype:patent-access;) 

facebook – Comment vs Reply in a social feed

There is no “ideal phrase” for “it”.
They are both different terms that mean different things.

Comment

a note explaining, illustrating, or criticizing the meaning of a
writing Comments on the passage were printed in the margin.

an observation or remark expressing an opinion or attitude critical
comments constructive comments

a judgment expressed indirectly sees the film as a comment on modern
values

Reply

say something in response to something someone has said.

a verbal or written answer.

The explanation of the word that fits the use-case of your application better will be the “ideal”.

Deleting inbox email in gmail results in delete of reply

When I do a reply and hit send in gmail, I sometimes will subsequently hit delete to delete the present email. But I have found that gmail will then subsequently delete the reply email in the Sent folder.

Which has me wondering:

  • Did the reply get sent out?
  • Can this behaviour be modified? Like, can the sent message be retained in Sent.

Automation – How do I automatically reply to unknown senders in Gmail?

I want to send automated replies to emails I receive in my Gmail account if I have not previously corresponded with the sender. This basically mimics an absence / vacation response, but is only triggered if the sender is unknown to me.

From what I've seen in Gmail's settings, sending vacation responses to contacts isn't a problem. I can send such messages to everyone in my contact list, but it doesn't work the other way around.

If I need to whitelist all senders to my address book for the solution, that's fine. However, I would prefer a solution that works based on my conversation history.

Javascript – How do I reply to a sendMessage with an asynchronous value in Chrome extensions?

I have a Google extension. I am sending a message chrome.tabs.sendMessagefrom popup to content script. However, I need to generate an answer that will be returned to the popup. This works perfectly if the answer value is synchronous, but dealing with an asynchronous value doesn't work for me. and it shows me.

Error:

The message port closed before a response was received.

The code I use is:

popup.js

    chrome.tabs.query({'active': true, lastFocusedWindow: true},(tab)=>{

        chrome.tabs.sendMessage (tab(0).id, msg, function(res){

            alert(res) // undefined
        });
    });

contentScript.js

  chrome.runtime.onMessage.addListener(async (request, _, sendResponse) =>  {
      const res = await new Promise(async (resolve, reject) => {
          let response= await asincronoValue();
          if(response){
              resolve(response);


           }
       }).then((response)=>{
         console.log(response) // devuelve el valor correcto
         sendResponse(response) 
       })

dnd 5e – Does the reply to the message cantrip have a time / distance limit?

The Embassy cantrip says the following:

They point at a creature within range and whisper a message. The destination (and only the destination) hears the message and can reply in a whisper that only you can hear.

The spell itself has a duration of 1 round and a range of 120 feet, but I assume that this applies to the "outgoing" message from the caster. Is there a time limit or a distance limit for the recipient's response?

I am asking this because a player claims that the recipient of the Embassy can respond any distance in the future at any time since the spell does not specify this and they have therefore used it Embassy Cantrip to let an NPC tell you when someone is ready to collect (i.e. casting) Embassy on the NPC with the message "Answer this message spell when you are done").

I believe the intention is for the recipient to respond immediately, but this is not specified. To contrast the Send Spell (which also lasts 1 round) does Specify when the recipient can reply:

You send a short message with a maximum of 25 words to a creature you are familiar with. The creature hears the message in its head and recognizes you as the sender when it knows you. and can respond immediately in a similar manner.

Send says the recipient has to respond right away, whereas Embassy does not indicate when the recipient has to respond, so my player claims that there is no time limit.

In relation to the distance thing, this also occurs on the toes of the Send spell something except that the caster of Embassy must still be within 120 feet of the receiver (it's just that receiver that doesn't seem to have any distance limitation), whereas Send enables the Caster be the one who initiates long-distance communication.

Is my player correct? Can the recipient of one Embassy really respond after any length of time after receiving the message and over any distance?

Posting a reply / creating a new thread is not possible

Hi,

When I try to respond to a thread, I now get the following error message. Things used to work normally today:

The following error has occurred:

The server did not respond in time when retrieving https: // (offline or too slow?).
SEMrush

Even stranger, the posting seems to work here. If I try to do the same in the Apache sub-forum, I get the error message

Any ideas on how to fix that?