2013-03-05 8 views
11

लेबल करता है जीमेल में एक समस्या है जहां बातचीत थ्रेड में आने वाले नए संदेशों पर वार्तालाप लेबल लागू नहीं होते हैं। issue details hereGoogle Apps स्क्रिप्ट को अनुकूलित करने में सहायता की आवश्यकता है जो ईमेल

हम found एक Google Apps स्क्रिप्ट जो इस समस्या को हल करने के लिए जीमेल इनबॉक्स में अलग-अलग संदेशों पर लेबल को ठीक करता है। स्क्रिप्ट इस प्रकार है:

function relabeller() { 
    var labels = GmailApp.getUserLabels(); 


    for (var i = 0; i < labels.length; i++) { 
    Logger.log("label: " + i + " " + labels[i].getName()); 

    var threads = labels[i].getThreads(0,100); 
    for (var j = 1; threads.length > 0; j++) { 
     Logger.log((j - 1) * 100 + threads.length); 
     labels[i].addToThreads(threads); 
     threads = labels[i].getThreads(j*100, 100); 
    } 
    } 
} 

हालांकि यह स्क्रिप्ट ईमेल बक्से पर Google Apps स्क्रिप्ट पर 5 मिनट निष्पादन समय सीमा की वजह से कई बार बाहर 20,000 से अधिक संदेश के साथ।

क्या कोई भी इस स्क्रिप्ट को अनुकूलित करने का तरीका सुझा सकता है ताकि यह समय-समय पर न हो?

+0

आप इस स्क्रिप्ट को कैसे चलाते हैं? स्वचालित संचालन के लिए आप इसे कैसे सेट अप करते हैं? –

+0

विवरण जारी करने के लिए लिंक 403 त्रुटि प्राप्त करता है। –

उत्तर

13

ठीक है, मैं कुछ दिनों के लिए इस पर काम कर रहा हूँ क्योंकि मैं वास्तव में अजीब के साथ निराश था जिस तरह से जीमेल लेबल/वार्तालापों में संदेशों को लेबल नहीं करता है।

मैं वास्तव में फ्लैबबर्गस्टेड हूं कि वार्तालाप में नए संदेशों पर लेबल स्वचालित रूप से लागू नहीं होते हैं। यह जीमेल यूआई में बिल्कुल दिखाई नहीं देता है। धागे को देखने का कोई तरीका नहीं है और यह निर्धारित करता है कि लेबल केवल थ्रेड में कुछ संदेशों पर लागू होते हैं, और आप यूआई में एक ही संदेश में लेबल नहीं जोड़ सकते हैं। चूंकि मैं नीचे अपनी लिपि के माध्यम से काम कर रहा था, मैंने देखा कि आप एक संदेश में प्रोग्रामेटिक रूप से लेबल भी नहीं जोड़ सकते हैं। तो वर्तमान व्यवहार के लिए वास्तव में कोई कारण नहीं है।

मेरे रास्ते से बाहर निकलने के साथ, मेरे पास स्क्रिप्ट के बारे में कुछ नोट हैं।

  1. मैं सर्ज के कोड के साथ संयुक्त साकिब का कोड जोड़ता हूं।
  2. स्क्रिप्ट में दो भाग हैं: एक प्रारंभिक रन जो सभी थ्रेड को जोड़ता है जिसमें उपयोगकर्ता लेबल संलग्न होता है, और एक रखरखाव चलाता है जो हालिया ईमेल लेबल करता है (वर्तमान में 4 दिन वापस देखता है)। एक रन के दौरान केवल एक भाग निष्पादित होता है।एक बार प्रारंभिक रन पूरा होने के बाद, केवल रखरखाव भाग ही चलाया जाएगा। आप अपनी जरूरतों के आधार पर प्रति दिन एक बार या कम या ज्यादा बार इसे चलाने के लिए एक ट्रिगर सेट कर सकते हैं।
  3. प्रारंभिक रन 5 मिनट के स्क्रिप्ट समय सीमा से समाप्त होने से बचने के लिए 4 मिनट के बाद बंद हो जाता है। यह 4 मिनट के बाद फिर से चलाने के लिए एक ट्रिगर सेट करता है (इन दोनों को स्क्रिप्ट में स्थिरांक का उपयोग करके बदला जा सकता है)। ट्रिगर अगले भाग में हटा दिया जाता है।
    • रखरखाव अनुभाग में कोई रन-टाइम चेक नहीं है। यदि आपके पिछले 4 दिनों में बहुत सारे ईमेल हैं, तो रखरखाव अनुभाग स्क्रिप्ट समय सीमा को हिट कर सकता है। मैं शायद स्क्रिप्ट को और अधिक कुशल बनाने के लिए बदल सकता हूं, लेकिन अब तक यह मेरे लिए काम करता है इसलिए मैं वास्तव में इसमें सुधार करने के लिए प्रेरित नहीं हूं।
  4. जीमेल "लिखने कोटा त्रुटि" को पकड़ने के लिए शुरुआती दौड़ में एक कोशिश/पकड़ विवरण है और कृपा से बाहर निकलें (यानी वर्तमान प्रगति लिखना ताकि इसे बाद में उठाया जा सके), लेकिन मैं ' टी पता है कि यह काम करता है क्योंकि मुझे त्रुटि होने में त्रुटि नहीं मिली।
  5. समय सीमा समाप्त होने पर आपको एक ईमेल प्राप्त होगा, और जब प्रारंभिक रन समाप्त हो जाएगा।
  6. किसी कारण से, Logger.clear() कमांड का उपयोग करते समय भी लॉग रनों के बीच पूरी तरह से स्पष्ट नहीं होता है। तो स्थिति लॉग इन करती है कि यह उपयोगकर्ता को ईमेल करता है, केवल हाल ही में चलने वाली जानकारी से अधिक है। मुझे नहीं पता कि ऐसा क्यों होता है।

