@epilot/automation-client 0.7.2 → 0.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- !function(e,t){for(var r in t)e[r]=t[r];t.__esModule&&Object.defineProperty(e,"__esModule",{value:!0})}(exports,(()=>{"use strict";var e={914:function(e,t,r){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=i(r(279));t.default=s.default},279:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"Automation API","description":"API Backend for epilot Automation Workflows feature","version":"1.0.0"},"tags":[{"name":"flows","description":"Automation flows"},{"name":"executions","description":"Automation executions"}],"security":[{"EpilotAuth":[]},{"AsOrganization":[]}],"paths":{"/v1/automation/flows":{"get":{"operationId":"searchFlows","summary":"searchFlows","description":"Search available automation flows","tags":["flows"],"parameters":[{"name":"schema","in":"query","description":"Entity Schema","schema":{"type":"string","example":"submission"}},{"name":"size","in":"query","description":"Pagination: max number of results to return","schema":{"type":"integer","default":25}},{"name":"from","in":"query","description":"Pagination: starting for results","schema":{"type":"integer","default":0}},{"name":"trigger_source_id","in":"query","description":"Trigger source identifier","schema":{"type":"string","example":"600945fe-212e-4b97-acf7-391d64648384"}}],"responses":{"200":{"description":"List of automation flows","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"integer","example":1},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"triggers":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frontend_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"99"}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["journey_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","format":"uuid"}},"required":["source_id"]}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity_operation"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"210738fe-e1e6-446e-aaef-cce462d7d813"},"schema":{"type":"string","example":"submission"},"operations":{"type":"array","items":{"type":"string","enum":["createEntity","updateEntity","deleteEntity"]}}}}},"required":["type","configuration"]}]}},"trigger_conditions":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}}},"entity_schema":{"description":"The entity schema","type":"string","example":"submission"},"actions":{"type":"array","items":{"oneOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"mode":{"type":"string","enum":["copy_if_exists","append_if_exists"]},"source":{"type":"string"},"value_json":{"type":"string"}},"required":["target","mode","source"]}}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"copy_if_exists","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"outputs":{"type":"object","properties":{"workflow":{"type":"object","additionalProperties":true}}},"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},"required":["target_workflow"]}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}}]}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}}}}}}},"post":{"operationId":"createFlow","summary":"createFlow","description":"Create new automation flow","tags":["flows"],"requestBody":{"description":"Automation flow to create","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"triggers":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frontend_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"99"}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["journey_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","format":"uuid"}},"required":["source_id"]}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity_operation"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"210738fe-e1e6-446e-aaef-cce462d7d813"},"schema":{"type":"string","example":"submission"},"operations":{"type":"array","items":{"type":"string","enum":["createEntity","updateEntity","deleteEntity"]}}}}},"required":["type","configuration"]}]}},"trigger_conditions":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}}},"entity_schema":{"description":"The entity schema","type":"string","example":"submission"},"actions":{"type":"array","items":{"oneOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"mode":{"type":"string","enum":["copy_if_exists","append_if_exists"]},"source":{"type":"string"},"value_json":{"type":"string"}},"required":["target","mode","source"]}}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"copy_if_exists","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"outputs":{"type":"object","properties":{"workflow":{"type":"object","additionalProperties":true}}},"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},"required":["target_workflow"]}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}}]}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}},"responses":{"201":{"description":"The created automation flow","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"triggers":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frontend_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"99"}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["journey_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","format":"uuid"}},"required":["source_id"]}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity_operation"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"210738fe-e1e6-446e-aaef-cce462d7d813"},"schema":{"type":"string","example":"submission"},"operations":{"type":"array","items":{"type":"string","enum":["createEntity","updateEntity","deleteEntity"]}}}}},"required":["type","configuration"]}]}},"trigger_conditions":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}}},"entity_schema":{"description":"The entity schema","type":"string","example":"submission"},"actions":{"type":"array","items":{"oneOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"mode":{"type":"string","enum":["copy_if_exists","append_if_exists"]},"source":{"type":"string"},"value_json":{"type":"string"}},"required":["target","mode","source"]}}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"copy_if_exists","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"outputs":{"type":"object","properties":{"workflow":{"type":"object","additionalProperties":true}}},"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},"required":["target_workflow"]}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}}]}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}}}}},"/v1/automation/flows/{flow_id}":{"get":{"operationId":"getFlow","summary":"getFlow","description":"List available automation flows","tags":["flows"],"parameters":[{"name":"flow_id","in":"path","required":true,"description":"Automation Workflow ID","schema":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"}}],"responses":{"200":{"description":"The returned automation flow","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"triggers":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frontend_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"99"}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["journey_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","format":"uuid"}},"required":["source_id"]}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity_operation"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"210738fe-e1e6-446e-aaef-cce462d7d813"},"schema":{"type":"string","example":"submission"},"operations":{"type":"array","items":{"type":"string","enum":["createEntity","updateEntity","deleteEntity"]}}}}},"required":["type","configuration"]}]}},"trigger_conditions":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}}},"entity_schema":{"description":"The entity schema","type":"string","example":"submission"},"actions":{"type":"array","items":{"oneOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"mode":{"type":"string","enum":["copy_if_exists","append_if_exists"]},"source":{"type":"string"},"value_json":{"type":"string"}},"required":["target","mode","source"]}}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"copy_if_exists","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"outputs":{"type":"object","properties":{"workflow":{"type":"object","additionalProperties":true}}},"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},"required":["target_workflow"]}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}}]}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}}}},"put":{"operationId":"putFlow","summary":"putFlow","description":"Update automation flow by id","tags":["flows"],"parameters":[{"name":"flow_id","in":"path","required":true,"description":"Automation Workflow ID","schema":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"}}],"requestBody":{"description":"Automation flow to create","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"triggers":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frontend_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"99"}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["journey_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","format":"uuid"}},"required":["source_id"]}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity_operation"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"210738fe-e1e6-446e-aaef-cce462d7d813"},"schema":{"type":"string","example":"submission"},"operations":{"type":"array","items":{"type":"string","enum":["createEntity","updateEntity","deleteEntity"]}}}}},"required":["type","configuration"]}]}},"trigger_conditions":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}}},"entity_schema":{"description":"The entity schema","type":"string","example":"submission"},"actions":{"type":"array","items":{"oneOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"mode":{"type":"string","enum":["copy_if_exists","append_if_exists"]},"source":{"type":"string"},"value_json":{"type":"string"}},"required":["target","mode","source"]}}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"copy_if_exists","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"outputs":{"type":"object","properties":{"workflow":{"type":"object","additionalProperties":true}}},"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},"required":["target_workflow"]}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}}]}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}},"responses":{"200":{"description":"The updated automation flow","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"triggers":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frontend_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"99"}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["journey_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","format":"uuid"}},"required":["source_id"]}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity_operation"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"210738fe-e1e6-446e-aaef-cce462d7d813"},"schema":{"type":"string","example":"submission"},"operations":{"type":"array","items":{"type":"string","enum":["createEntity","updateEntity","deleteEntity"]}}}}},"required":["type","configuration"]}]}},"trigger_conditions":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}}},"entity_schema":{"description":"The entity schema","type":"string","example":"submission"},"actions":{"type":"array","items":{"oneOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"mode":{"type":"string","enum":["copy_if_exists","append_if_exists"]},"source":{"type":"string"},"value_json":{"type":"string"}},"required":["target","mode","source"]}}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"copy_if_exists","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"outputs":{"type":"object","properties":{"workflow":{"type":"object","additionalProperties":true}}},"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},"required":["target_workflow"]}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}}]}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}}}},"delete":{"operationId":"deleteFlow","summary":"deleteFlow","description":"Update automation flow by id","tags":["flows"],"parameters":[{"name":"flow_id","in":"path","required":true,"description":"Automation Workflow ID","schema":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"}}],"responses":{"200":{"description":"The deleted automation flow","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"triggers":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frontend_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"99"}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["journey_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","format":"uuid"}},"required":["source_id"]}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity_operation"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"210738fe-e1e6-446e-aaef-cce462d7d813"},"schema":{"type":"string","example":"submission"},"operations":{"type":"array","items":{"type":"string","enum":["createEntity","updateEntity","deleteEntity"]}}}}},"required":["type","configuration"]}]}},"trigger_conditions":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}}},"entity_schema":{"description":"The entity schema","type":"string","example":"submission"},"actions":{"type":"array","items":{"oneOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"mode":{"type":"string","enum":["copy_if_exists","append_if_exists"]},"source":{"type":"string"},"value_json":{"type":"string"}},"required":["target","mode","source"]}}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"copy_if_exists","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"outputs":{"type":"object","properties":{"workflow":{"type":"object","additionalProperties":true}}},"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},"required":["target_workflow"]}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}}]}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}}}}},"/v1/automation/executions":{"get":{"operationId":"getExecutions","summary":"getExecutions","description":"List automation executions","parameters":[{"name":"entity_id","in":"query","schema":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"}},{"name":"size","in":"query","description":"Pagination: max number of results to return","schema":{"type":"integer","default":25}},{"name":"from","in":"query","description":"Pagination: starting for results","schema":{"type":"integer","default":0}}],"tags":["executions"],"responses":{"200":{"description":"List of automation executions","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"9baf184f-bc81-4128-bca3-d974c90a12c4"},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"],"example":"success"},"entity_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"org_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"flow_id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"current_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"actions":{"type":"array","items":{"oneOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"mode":{"type":"string","enum":["copy_if_exists","append_if_exists"]},"source":{"type":"string"},"value_json":{"type":"string"}},"required":["target","mode","source"]}}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"copy_if_exists","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"outputs":{"type":"object","properties":{"workflow":{"type":"object","additionalProperties":true}}},"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},"required":["target_workflow"]}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}}]}}},"required":["id","status","entity_id","org_id","flow_id","actions"]}}}}}}},"post":{"operationId":"startExecution","summary":"startExecution","description":"Start new automation execution","requestBody":{"description":"Execution parameters","content":{"application/json":{"schema":{"type":"object","properties":{"entity_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"flow_id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"}}}}}},"tags":["executions"],"responses":{"201":{"description":"The created execution","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"9baf184f-bc81-4128-bca3-d974c90a12c4"},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"],"example":"success"},"entity_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"org_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"flow_id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"current_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"actions":{"type":"array","items":{"oneOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"mode":{"type":"string","enum":["copy_if_exists","append_if_exists"]},"source":{"type":"string"},"value_json":{"type":"string"}},"required":["target","mode","source"]}}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"copy_if_exists","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"outputs":{"type":"object","properties":{"workflow":{"type":"object","additionalProperties":true}}},"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},"required":["target_workflow"]}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}}]}}},"required":["id","status","entity_id","org_id","flow_id","actions"]}}}}}}},"/v1/automation/executions/{execution_id}":{"get":{"operationId":"getExecution","summary":"getExecution","description":"Get automation execution","parameters":[{"name":"execution_id","in":"path","schema":{"type":"string","example":"9baf184f-bc81-4128-bca3-d974c90a12c4"},"required":true}],"tags":["executions"],"responses":{"200":{"description":"The returned execution","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"9baf184f-bc81-4128-bca3-d974c90a12c4"},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"],"example":"success"},"entity_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"org_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"flow_id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"current_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"actions":{"type":"array","items":{"oneOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"mode":{"type":"string","enum":["copy_if_exists","append_if_exists"]},"source":{"type":"string"},"value_json":{"type":"string"}},"required":["target","mode","source"]}}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"copy_if_exists","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"outputs":{"type":"object","properties":{"workflow":{"type":"object","additionalProperties":true}}},"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},"required":["target_workflow"]}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}}]}}},"required":["id","status","entity_id","org_id","flow_id","actions"]}}}}}},"delete":{"operationId":"cancelExecution","summary":"cancelExecution","description":"Cancel automation execution","parameters":[{"name":"execution_id","in":"path","schema":{"type":"string","example":"9baf184f-bc81-4128-bca3-d974c90a12c4"},"required":true}],"tags":["executions"],"responses":{"200":{"description":"The cancelled execution","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"9baf184f-bc81-4128-bca3-d974c90a12c4"},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"],"example":"success"},"entity_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"org_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"flow_id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"current_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"actions":{"type":"array","items":{"oneOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"mode":{"type":"string","enum":["copy_if_exists","append_if_exists"]},"source":{"type":"string"},"value_json":{"type":"string"}},"required":["target","mode","source"]}}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"copy_if_exists","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"outputs":{"type":"object","properties":{"workflow":{"type":"object","additionalProperties":true}}},"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},"required":["target_workflow"]}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}}]}}},"required":["id","status","entity_id","org_id","flow_id","actions"]}}}}}}}},"components":{"securitySchemes":{"EpilotAuth":{"type":"http","scheme":"bearer","description":"Epilot Bearer Token"},"AsOrganization":{"type":"apiKey","in":"header","name":"x-ivy-org-id","description":"Set organization id when using internal auth"}},"schemas":{"AutomationFlowId":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"AutomationActionId":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"AutomationFlow":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"triggers":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frontend_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"99"}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["journey_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","format":"uuid"}},"required":["source_id"]}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity_operation"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"210738fe-e1e6-446e-aaef-cce462d7d813"},"schema":{"type":"string","example":"submission"},"operations":{"type":"array","items":{"type":"string","enum":["createEntity","updateEntity","deleteEntity"]}}}}},"required":["type","configuration"]}]}},"trigger_conditions":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}}},"entity_schema":{"description":"The entity schema","type":"string","example":"submission"},"actions":{"type":"array","items":{"oneOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"mode":{"type":"string","enum":["copy_if_exists","append_if_exists"]},"source":{"type":"string"},"value_json":{"type":"string"}},"required":["target","mode","source"]}}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"copy_if_exists","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"outputs":{"type":"object","properties":{"workflow":{"type":"object","additionalProperties":true}}},"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},"required":["target_workflow"]}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}}]}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"AnyAction":{"oneOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"mode":{"type":"string","enum":["copy_if_exists","append_if_exists"]},"source":{"type":"string"},"value_json":{"type":"string"}},"required":["target","mode","source"]}}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"copy_if_exists","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"outputs":{"type":"object","properties":{"workflow":{"type":"object","additionalProperties":true}}},"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},"required":["target_workflow"]}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}}]},"AutomationAction":{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},"MapEntityAction":{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"mode":{"type":"string","enum":["copy_if_exists","append_if_exists"]},"source":{"type":"string"},"value_json":{"type":"string"}},"required":["target","mode","source"]}}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"copy_if_exists","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}},"MapEntityActionConfig":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"mode":{"type":"string","enum":["copy_if_exists","append_if_exists"]},"source":{"type":"string"},"value_json":{"type":"string"}},"required":["target","mode","source"]}}}},"MappingAttribute":{"type":"object","properties":{"target":{"type":"string"},"mode":{"type":"string","enum":["copy_if_exists","append_if_exists"]},"source":{"type":"string"},"value_json":{"type":"string"}},"required":["target","mode","source"]},"TriggerWorkflowAction":{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"outputs":{"type":"object","properties":{"workflow":{"type":"object","additionalProperties":true}}},"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},"required":["target_workflow"]}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},"TriggerWorkflowConfig":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},"required":["target_workflow"]},"TriggerWorkflowCondition":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}},"AssignUsersToStep":{"type":"object","properties":{"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]},"TriggerWebhookAction":{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},"TriggerWebhookActionConfig":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}},"AutomationExecutionId":{"type":"string","example":"9baf184f-bc81-4128-bca3-d974c90a12c4"},"AutomationExecution":{"type":"object","properties":{"id":{"type":"string","example":"9baf184f-bc81-4128-bca3-d974c90a12c4"},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"],"example":"success"},"entity_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"org_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"flow_id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"current_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"actions":{"type":"array","items":{"oneOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"mode":{"type":"string","enum":["copy_if_exists","append_if_exists"]},"source":{"type":"string"},"value_json":{"type":"string"}},"required":["target","mode","source"]}}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"copy_if_exists","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"outputs":{"type":"object","properties":{"workflow":{"type":"object","additionalProperties":true}}},"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},"required":["target_workflow"]}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}}]}}},"required":["id","status","entity_id","org_id","flow_id","actions"]},"ExecutionStatus":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"StartExecutionRequest":{"type":"object","properties":{"entity_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"flow_id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"}}},"EntityId":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"OrganizationId":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"JourneySubmitTrigger":{"type":"object","properties":{"type":{"type":"string","enum":["journey_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","format":"uuid"}},"required":["source_id"]}},"required":["type","configuration"]},"FrontendSubmitTrigger":{"type":"object","properties":{"type":{"type":"string","enum":["frontend_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"99"}}}},"required":["type","configuration"]},"EntityOperationTrigger":{"type":"object","properties":{"type":{"type":"string","enum":["entity_operation"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"210738fe-e1e6-446e-aaef-cce462d7d813"},"schema":{"type":"string","example":"submission"},"operations":{"type":"array","items":{"type":"string","enum":["createEntity","updateEntity","deleteEntity"]}}}}},"required":["type","configuration"]},"TriggerCondition":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},"Comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]}}}}')}},t={};return function r(i){if(t[i])return t[i].exports;var s=t[i]={exports:{}};return e[i].call(s.exports,s,s.exports,r),s.exports}(914)})());
1
+ !function(e,t){for(var i in t)e[i]=t[i];t.__esModule&&Object.defineProperty(e,"__esModule",{value:!0})}(exports,(()=>{"use strict";var e={914:function(e,t,i){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=r(i(279));t.default=s.default},279:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"Automation API","description":"API Backend for epilot Automation Workflows feature","version":"1.0.0"},"tags":[{"name":"flows","description":"Automation flows"},{"name":"executions","description":"Automation executions"}],"security":[{"EpilotAuth":[]},{"AsOrganization":[]}],"paths":{"/v1/automation/flows":{"get":{"operationId":"searchFlows","summary":"searchFlows","description":"Search available automation flows","tags":["flows"],"parameters":[{"name":"schema","in":"query","description":"Entity Schema","schema":{"type":"string","example":"submission"}},{"name":"size","in":"query","description":"Pagination: max number of results to return","schema":{"type":"integer","default":25}},{"name":"from","in":"query","description":"Pagination: starting for results","schema":{"type":"integer","default":0}},{"name":"trigger_source_id","in":"query","description":"Trigger source identifier","schema":{"type":"string","example":"600945fe-212e-4b97-acf7-391d64648384"}}],"responses":{"200":{"description":"List of automation flows","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"integer","example":1},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"triggers":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frontend_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"99"}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["journey_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","format":"uuid"}},"required":["source_id"]}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity_operation"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"210738fe-e1e6-446e-aaef-cce462d7d813"},"schema":{"type":"string","example":"submission"},"operations":{"type":"array","items":{"type":"string","enum":["createEntity","updateEntity","deleteEntity"]}}}}},"required":["type","configuration"]}]}},"trigger_conditions":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}}},"entity_schema":{"description":"The entity schema","type":"string","example":"submission"},"actions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"mode":{"type":"string","enum":["copy_if_exists","append_if_exists"]},"source":{"type":"string"},"value_json":{"type":"string"}},"required":["target","mode","source"]}}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"copy_if_exists","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"outputs":{"type":"object","properties":{"workflow":{"type":"object","additionalProperties":true}}},"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"outputs":{"type":"object","additionalProperties":true},"config":{"type":"object","properties":{"template_id":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Document Generation","type":"document-generation","config":{"template_id":{"type":"string","example":"112b08ba-789c-42f2-9940-43b302f641e8\\""}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}}}}],"example":{"id":"25jga0-gkasl26-0asg-908sgaj2","name":"Send Email","type":"send-email","config":{"email_template_id":"gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2","language_code":"de"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}}]}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}}}}}}},"post":{"operationId":"createFlow","summary":"createFlow","description":"Create new automation flow","tags":["flows"],"requestBody":{"description":"Automation flow to create","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"triggers":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frontend_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"99"}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["journey_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","format":"uuid"}},"required":["source_id"]}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity_operation"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"210738fe-e1e6-446e-aaef-cce462d7d813"},"schema":{"type":"string","example":"submission"},"operations":{"type":"array","items":{"type":"string","enum":["createEntity","updateEntity","deleteEntity"]}}}}},"required":["type","configuration"]}]}},"trigger_conditions":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}}},"entity_schema":{"description":"The entity schema","type":"string","example":"submission"},"actions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"mode":{"type":"string","enum":["copy_if_exists","append_if_exists"]},"source":{"type":"string"},"value_json":{"type":"string"}},"required":["target","mode","source"]}}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"copy_if_exists","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"outputs":{"type":"object","properties":{"workflow":{"type":"object","additionalProperties":true}}},"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"outputs":{"type":"object","additionalProperties":true},"config":{"type":"object","properties":{"template_id":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Document Generation","type":"document-generation","config":{"template_id":{"type":"string","example":"112b08ba-789c-42f2-9940-43b302f641e8\\""}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}}}}],"example":{"id":"25jga0-gkasl26-0asg-908sgaj2","name":"Send Email","type":"send-email","config":{"email_template_id":"gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2","language_code":"de"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}}]}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}},"responses":{"201":{"description":"The created automation flow","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"triggers":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frontend_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"99"}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["journey_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","format":"uuid"}},"required":["source_id"]}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity_operation"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"210738fe-e1e6-446e-aaef-cce462d7d813"},"schema":{"type":"string","example":"submission"},"operations":{"type":"array","items":{"type":"string","enum":["createEntity","updateEntity","deleteEntity"]}}}}},"required":["type","configuration"]}]}},"trigger_conditions":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}}},"entity_schema":{"description":"The entity schema","type":"string","example":"submission"},"actions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"mode":{"type":"string","enum":["copy_if_exists","append_if_exists"]},"source":{"type":"string"},"value_json":{"type":"string"}},"required":["target","mode","source"]}}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"copy_if_exists","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"outputs":{"type":"object","properties":{"workflow":{"type":"object","additionalProperties":true}}},"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"outputs":{"type":"object","additionalProperties":true},"config":{"type":"object","properties":{"template_id":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Document Generation","type":"document-generation","config":{"template_id":{"type":"string","example":"112b08ba-789c-42f2-9940-43b302f641e8\\""}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}}}}],"example":{"id":"25jga0-gkasl26-0asg-908sgaj2","name":"Send Email","type":"send-email","config":{"email_template_id":"gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2","language_code":"de"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}}]}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}}}}},"/v1/automation/flows/{flow_id}":{"get":{"operationId":"getFlow","summary":"getFlow","description":"List available automation flows","tags":["flows"],"parameters":[{"name":"flow_id","in":"path","required":true,"description":"Automation Workflow ID","schema":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"}}],"responses":{"200":{"description":"The returned automation flow","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"triggers":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frontend_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"99"}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["journey_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","format":"uuid"}},"required":["source_id"]}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity_operation"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"210738fe-e1e6-446e-aaef-cce462d7d813"},"schema":{"type":"string","example":"submission"},"operations":{"type":"array","items":{"type":"string","enum":["createEntity","updateEntity","deleteEntity"]}}}}},"required":["type","configuration"]}]}},"trigger_conditions":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}}},"entity_schema":{"description":"The entity schema","type":"string","example":"submission"},"actions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"mode":{"type":"string","enum":["copy_if_exists","append_if_exists"]},"source":{"type":"string"},"value_json":{"type":"string"}},"required":["target","mode","source"]}}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"copy_if_exists","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"outputs":{"type":"object","properties":{"workflow":{"type":"object","additionalProperties":true}}},"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"outputs":{"type":"object","additionalProperties":true},"config":{"type":"object","properties":{"template_id":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Document Generation","type":"document-generation","config":{"template_id":{"type":"string","example":"112b08ba-789c-42f2-9940-43b302f641e8\\""}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}}}}],"example":{"id":"25jga0-gkasl26-0asg-908sgaj2","name":"Send Email","type":"send-email","config":{"email_template_id":"gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2","language_code":"de"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}}]}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}}}},"put":{"operationId":"putFlow","summary":"putFlow","description":"Update automation flow by id","tags":["flows"],"parameters":[{"name":"flow_id","in":"path","required":true,"description":"Automation Workflow ID","schema":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"}}],"requestBody":{"description":"Automation flow to create","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"triggers":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frontend_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"99"}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["journey_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","format":"uuid"}},"required":["source_id"]}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity_operation"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"210738fe-e1e6-446e-aaef-cce462d7d813"},"schema":{"type":"string","example":"submission"},"operations":{"type":"array","items":{"type":"string","enum":["createEntity","updateEntity","deleteEntity"]}}}}},"required":["type","configuration"]}]}},"trigger_conditions":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}}},"entity_schema":{"description":"The entity schema","type":"string","example":"submission"},"actions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"mode":{"type":"string","enum":["copy_if_exists","append_if_exists"]},"source":{"type":"string"},"value_json":{"type":"string"}},"required":["target","mode","source"]}}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"copy_if_exists","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"outputs":{"type":"object","properties":{"workflow":{"type":"object","additionalProperties":true}}},"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"outputs":{"type":"object","additionalProperties":true},"config":{"type":"object","properties":{"template_id":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Document Generation","type":"document-generation","config":{"template_id":{"type":"string","example":"112b08ba-789c-42f2-9940-43b302f641e8\\""}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}}}}],"example":{"id":"25jga0-gkasl26-0asg-908sgaj2","name":"Send Email","type":"send-email","config":{"email_template_id":"gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2","language_code":"de"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}}]}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}},"responses":{"200":{"description":"The updated automation flow","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"triggers":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frontend_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"99"}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["journey_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","format":"uuid"}},"required":["source_id"]}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity_operation"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"210738fe-e1e6-446e-aaef-cce462d7d813"},"schema":{"type":"string","example":"submission"},"operations":{"type":"array","items":{"type":"string","enum":["createEntity","updateEntity","deleteEntity"]}}}}},"required":["type","configuration"]}]}},"trigger_conditions":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}}},"entity_schema":{"description":"The entity schema","type":"string","example":"submission"},"actions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"mode":{"type":"string","enum":["copy_if_exists","append_if_exists"]},"source":{"type":"string"},"value_json":{"type":"string"}},"required":["target","mode","source"]}}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"copy_if_exists","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"outputs":{"type":"object","properties":{"workflow":{"type":"object","additionalProperties":true}}},"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"outputs":{"type":"object","additionalProperties":true},"config":{"type":"object","properties":{"template_id":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Document Generation","type":"document-generation","config":{"template_id":{"type":"string","example":"112b08ba-789c-42f2-9940-43b302f641e8\\""}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}}}}],"example":{"id":"25jga0-gkasl26-0asg-908sgaj2","name":"Send Email","type":"send-email","config":{"email_template_id":"gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2","language_code":"de"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}}]}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}}}},"delete":{"operationId":"deleteFlow","summary":"deleteFlow","description":"Update automation flow by id","tags":["flows"],"parameters":[{"name":"flow_id","in":"path","required":true,"description":"Automation Workflow ID","schema":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"}}],"responses":{"200":{"description":"The deleted automation flow","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"triggers":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frontend_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"99"}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["journey_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","format":"uuid"}},"required":["source_id"]}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity_operation"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"210738fe-e1e6-446e-aaef-cce462d7d813"},"schema":{"type":"string","example":"submission"},"operations":{"type":"array","items":{"type":"string","enum":["createEntity","updateEntity","deleteEntity"]}}}}},"required":["type","configuration"]}]}},"trigger_conditions":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}}},"entity_schema":{"description":"The entity schema","type":"string","example":"submission"},"actions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"mode":{"type":"string","enum":["copy_if_exists","append_if_exists"]},"source":{"type":"string"},"value_json":{"type":"string"}},"required":["target","mode","source"]}}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"copy_if_exists","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"outputs":{"type":"object","properties":{"workflow":{"type":"object","additionalProperties":true}}},"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"outputs":{"type":"object","additionalProperties":true},"config":{"type":"object","properties":{"template_id":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Document Generation","type":"document-generation","config":{"template_id":{"type":"string","example":"112b08ba-789c-42f2-9940-43b302f641e8\\""}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}}}}],"example":{"id":"25jga0-gkasl26-0asg-908sgaj2","name":"Send Email","type":"send-email","config":{"email_template_id":"gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2","language_code":"de"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}}]}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}}}}},"/v1/automation/executions":{"get":{"operationId":"getExecutions","summary":"getExecutions","description":"List automation executions","parameters":[{"name":"entity_id","in":"query","schema":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"}},{"name":"size","in":"query","description":"Pagination: max number of results to return","schema":{"type":"integer","default":25}},{"name":"from","in":"query","description":"Pagination: starting for results","schema":{"type":"integer","default":0}}],"tags":["executions"],"responses":{"200":{"description":"List of automation executions","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"9baf184f-bc81-4128-bca3-d974c90a12c4"},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"],"example":"success"},"entity_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"org_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"flow_id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"current_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"actions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"mode":{"type":"string","enum":["copy_if_exists","append_if_exists"]},"source":{"type":"string"},"value_json":{"type":"string"}},"required":["target","mode","source"]}}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"copy_if_exists","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"outputs":{"type":"object","properties":{"workflow":{"type":"object","additionalProperties":true}}},"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"outputs":{"type":"object","additionalProperties":true},"config":{"type":"object","properties":{"template_id":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Document Generation","type":"document-generation","config":{"template_id":{"type":"string","example":"112b08ba-789c-42f2-9940-43b302f641e8\\""}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}}}}],"example":{"id":"25jga0-gkasl26-0asg-908sgaj2","name":"Send Email","type":"send-email","config":{"email_template_id":"gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2","language_code":"de"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}}]}}},"required":["id","status","entity_id","org_id","flow_id","actions"]}}}}}}},"post":{"operationId":"startExecution","summary":"startExecution","description":"Start new automation execution","requestBody":{"description":"Execution parameters","content":{"application/json":{"schema":{"type":"object","properties":{"entity_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"flow_id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"}}}}}},"tags":["executions"],"responses":{"201":{"description":"The created execution","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"9baf184f-bc81-4128-bca3-d974c90a12c4"},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"],"example":"success"},"entity_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"org_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"flow_id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"current_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"actions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"mode":{"type":"string","enum":["copy_if_exists","append_if_exists"]},"source":{"type":"string"},"value_json":{"type":"string"}},"required":["target","mode","source"]}}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"copy_if_exists","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"outputs":{"type":"object","properties":{"workflow":{"type":"object","additionalProperties":true}}},"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"outputs":{"type":"object","additionalProperties":true},"config":{"type":"object","properties":{"template_id":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Document Generation","type":"document-generation","config":{"template_id":{"type":"string","example":"112b08ba-789c-42f2-9940-43b302f641e8\\""}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}}}}],"example":{"id":"25jga0-gkasl26-0asg-908sgaj2","name":"Send Email","type":"send-email","config":{"email_template_id":"gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2","language_code":"de"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}}]}}},"required":["id","status","entity_id","org_id","flow_id","actions"]}}}}}}},"/v1/automation/executions/{execution_id}":{"get":{"operationId":"getExecution","summary":"getExecution","description":"Get automation execution","parameters":[{"name":"execution_id","in":"path","schema":{"type":"string","example":"9baf184f-bc81-4128-bca3-d974c90a12c4"},"required":true}],"tags":["executions"],"responses":{"200":{"description":"The returned execution","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"9baf184f-bc81-4128-bca3-d974c90a12c4"},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"],"example":"success"},"entity_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"org_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"flow_id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"current_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"actions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"mode":{"type":"string","enum":["copy_if_exists","append_if_exists"]},"source":{"type":"string"},"value_json":{"type":"string"}},"required":["target","mode","source"]}}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"copy_if_exists","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"outputs":{"type":"object","properties":{"workflow":{"type":"object","additionalProperties":true}}},"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"outputs":{"type":"object","additionalProperties":true},"config":{"type":"object","properties":{"template_id":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Document Generation","type":"document-generation","config":{"template_id":{"type":"string","example":"112b08ba-789c-42f2-9940-43b302f641e8\\""}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}}}}],"example":{"id":"25jga0-gkasl26-0asg-908sgaj2","name":"Send Email","type":"send-email","config":{"email_template_id":"gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2","language_code":"de"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}}]}}},"required":["id","status","entity_id","org_id","flow_id","actions"]}}}}}},"delete":{"operationId":"cancelExecution","summary":"cancelExecution","description":"Cancel automation execution","parameters":[{"name":"execution_id","in":"path","schema":{"type":"string","example":"9baf184f-bc81-4128-bca3-d974c90a12c4"},"required":true}],"tags":["executions"],"responses":{"200":{"description":"The cancelled execution","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"9baf184f-bc81-4128-bca3-d974c90a12c4"},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"],"example":"success"},"entity_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"org_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"flow_id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"current_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"actions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"mode":{"type":"string","enum":["copy_if_exists","append_if_exists"]},"source":{"type":"string"},"value_json":{"type":"string"}},"required":["target","mode","source"]}}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"copy_if_exists","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"outputs":{"type":"object","properties":{"workflow":{"type":"object","additionalProperties":true}}},"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"outputs":{"type":"object","additionalProperties":true},"config":{"type":"object","properties":{"template_id":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Document Generation","type":"document-generation","config":{"template_id":{"type":"string","example":"112b08ba-789c-42f2-9940-43b302f641e8\\""}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}}}}],"example":{"id":"25jga0-gkasl26-0asg-908sgaj2","name":"Send Email","type":"send-email","config":{"email_template_id":"gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2","language_code":"de"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}}]}}},"required":["id","status","entity_id","org_id","flow_id","actions"]}}}}}}}},"components":{"securitySchemes":{"EpilotAuth":{"type":"http","scheme":"bearer","description":"Epilot Bearer Token"},"AsOrganization":{"type":"apiKey","in":"header","name":"x-ivy-org-id","description":"Set organization id when using internal auth"}},"schemas":{"AutomationFlowId":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"AutomationActionId":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"AutomationFlow":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"triggers":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frontend_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"99"}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["journey_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","format":"uuid"}},"required":["source_id"]}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity_operation"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"210738fe-e1e6-446e-aaef-cce462d7d813"},"schema":{"type":"string","example":"submission"},"operations":{"type":"array","items":{"type":"string","enum":["createEntity","updateEntity","deleteEntity"]}}}}},"required":["type","configuration"]}]}},"trigger_conditions":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}}},"entity_schema":{"description":"The entity schema","type":"string","example":"submission"},"actions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"mode":{"type":"string","enum":["copy_if_exists","append_if_exists"]},"source":{"type":"string"},"value_json":{"type":"string"}},"required":["target","mode","source"]}}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"copy_if_exists","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"outputs":{"type":"object","properties":{"workflow":{"type":"object","additionalProperties":true}}},"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"outputs":{"type":"object","additionalProperties":true},"config":{"type":"object","properties":{"template_id":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Document Generation","type":"document-generation","config":{"template_id":{"type":"string","example":"112b08ba-789c-42f2-9940-43b302f641e8\\""}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}}}}],"example":{"id":"25jga0-gkasl26-0asg-908sgaj2","name":"Send Email","type":"send-email","config":{"email_template_id":"gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2","language_code":"de"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}}]}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"AnyAction":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"mode":{"type":"string","enum":["copy_if_exists","append_if_exists"]},"source":{"type":"string"},"value_json":{"type":"string"}},"required":["target","mode","source"]}}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"copy_if_exists","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"outputs":{"type":"object","properties":{"workflow":{"type":"object","additionalProperties":true}}},"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"outputs":{"type":"object","additionalProperties":true},"config":{"type":"object","properties":{"template_id":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Document Generation","type":"document-generation","config":{"template_id":{"type":"string","example":"112b08ba-789c-42f2-9940-43b302f641e8\\""}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}}}}],"example":{"id":"25jga0-gkasl26-0asg-908sgaj2","name":"Send Email","type":"send-email","config":{"email_template_id":"gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2","language_code":"de"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}}]},"AutomationAction":{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},"MapEntityAction":{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"mode":{"type":"string","enum":["copy_if_exists","append_if_exists"]},"source":{"type":"string"},"value_json":{"type":"string"}},"required":["target","mode","source"]}}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"copy_if_exists","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}},"MapEntityActionConfig":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"mode":{"type":"string","enum":["copy_if_exists","append_if_exists"]},"source":{"type":"string"},"value_json":{"type":"string"}},"required":["target","mode","source"]}}}},"MappingAttribute":{"type":"object","properties":{"target":{"type":"string"},"mode":{"type":"string","enum":["copy_if_exists","append_if_exists"]},"source":{"type":"string"},"value_json":{"type":"string"}},"required":["target","mode","source"]},"SendEmailAction":{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}}}}],"example":{"id":"25jga0-gkasl26-0asg-908sgaj2","name":"Send Email","type":"send-email","config":{"email_template_id":"gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2","language_code":"de"}}},"SendEmailActionConfig":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}},"CreateDocumentAction":{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"outputs":{"type":"object","additionalProperties":true},"config":{"type":"object","properties":{"template_id":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Document Generation","type":"document-generation","config":{"template_id":{"type":"string","example":"112b08ba-789c-42f2-9940-43b302f641e8\\""}}}},"CreateDocumentConfig":{"type":"object","properties":{"template_id":{"type":"string"}}},"TriggerWorkflowAction":{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"outputs":{"type":"object","properties":{"workflow":{"type":"object","additionalProperties":true}}},"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},"TriggerWorkflowConfig":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}}},"TriggerWorkflowCondition":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}},"AssignUsersToStep":{"type":"object","properties":{"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]},"TriggerWebhookAction":{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},"TriggerWebhookActionConfig":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}},"AutomationExecutionId":{"type":"string","example":"9baf184f-bc81-4128-bca3-d974c90a12c4"},"AutomationExecution":{"type":"object","properties":{"id":{"type":"string","example":"9baf184f-bc81-4128-bca3-d974c90a12c4"},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"],"example":"success"},"entity_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"org_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"flow_id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"current_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"actions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"mode":{"type":"string","enum":["copy_if_exists","append_if_exists"]},"source":{"type":"string"},"value_json":{"type":"string"}},"required":["target","mode","source"]}}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"copy_if_exists","source":"billing_contact.email"},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"{{billing_contact.street_name}}\\",\\n \\"street_number\\": \\"{{billing_contact.street_number}}\\",\\n \\"city\\": \\"{{billing_contact.city}}\\",\\n \\"postal_code\\": \\"{{billing_contact.postal_code}}\\",\\n \\"country\\": \\"{{billing_contact.country}}\\",\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"{{delivery_contact.street_name}}\\",\\n \\"street_number\\": \\"{{delivery_contact.street_number}}\\",\\n \\"city\\": \\"{{delivery_contact.city}}\\",\\n \\"postal_code\\": \\"{{delivery_contact.postal_code}}\\",\\n \\"country\\": \\"{{delivery_contact.country}}\\",\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"outputs":{"type":"object","properties":{"workflow":{"type":"object","additionalProperties":true}}},"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}},"outputs":{"type":"object","additionalProperties":true}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"outputs":{"type":"object","additionalProperties":true},"config":{"type":"object","properties":{"template_id":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Document Generation","type":"document-generation","config":{"template_id":{"type":"string","example":"112b08ba-789c-42f2-9940-43b302f641e8\\""}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}},{"type":"object","properties":{"config":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}}}}],"example":{"id":"25jga0-gkasl26-0asg-908sgaj2","name":"Send Email","type":"send-email","config":{"email_template_id":"gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2","language_code":"de"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"}}}]}}},"required":["id","status","entity_id","org_id","flow_id","actions"]},"ExecutionStatus":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"StartExecutionRequest":{"type":"object","properties":{"entity_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"flow_id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"}}},"EntityId":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"OrganizationId":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"JourneySubmitTrigger":{"type":"object","properties":{"type":{"type":"string","enum":["journey_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","format":"uuid"}},"required":["source_id"]}},"required":["type","configuration"]},"FrontendSubmitTrigger":{"type":"object","properties":{"type":{"type":"string","enum":["frontend_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"99"}}}},"required":["type","configuration"]},"EntityOperationTrigger":{"type":"object","properties":{"type":{"type":"string","enum":["entity_operation"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"210738fe-e1e6-446e-aaef-cce462d7d813"},"schema":{"type":"string","example":"submission"},"operations":{"type":"array","items":{"type":"string","enum":["createEntity","updateEntity","deleteEntity"]}}}}},"required":["type","configuration"]},"TriggerCondition":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},"Comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]}}}}')}},t={};return function i(r){if(t[r])return t[r].exports;var s=t[r]={exports:{}};return e[r].call(s.exports,s,s.exports,i),s.exports}(914)})());
package/dist/openapi.d.ts CHANGED
@@ -9,7 +9,7 @@ import {
9
9
 
10
10
  declare namespace Components {
11
11
  namespace Schemas {
12
- export type AnyAction = MapEntityAction | TriggerWorkflowAction | TriggerWebhookAction | AutomationAction;
12
+ export type AnyAction = MapEntityAction | TriggerWorkflowAction | TriggerWebhookAction | CreateDocumentAction | SendEmailAction | AutomationAction;
13
13
  /**
14
14
  * example:
15
15
  * [
@@ -98,6 +98,35 @@ declare namespace Components {
98
98
  */
99
99
  export type AutomationFlowId = string;
100
100
  export type Comparison = "equals" | "any_of" | "not_empty" | "is_empty";
101
+ /**
102
+ * example:
103
+ * {
104
+ * "id": "08g988-ojt2jtaga-292h-8978gsaga",
105
+ * "name": "Document Generation",
106
+ * "type": "document-generation",
107
+ * "config": {
108
+ * "template_id": {
109
+ * "type": "string",
110
+ * "example": "112b08ba-789c-42f2-9940-43b302f641e8\""
111
+ * }
112
+ * }
113
+ * }
114
+ */
115
+ export interface CreateDocumentAction {
116
+ id?: AutomationActionId;
117
+ name?: string;
118
+ type?: string;
119
+ config?: CreateDocumentConfig;
120
+ status?: ExecutionStatus;
121
+ started_at?: string;
122
+ updated_at?: string;
123
+ outputs?: {
124
+ [name: string]: any;
125
+ };
126
+ }
127
+ export interface CreateDocumentConfig {
128
+ template_id?: string;
129
+ }
101
130
  /**
102
131
  * example:
103
132
  * e3d3ebac-baab-4395-abf4-50b5bf1f8b74
@@ -207,6 +236,31 @@ declare namespace Components {
207
236
  * e3d3ebac-baab-4395-abf4-50b5bf1f8b74
208
237
  */
209
238
  export type OrganizationId = string;
239
+ /**
240
+ * example:
241
+ * {
242
+ * "id": "25jga0-gkasl26-0asg-908sgaj2",
243
+ * "name": "Send Email",
244
+ * "type": "send-email",
245
+ * "config": {
246
+ * "email_template_id": "gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2",
247
+ * "language_code": "de"
248
+ * }
249
+ * }
250
+ */
251
+ export interface SendEmailAction {
252
+ id?: AutomationActionId;
253
+ name?: string;
254
+ type?: string;
255
+ config?: SendEmailActionConfig;
256
+ status?: ExecutionStatus;
257
+ started_at?: string;
258
+ updated_at?: string;
259
+ }
260
+ export interface SendEmailActionConfig {
261
+ email_template_id?: string;
262
+ language_code?: "de" | "en";
263
+ }
210
264
  export interface StartExecutionRequest {
211
265
  entity_id?: EntityId;
212
266
  flow_id?: AutomationFlowId;
@@ -318,7 +372,7 @@ declare namespace Components {
318
372
  schema: string;
319
373
  }
320
374
  export interface TriggerWorkflowConfig {
321
- target_workflow: string;
375
+ target_workflow?: string;
322
376
  conditions?: TriggerWorkflowCondition[];
323
377
  assign_steps?: AssignUsersToStep[];
324
378
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/automation-client",
3
- "version": "0.7.2",
3
+ "version": "0.7.4",
4
4
  "description": "API Client for epilot automation API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/openapi.d.ts CHANGED
@@ -9,7 +9,7 @@ import {
9
9
 
10
10
  declare namespace Components {
11
11
  namespace Schemas {
12
- export type AnyAction = MapEntityAction | TriggerWorkflowAction | TriggerWebhookAction | AutomationAction;
12
+ export type AnyAction = MapEntityAction | TriggerWorkflowAction | TriggerWebhookAction | CreateDocumentAction | SendEmailAction | AutomationAction;
13
13
  /**
14
14
  * example:
15
15
  * [
@@ -98,6 +98,35 @@ declare namespace Components {
98
98
  */
99
99
  export type AutomationFlowId = string;
100
100
  export type Comparison = "equals" | "any_of" | "not_empty" | "is_empty";
101
+ /**
102
+ * example:
103
+ * {
104
+ * "id": "08g988-ojt2jtaga-292h-8978gsaga",
105
+ * "name": "Document Generation",
106
+ * "type": "document-generation",
107
+ * "config": {
108
+ * "template_id": {
109
+ * "type": "string",
110
+ * "example": "112b08ba-789c-42f2-9940-43b302f641e8\""
111
+ * }
112
+ * }
113
+ * }
114
+ */
115
+ export interface CreateDocumentAction {
116
+ id?: AutomationActionId;
117
+ name?: string;
118
+ type?: string;
119
+ config?: CreateDocumentConfig;
120
+ status?: ExecutionStatus;
121
+ started_at?: string;
122
+ updated_at?: string;
123
+ outputs?: {
124
+ [name: string]: any;
125
+ };
126
+ }
127
+ export interface CreateDocumentConfig {
128
+ template_id?: string;
129
+ }
101
130
  /**
102
131
  * example:
103
132
  * e3d3ebac-baab-4395-abf4-50b5bf1f8b74
@@ -207,6 +236,31 @@ declare namespace Components {
207
236
  * e3d3ebac-baab-4395-abf4-50b5bf1f8b74
208
237
  */
209
238
  export type OrganizationId = string;
239
+ /**
240
+ * example:
241
+ * {
242
+ * "id": "25jga0-gkasl26-0asg-908sgaj2",
243
+ * "name": "Send Email",
244
+ * "type": "send-email",
245
+ * "config": {
246
+ * "email_template_id": "gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2",
247
+ * "language_code": "de"
248
+ * }
249
+ * }
250
+ */
251
+ export interface SendEmailAction {
252
+ id?: AutomationActionId;
253
+ name?: string;
254
+ type?: string;
255
+ config?: SendEmailActionConfig;
256
+ status?: ExecutionStatus;
257
+ started_at?: string;
258
+ updated_at?: string;
259
+ }
260
+ export interface SendEmailActionConfig {
261
+ email_template_id?: string;
262
+ language_code?: "de" | "en";
263
+ }
210
264
  export interface StartExecutionRequest {
211
265
  entity_id?: EntityId;
212
266
  flow_id?: AutomationFlowId;
@@ -318,7 +372,7 @@ declare namespace Components {
318
372
  schema: string;
319
373
  }
320
374
  export interface TriggerWorkflowConfig {
321
- target_workflow: string;
375
+ target_workflow?: string;
322
376
  conditions?: TriggerWorkflowCondition[];
323
377
  assign_steps?: AssignUsersToStep[];
324
378
  }