Minimal Migration
This is a minimal Gmail2GDrive v1.x configuration example to demonstrate the conversion to the Gmail Processor v2.x config format.
👉 Edit this example in the playground and automatically migrate it to the v2 format using the convert button.
- Config
- Script
{
"processedLabel": "gmail2gdrive/client-test",
"sleepTime": 100,
"maxRuntime": 280,
"newerThan": "2m",
"timezone": "GMT",
"rules": [
{
"filter": "to:my.name+scans@gmail.com",
"folder": "'Scans'-yyyy-MM-dd"
}
]
}
function migrationMinConvert() {
const oldConfig = {
processedLabel: "gmail2gdrive/client-test",
sleepTime: 100,
maxRuntime: 280,
newerThan: "2m",
timezone: "GMT",
rules: [
{
filter: "to:my.name+scans@gmail.com",
folder: "'Scans'-yyyy-MM-dd",
},
],
}
const migratedConfig = GmailProcessorLib.convertV1Config(oldConfig)
console.log(JSON.stringify(migratedConfig, null, 2))
return migratedConfig
}
Source: migrationMin.ts