Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

156
Views
La API de Gmail en python y la aplicación de Gmail dan un ID de mensaje diferente para el mismo mensaje

Así que mire un tutorial en Internet. Creé un Google App Script (GAS) para obtener la identificación del historial. utilizando identificadores de historial anteriores, creé un script que proporciona un identificador de mensaje y un identificador de hilo para cada solicitud entrante y lo publica en mi API en la función postReq (). Ahora, cuando trato de usar estos identificadores en la API de python gmail, muestran un error de que no existen. Traté de obtener identificadores para ciertos mensajes y descubrí que son diferentes de los proporcionados por GAS. ¿Es esto algo que api hace o puedo arreglar esto de todos modos? Gracias

 function doPost(e) { let message = JSON.parse(e.postData.getDataAsString()).message let data = Utilities.newBlob(Utilities.base64Decode(message.data)).getDataAsString(); let sheet = SpreadsheetApp.openById('...') let doc = DocumentApp.openById('...').getBody() let para = doc.getParagraphs()[0] let prevId = sheet.getDataRange().getValues()[0][0]; data = JSON.parse(data) let historyId = parseInt(data.historyId) let history = Gmail.Users.History.list("nyxgodxd@gmail.com",{"startHistoryId": `${prevId}` }).history let threadId = history[0].messages[0].threadId let msgId = history[0].messages[0].id let msg = Gmail.Users.Messages.get(userId = 'me', id = `${msgId}`).snippet let res = {historyId,threadId, msgId,msg} para.appendText(`\n${JSON.stringify(res)}\n`) postReq(res) sheet.getDataRange().setValues([[`${historyId}`]]) return 200; }
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!