2blane / OctoPrint-Webhooks

Make OctoPrint events call your custom webhooks!
GNU Affero General Public License v3.0
28 stars 19 forks source link

"Invalid JSON for DATA setting" #35

Open stevenwbuehler opened 2 years ago

stevenwbuehler commented 2 years ago

The application is telling me that the following is invalid JSON for sending a "Print Done" webhook (sending to a Google Apps Script to add a row to a Google Sheet):

{
    "sheetid": "1L3Kl8TPWNtI1_zXaj8U77OYhoZOcajAozUI-LNDijC4",
    "row": [
        "=localDateTime(@currentTime)",
        "@job.file.name",
        "@jobfile.size",
        "=TIME(0,0,@job.estimatedPrintTime)",
        "=TIME(0,0,@job.lastPrintTime)",
        "@job.filament.tool0.volume",
        "@job.filament.tool0.length",
        "@meta.analysis.dimensions.width",
        "@meta.analysis.dimensions.depth",
        "@meta.analysis.dimensions.height"
    ]
}
holgi commented 1 year ago

I had the same problem. It seems that saving the changed settings does not work reliably. I edited OctoPrint's config.yaml manually to get the webhooks working as I wanted.

derekantrican commented 1 year ago

The settings save issue should be resolved in the latest version (3.2.0) via https://github.com/derekantrican/OctoPrint-Webhooks/issues/1