config-defaults-ttl-zero-imap-extract-attachments.json 1.5 KB

1234567891011121314151617181920212223
  1. {
  2. "name": "verify-config-defaults-ttl-zero-imap-extract-attachments",
  3. "settings": {
  4. "storagePermissions": {
  5. "collections": { "ttl0_attach_probe": "read-write" }
  6. }
  7. },
  8. "nodes": [
  9. {"id": "n1", "name": "Trigger", "type": "click-trigger", "position": {"x": 0, "y": 0}, "config": {}},
  10. {"id": "mail", "name": "Mail", "type": "code", "position": {"x": 0, "y": 100},
  11. "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 };"}},
  12. {"id": "extract", "name": "Extract", "type": "imap-extract-attachments", "position": {"x": 0, "y": 200},
  13. "config": {"emailSource": "{{data.result.raw}}", "deduplicateByHash": false, "storeInDatabase": true,
  14. "storageCollection": "ttl0_attach_probe", "storageTtlHours": 0}}
  15. ],
  16. "connections": [
  17. {"sourceNodeId": "n1", "sourceOutput": "main", "targetNodeId": "mail", "targetInput": "data"},
  18. {"sourceNodeId": "mail", "sourceOutput": "main", "targetNodeId": "extract", "targetInput": "data"}
  19. ],
  20. "expect": {
  21. "extract": {"status": "completed", "output": {"count": 1}}
  22. }
  23. }