मैंने इसका उपयोग लगभग आधे घंटे (प्रतीक्षा समय सहित) में 20,000 ईमेल संसाधित करने के लिए किया है। मैं वास्तव में इसे दो बार भाग गया, इसलिए यह एक दिन में 40,000 ईमेल संसाधित करता था। मुझे लगता है कि 10,000 की जीमेल पढ़ने/लिखने की सीमा यहां लागू नहीं की जा रही है (हो सकता है कि एक समय में एक लेबल को 100 धागे के लिए लागू करना 100 की बजाय एक एकल लिखने की घटना के रूप में गिना जाता है?)। स्टेटस ईमेल भेजता है, यह 4 मिनट की दौड़ में लगभग 5,000 धागे से गुजरता है।

लंबी लाइनों के लिए खेद है। मैं वाइडस्क्रीन मॉनीटर को दोष देता हूं। आप क्या सोचते हैं मुझे बताओ!

function relabelGmail() { 

    var startTime= (new Date()).getTime(); // Time at start of script 
    var BATCH=100; // total number of threads to apply label to at once. 
    var LOOKBACKDAYS=4; // Days to look back for maintenance section of script. Should be at least 2 
    var MAX_RUN_TIME=4*60*1000; // Time in ms for max execution. 4 minutes is a good start. 
    var WAIT_TIME=4*60*1000; // Time in ms to wait before starting the script again. 
    Logger.clear(); 



// ScriptProperties.deleteAllProperties(); return; // Uncomment this line and run once to start over completely 

    if(ScriptProperties.getKeys().length==0){ // this is to create keys on the first run 
    ScriptProperties.setProperties({'itemsProcessed':0, 'initFinished':false, 'lastrun':'20000101', 'itemsProcessedToday':0, 
            'currentLabel':'null-label-NOTREAL', 'currentLabelStart':0, 'autoTrig':0, 'autoTrigID':'0'}); 
    } 

    var itemsP = Number(ScriptProperties.getProperty('itemsProcessed')); // total counter 
    var initTemp = ScriptProperties.getProperty('initFinished'); // keeps track of when initial run is finished. 
    var initF = (initTemp.toLowerCase() == 'true'); // Make it boolean 

    var lastR = ScriptProperties.getProperty('lastrun'); // String of date corresponding to itemsProcessedToday in format yyyymmdd 
    var itemsPT = Number(ScriptProperties.getProperty('itemsProcessedToday')); // daily counter 
    var currentL = ScriptProperties.getProperty('currentLabel'); // Label currently being processed 
    var currentLS = Number(ScriptProperties.getProperty('currentLabelStart')); // Thread number to start on 

    var autoT = Number(ScriptProperties.getProperty('autoTrig')); // Number to say whether the last run made an automatic trigger 
    var autoTID = ScriptProperties.getProperty('autoTrigID'); // Unique ID of last written auto trigger 

    // First thing: google terminates scripts after 5 minutes. 
    // If 4 minutes have passed, this script will terminate, write some data, 
    // and create a trigger to re-schedule itself to start again in a few minutes. 
    // If an auto trigger was created last run, it is deleted here. 
    if (autoT) { 
    var allTriggers = ScriptApp.getProjectTriggers(); 

    // Loop over all triggers. If trigger isn't found, then it must have ben deleted. 
    for(var i=0; i < allTriggers.length; i++) { 
     if (allTriggers[i].getUniqueId() == autoTID) { 
     // Found the trigger and now delete it 
     ScriptApp.deleteTrigger(allTriggers[i]); 
     break; 
     } 
    } 
    autoT = 0; 
    autoTID = '0'; 
    } 

    var today = dateToStr_(); 
    if (today == lastR) { // If new day, reset daily counter 
    // Don't do anything 
    } else { 
    itemsPT = 0; 
    } 

    if (!initF) { // Don't do any of this if the initial run has been completed 
    var labels = GmailApp.getUserLabels(); 

    // Find position of last label attempted 
    var curLnum=0; 
    for (; curLnum < labels.length; curLnum++) { 
     if (labels[curLnum].getName() == currentL) {break}; 
    } 
    if (curLnum == labels.length) { // If label isn't found, start over at the beginning 
     curLnum = 0; 
     currentLS = 0; 
     itemsP=0; 
     currentL=labels[0].getName(); 
    } 

    // Now start working through the labels until the quota is hit. 
    // Use a try/catch to stop execution if your quota has been hit. 
    // Google can actually automatically email you, but we need to clean up a bit before terminating the script so it can properly pick up again tomorrow. 
    try { 
     for (var i = curLnum; i < labels.length; i++) { 
     currentL = labels[i].getName(); // Next label 
     Logger.log('label: ' + i + ' ' + currentL); 

     var threads = labels[i].getThreads(currentLS,BATCH); 

     for (var j = Math.floor(currentLS/BATCH); threads.length > 0; j++) { 
      var currTime = (new Date()).getTime(); 
      if (currTime-startTime > MAX_RUN_TIME) { 

      // Make the auto-trigger 
      autoT = 1; // So the auto trigger gets deleted next time. 

      var autoTrigger = ScriptApp.newTrigger('relabelGmail') 
      .timeBased() 
      .at(new Date(currTime+WAIT_TIME)) 
      .create(); 

      autoTID = autoTrigger.getUniqueId(); 

      // Now write all the values. 
      ScriptProperties.setProperties({'itemsProcessed':itemsP, 'initFinished':initF, 'lastrun':today, 'itemsProcessedToday':itemsPT, 
              'currentLabel':currentL, 'currentLabelStart':currentLS, 'autoTrig':autoT, 'autoTrigID':autoTID}); 

      // Send an email 
      var emailAddress = Session.getActiveUser().getEmail(); 
      GmailApp.sendEmail(emailAddress, 'Relabel job in progress', 'Your Gmail Relabeller has halted to avoid termination due to excess ' + 
           'run time. It will run again in ' + WAIT_TIME/1000/60 + ' minutes.\n\n' + itemsP + ' threads have been processed. ' + itemsPT + 
           ' have been processed today.\n\nSee the log below for more information:\n\n' + Logger.getLog()); 
      return; 
      } else { 
      // keep on going 
      var len = threads.length; 
      Logger.log(j * BATCH + len); 

      labels[i].addToThreads(threads); 

      currentLS = currentLS + len; 
      itemsP = itemsP + len; 
      itemsPT = itemsPT + len; 
      threads = labels[i].getThreads((j+1) * BATCH, BATCH); 
      } 
     } 

     currentLS = 0; // Reset LS counter 
     } 

     initF = true; // Initial run is done 

    } catch (e) { // Clean up and send off a notice. 
     // Write current values back to ScriptProperties 
     ScriptProperties.setProperties({'itemsProcessed':itemsP, 'initFinished':initF, 'lastrun':today, 'itemsProcessedToday':itemsPT, 
             'currentLabel':currentL, 'currentLabelStart':currentLS, 'autoTrig':autoT, 'autoTrigID':autoTID}); 

     var emailAddress = Session.getActiveUser().getEmail(); 
     var errorDate = new Date(); 
     GmailApp.sendEmail(emailAddress, 'Error "' + e.name + '" in Google Apps Script', 'Your Gmail Relabeller has failed in the following stack:\n\n' + 
         e.stack + '\nThis may be due to reaching your daily Gmail read/write quota. \nThe error message is: ' + 
         e.message + '\nThe error occurred at the following date and time: ' + errorDate + '\n\nThus far, ' + 
         itemsP + ' threads have been processed. ' + itemsPT + ' have been processed today. \nSee the log below for more information:' + 
         '\n\n' + Logger.getLog()); 
     return; 
    } 

    // Write current values back to ScriptProperties. Send completion email. 
    ScriptProperties.setProperties({'itemsProcessed':itemsP, 'initFinished':initF, 'lastrun':today, 'itemsProcessedToday':itemsPT, 
            'currentLabel':currentL, 'currentLabelStart':currentLS, 'autoTrig':autoT, 'autoTrigNumber':autoTID}); 

    var emailAddress = Session.getActiveUser().getEmail(); 
    GmailApp.sendEmail(emailAddress, 'Relabel job completed', 'Your Gmail Relabeller has finished its initial run.\n' + 
         'If you continue to run the script, it will skip the initial run and instead relabel ' + 
         'all emails from the previous ' + LOOKBACKDAYS + ' days.\n\n' + itemsP + ' threads were processed. ' + itemsPT + 
         ' were processed today. \nSee the log below for more information:' + '\n\n' + Logger.getLog()); 

    return; // Don't run the maintenance section after initial run finish 

    } // End initial run section statement 


    // Below is the 'maintenance' section that will be run when the initial run is finished. It finds all new threads 
    // (as defined by LOOKBACKDAYS) and applies any existing labels to all messages in each thread. Note that this 
    // won't miss older threads that are labeled by the user because all messages in a thread get the label 
    // when the label action is first performed. If another message is then sent or received in that thread, 
    // then this maintenance section will find it because it will be deemed a "new" thread at that point. 
    // You may need to search further back the first time you run this if it took more than 3 days to finish 
    // the initial run. For general maintenance, though, 4 days should be plenty. 

    // Note that I have not implemented a script-run-time check for this section. 

    var threads = GmailApp.search('newer_than:' + LOOKBACKDAYS + 'd', 0, BATCH); // 
    var len = threads.length; 

    for (var i=0; len > 0; i++) { 

    for (var t = 0; t < len; t++) { 
     var labels = threads[t].getLabels(); 

     for (var l = 0; l < labels.length; l++) { // Add each label to the thread 
     labels[l].addToThread(threads[t]); 
     } 
    } 

    itemsP = itemsP + len; 
    itemsPT = itemsPT + len; 

    threads = GmailApp.search('newer_than:' + LOOKBACKDAYS + 'd', (i+1) * BATCH, BATCH); 
    len = threads.length; 
    } 
    // Write the property data 
    ScriptProperties.setProperties({'itemsProcessed':itemsP, 'initFinished':initF, 'lastrun':today, 'itemsProcessedToday':itemsPT, 
            'currentLabel':currentL, 'currentLabelStart':currentLS, 'autoTrig':autoT, 'autoTrigID':autoTID}); 
} 


// Takes a date object and turns it into a string of form yyyymmdd 
function dateToStr_(dateObj) { //takes in a date object, but uses current date if not a date 

    if (!(dateObj instanceof Date)) { 
    dateObj = new Date(); 
    } 

    var dd = dateObj.getDate(); 
    var mm = dateObj.getMonth()+1; //January is 0! 
    var yyyy = dateObj.getFullYear(); 

    if(dd<10){dd='0'+dd}; 
    if(mm<10){mm='0'+mm}; 
    dateStr = ''+yyyy+mm+dd; 

    return dateStr; 

} 

संपादित करें: 2017/03/24 मुझे लगता है मैं, सूचनाएं या कुछ चालू करना चाहिए क्योंकि मैं कभी user29020 से सवाल को देखा। यदि किसी के पास कभी भी वही प्रश्न है, तो मैं यहां क्या करता हूं: मैं इसे 1 और 2 पूर्वाह्न के बीच प्रत्येक रात चलाने के लिए दैनिक ट्रिगर सेट करके रखरखाव फ़ंक्शन के रूप में चलाता हूं।

एक अतिरिक्त नोट: ऐसा लगता है कि पिछले साल या तो किसी भी समय, जीमेल को कॉलिंग लेबलिंग में काफी कमी आई है। अब यह प्रति थ्रेड लगभग 0.2 सेकंड लेता है, इसलिए मैं उम्मीद करता हूं कि 20k ईमेल के शुरुआती भाग में कम से कम 20 रन या इससे पहले कि यह सब कुछ हो जाए। इसका यह भी अर्थ है कि यदि आप आम तौर पर एक दिन में 100-200 से अधिक ईमेल प्राप्त करते हैं, तो रखरखाव अनुभाग में भी बहुत समय लगना शुरू हो सकता है और असफल होना शुरू हो सकता है। अब यह बहुत सारे ईमेल हैं, लेकिन मैं शर्त लगाता हूं कि कुछ लोग हैं जो बहुत से प्राप्त करते हैं, और ऐसा लगता है कि आप उस 1000 या उससे अधिक दैनिक ईमेल से अधिक प्रभावित होंगे जो विफलता के लिए आवश्यक थे जब मैंने पहली बार लिखा था स्क्रिप्ट।

वैसे भी, एक शमन कम से कम 4 को LOOKBACKDAYS कम करने के लिए किया जाएगा, लेकिन मैं इसे कम से कम 2

+0

यह वास्तव में मुझे जीमेल में एक लापता फीचर को लागू करने वाले ऐप्स स्क्रिप्ट-आधारित ऐप लिखने में मदद कर रहा है (यानी समूह द्वारा फ़िल्टर करने में सक्षम नहीं है)। –

+0

आप उल्लेख करते हैं कि यह init के बाद "रखरखाव" फ़ंक्शन के रूप में चलाएगा। क्या मेरे जीमेल संदेशों पर पृष्ठभूमि में समय-समय पर यह रन चलाने का कोई तरीका है? अब तक, मैं केवल यह पता लगा सकता हूं कि अपनी अच्छी स्क्रिप्ट को केवल script.google.com से कैसे चलाएं। किसी भी मदद या पॉइंटर्स की सराहना की जाएगी - धन्यवाद! – Kalin

+0

मैंने अभी इस स्क्रिप्ट को चलाया है, और लॉग को देखकर, ऐसा लगता है कि केवल उपयोगकर्ता लेबल प्रभावित होते हैं। क्या यह काम सिस्टम लेबल के साथ तारांकित या महत्वपूर्ण लेबल जैसे संभव है? – adamlogan

5

the documentation : से

विधि getInboxThreads()

पुन: प्राप्त इनबॉक्स की सभी धागे लेबल पर ध्यान दिए बिना इस कॉल विफल हो जाएगा जब सभी धागे का आकार बहुत बड़ा प्रणाली को संभालने के लिए के लिए है। जहां थ्रेड आकार अज्ञात है, और संभावित रूप से बहुत बड़ा है, कृपया 'पेजेड' कॉल का उपयोग करें, और प्रत्येक कॉल में पुनर्प्राप्त करने के लिए थ्रेड की श्रेणियां निर्दिष्ट करें। *

तो आपको कुछ निश्चित धागे को संभालना चाहिए, संदेशों को लेबल करना चाहिए और प्रत्येक 10 मिनट या प्रत्येक संदेश को प्रत्येक "पेज" चलाने के लिए एक समय ट्रिगर सेट करना चाहिए जब तक कि सभी संदेशों को लेबल न किया जाए।


संपादित करें: मैं दे दिया है कि यह एक कोशिश, शुरू के साथ करने के लिए एक ड्राफ्ट के रूप पर विचार करें:

स्क्रिप्ट एक समय में 100 धागे पर कार्रवाई करेंगे और पर आपको सूचित करना है आपको एक ईमेल भेज इसके प्रगति और लॉग दिखाओ।

जब यह समाप्त हो जाए तो यह आपको ईमेल के साथ भी चेतावनी देगा। यह अपने राज्य को स्टोर करने के लिए स्क्रिप्टप्रॉपर्टीज का उपयोग करता है। (स्क्रिप्ट के अंत में मेल एड्रेस अपडेट करना न भूलें)। मैं 5 मिनट के लिए सेट एक समय ट्रिगर के साथ यह कोशिश की और यह अब के लिए सुचारू रूप से चलाने के लिए लगता है ...

function inboxLabeller() { 

    if(ScriptProperties.getKeys().length==0){ // this is to create keys on the first run 
    ScriptProperties.setProperties({'threadStart':0, 'itemsprocessed':0, 'notF':true}) 
    } 
    var items = Number(ScriptProperties.getProperty('itemsprocessed'));// total counter 
    var tStart = Number(ScriptProperties.getProperty('threadStart'));// the value to start with 
    var notFinished = ScriptProperties.getProperty('notF');// the "main switch" ;-) 
    Logger.clear() 

    while (notFinished){ // the main loop 
    var threads = GmailApp.getInboxThreads(tStart,100); 
    Logger.log('Number of threads='+Number(tStart+threads.length)); 
     if(threads.length==0){ 
     notFinished=false ; 
     break 
     } 
     for(t=0;t<threads.length;++t){ 
     var mCount = threads[t].getMessageCount(); 
     var mSubject = threads[t].getFirstMessageSubject(); 
     var labels = threads[t].getLabels(); 
     var labelsNames = ''; 
     for(var l in labels){labelsNames+=labels[l].getName()} 
     Logger.log('subject '+mSubject+' has '+mCount+' msgs with labels '+labelsNames) 
     for(var l in labels){ 
      labels[l].addToThread(threads[t]) 
     } 
     } 
     tStart = tStart+100; 
     items = items+100 
     ScriptProperties.setProperties({'threadStart':tStart, 'itemsprocessed':items}) 
     break 
     } 
    if(notFinished){ 
     GmailApp.sendEmail('mymail', 'inboxLabeller progress report', 'Still working, '+items+' processed \n - see logger below \n \n'+Logger.getLog()); 
     }else{ 
     GmailApp.sendEmail('mymail', 'inboxLabeller End report', 'Job completed : '+items+' processed'); 
     ScriptProperties.setProperties({'threadStart':0, 'itemsprocessed':0, 'notF':true}) 
     } 
} 
+0

धन्यवाद सर्ज।क्या आप सुझाव दे सकते हैं कि आपने जो कुछ सुझाव दिया है उसे पूरा करने के लिए कृपया कुछ कोड सुझाएं? –

+0

सर्ज। अनुकूलित कोड पोस्ट करने के लिए धन्यवाद। मैं इसे पिछले कुछ दिनों से चला रहा हूं, लेकिन मुद्दा यह है कि मैंने हर दिन जीमेल लिखने कोटा मारा। दुर्भाग्य से ऐसा लगता है कि Google Apps स्क्रिप्ट कोटा बहुत प्रतिबंधित हैं। कोई अन्य विचार? –

+3

यह कोड मेरे समाधान पर काम करने में मेरे लिए सहायक था। ध्यान देने योग्य एक बात यह है कि, चूंकि यह कोड थ्रेड खोजने के लिए getInboxThreads का उपयोग करता है, यह किसी संग्रहीत धागे को संसाधित नहीं करेगा। – GordonM

1

यह है कि एक लेबल की जरूरत नहीं है और लेबल लागू अलग-अलग संदेश मिलेगा डालने की सिफारिश नहीं होगा संबंधित धागे का। इसमें बहुत कम समय लगता है क्योंकि यह हर एक संदेश को पुनः लेबल नहीं कर रहा है।

function label_unlabeled_messages() { 
    var unlabeled = GmailApp.search("has:nouserlabels -label:inbox -label:sent -label:chats -label:draft -label:spam -label:trash"); 

    for (var i = 0; i < unlabeled.length; i++) { 
    Logger.log("thread: " + i + " " + unlabeled[i].getFirstMessageSubject()); 
    labels = unlabeled[i].getLabels(); 
    for (var j = 0; j < labels.length; j++) { 
     Logger.log("labels: " + i + " " + labels[j].getName()); 
     labels[j].addToThread(unlabeled[i]); 
    } 
    } 
} 
+0

कार्य करने के लिए केवल लेबल रहित संदेश (और उनकी बातचीत) का चयन करना एक साफ विचार है। क्या यह विधि अभी भी नए संदेशों के लिए लेबल को पुराने वार्तालाप में ठीक करती है जिसे फ़िल्टर द्वारा उपयोगकर्ता लेबल असाइन किया गया है? मान लें कि हमारे पास एक फ़िल्टर है जो सभी आने वाले संदेशों को लेबल "stdlabel" असाइन करता है। उपयोगकर्ता एक वार्तालाप खोलता है और इसके अतिरिक्त इसे "व्यवसाय" लेबल करता है (वार्तालाप के संदेश अब सभी में 2 लेबल होते हैं)। फिर एक नया जवाब आता है; फ़िल्टर इसे "stdlabel" असाइन करता है। क्या यह स्क्रिप्ट उस नए संदेश को "stdlabel" और "business" दोनों को ठीक करेगी? धन्यवाद! – Kalin

+1

@ user29020 नहीं, क्योंकि यह उन संदेशों को फ़िल्टर करता है जिनके पास कोई काम शुरू होने से पहले "nouserlabels" है। "stdlabel" को उपयोगकर्ता लेबल माना जाएगा, इसलिए ये ईमेल चयनित नहीं होंगे। – janpio

संबंधित मुद्दे