Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

615
Vistas
GMAIL: How to open a existing email in new window if I know its id?

Shortly: How to open email in gmail if I know its id in new window?

Greetings. I get from GMAIL API the id of needed email. I want it to open in separate window by, for example, btn click in my add-on. What I know:

  • what using javascript code -window.location.href = to open url in new window.
  • You can open drafts using URL https://mail.google.com/mail/u/0/#drafts?compose=NeededID but it wont work with for example Sent emails

Any idea how the url should look like so that you can open the email in separate window in gmail.

about 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Total recall. Solution was found. The solution can be applied to open email in any folder not only in Sent folder. To Open email in new window need its id and thread_id of that email. Also known as messageId and conversationId.
By example messageId looks like this- msg-a:r8357142279172082424
and thread id looks like this - thread-a:r-7561979775658404696

So here is javascript code with URL to open existing email in new window.

  const message = encodeURIComponent(`#${conversationId}|${messageId}`);
  const url = `https://mail.google.com/mail/u/0/#all/${message}`;
  const windowHeight = '540';
  const windowWidth = '960';
  window.open(url, '_blank', `location=yes,height=${windowHeight},width=${windowWidth},scrollbars=yes,status=yes`);

the result is this
already existing email is opened by gmail

about 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda