Latency in updating UI(inbox window), after a mail has been deleted in Gmail, add-on

37 views
Skip to first unread message

shayan amar

unread,
May 9, 2024, 8:57:39 AMMay 9
to Google Apps Script Community

Current Situation:

I've developed a Google Workspace add-on for reporting emails. This add-on successfully utilizes the Gmail Delete API to remove emails from the inbox after reporting them. However, the user interface (UI), specifically the inbox window, doesn't reflect the deletion in real time. Users need to manually refresh the page to see the updated inbox state.

Desired Outcome:

I'd like to improve the user experience by ensuring the UI automatically reflects the email deletion after it's processed by the add-on. This will provide immediate confirmation to users and streamline the reporting workflow

Apps-script

try {
// Gmail trash api to trash the selected message
    Gmail.Users.Messages.trash("me", messageId)
    console.log("Mail is deleted successfully.....")

  } catch (error) {
    console.error("Error in deleting mail...", error)
  }


DimuDesigns

unread,
May 9, 2024, 9:42:42 AMMay 9
to Google Apps Script Community
That's not possible from a Google Workspace Add-on. However, it might be possible from a Chrome Extension.

shayan amar

unread,
May 9, 2024, 3:20:14 PMMay 9
to google-apps-sc...@googlegroups.com
So now what i have to do is whether I use Chrome extension in-replace of an add-on or use Chrome extension + add-on for achieving reporting mails task

--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/a909b1d9-c912-4d46-9b98-e22d4e101bf8n%40googlegroups.com.

shayan amar

unread,
May 10, 2024, 6:12:07 AMMay 10
to google-apps-sc...@googlegroups.com
can you please guide me on how can i redirect the user using the Google Workspace add-on, externally in Gmail 

On Thu, 9 May 2024 at 06:42, DimuDesigns <dimud...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages