Guest User

Config.gs

a guest
Aug 4th, 2019
451
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.61 KB | None | 0 0
  1. /**
  2. * Configuration for Gmail2GDrive
  3. * See https://github.com/ahochsteger/gmail2gdrive/blob/master/README.md for a config reference
  4. */
  5. function getGmail2GDriveConfig() {
  6. return {
  7. // Global filter
  8. "globalFilter": "-in:trash -in:drafts -in:spam in:inbox",
  9. // Gmail label for processed threads (will be created, if not existing):
  10. "processedLabel": "to-gdrive/processed",
  11. // Sleep time in milli seconds between processed messages:
  12. "sleepTime": 100,
  13. // Maximum script runtime in seconds (google scripts will be killed after 5 minutes):
  14. "maxRuntime": 45,
  15. // Only process message newer than (leave empty for no restriction; use d, m and y for day, month and year):
  16. "newerThan": "1m",
  17. // Timezone for date/time operations:
  18. "timezone": "GMT",
  19.  
  20. // Processing rules:
  21. "rules": [
  22. /* { // Store all attachments sent to [email protected] to the folder "Scans"
  23. "filter": "has:attachment to:[email protected]",
  24. "folder": "'Scans'-yyyy-MM-dd"
  25. },
  26. { // Store all attachments from [email protected] to the folder "Examples/example1"
  27. "filter": "has:attachment from:[email protected]",
  28. "folder": "'Examples/example1'"
  29. }, */
  30.  
  31.  
  32. { // Store all pdf attachments from [email protected] to the folder "Examples/example2"
  33. "filter": "label:gmail2drive",
  34. "folder": "'Swann'",
  35. "filenameFromRegexp": ".*\.jpg$",
  36. "archive": true
  37. },
  38.  
  39.  
  40. // { // Store all attachments from [email protected] OR from:[email protected]
  41. // to the folder "Examples/example3ab" while renaming all attachments to the pattern
  42. // defined in 'filenameTo' and archive the thread.
  43. // "filter": "has:attachment (from:[email protected] OR from:[email protected])",
  44. // "folder": "'Examples/example3ab'",
  45. // "filenameTo": "'file-'yyyy-MM-dd-'%s.txt'",
  46. // "archive": true
  47. // },
  48.  
  49. /* {
  50. // Store threads marked with label "PDF" in the folder "PDF Emails" als PDF document.
  51. "filter": "label:PDF",
  52. "saveThreadPDF": true,
  53. "folder": "PDF Emails"
  54. },
  55. { // Store all attachments named "file.txt" from [email protected] to the
  56. // folder "Examples/example4" and rename the attachment to the pattern
  57. // defined in 'filenameTo' and archive the thread.
  58. "filter": "has:attachment from:[email protected]",
  59. "folder": "'Examples/example4'",
  60. "filenameFrom": "file.txt",
  61. "filenameTo": "'file-'yyyy-MM-dd-'%s.txt'"
  62. } */
  63.  
  64. ]
  65. };
  66. }
Advertisement
Add Comment
Please, Sign In to add comment