respond-to-webhook-loop.json 1.1 KB

123456789101112131415161718192021222324
  1. {
  2. "name": "verify-respond-to-webhook-loop",
  3. "nodes": [
  4. {"id": "n1", "name": "Webhook", "type": "post-trigger", "position": {"x": 0, "y": 0}, "config": {}},
  5. {"id": "items", "name": "Items", "type": "code", "position": {"x": 0, "y": 100},
  6. "config": {"code": "return { items: ['alpha', 'beta', 'gamma'] };"}},
  7. {"id": "loop", "name": "Loop", "type": "loop", "position": {"x": 0, "y": 200},
  8. "config": {"inputField": "data.result.items"}},
  9. {"id": "respond", "name": "Respond", "type": "respond-to-webhook", "position": {"x": 0, "y": 300},
  10. "config": {"status": 200, "bodySource": "input", "bodyField": "item", "contentType": "text/plain"}}
  11. ],
  12. "connections": [
  13. {"sourceNodeId": "n1", "sourceOutput": "main", "targetNodeId": "items", "targetInput": "data"},
  14. {"sourceNodeId": "items", "sourceOutput": "main", "targetNodeId": "loop", "targetInput": "data"},
  15. {"sourceNodeId": "loop", "sourceOutput": "loop", "targetNodeId": "respond", "targetInput": "data"}
  16. ],
  17. "http": {
  18. "method": "POST",
  19. "path": "/webhook/{workflowId}",
  20. "body": {"hello": "world"},
  21. "expectStatus": 200,
  22. "expectBodyContains": ["gamma"]
  23. }
  24. }