| 1234567891011121314151617181920212223 |
- {
- "name": "verify-config-defaults-ttl-zero-imap-extract-attachments",
- "settings": {
- "storagePermissions": {
- "collections": { "ttl0_attach_probe": "read-write" }
- }
- },
- "nodes": [
- {"id": "n1", "name": "Trigger", "type": "click-trigger", "position": {"x": 0, "y": 0}, "config": {}},
- {"id": "mail", "name": "Mail", "type": "code", "position": {"x": 0, "y": 100},
- "config": {"code": "var boundary = 'BOUNDARY123'; var b64 = smartbotic.utils.base64Encode('hello world'); var raw = 'Content-Type: multipart/mixed; boundary=\"' + boundary + '\"\\n\\n' + '--' + boundary + '\\n' + 'Content-Type: text/plain\\n\\n' + 'body text\\n' + '--' + boundary + '\\n' + 'Content-Type: text/plain; name=\"test.txt\"\\n' + 'Content-Disposition: attachment; filename=\"test.txt\"\\n' + 'Content-Transfer-Encoding: base64\\n\\n' + b64 + '\\n' + '--' + boundary + '--'; return { raw: raw };"}},
- {"id": "extract", "name": "Extract", "type": "imap-extract-attachments", "position": {"x": 0, "y": 200},
- "config": {"emailSource": "{{data.result.raw}}", "deduplicateByHash": false, "storeInDatabase": true,
- "storageCollection": "ttl0_attach_probe", "storageTtlHours": 0}}
- ],
- "connections": [
- {"sourceNodeId": "n1", "sourceOutput": "main", "targetNodeId": "mail", "targetInput": "data"},
- {"sourceNodeId": "mail", "sourceOutput": "main", "targetNodeId": "extract", "targetInput": "data"}
- ],
- "expect": {
- "extract": {"status": "completed", "output": {"count": 1}}
- }
- }
|