@epilot/automation-client 0.7.1 → 0.7.3

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 a=i(r(279));t.default=a.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}}},{"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}}},{"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}}},{"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}}}]}},"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}}},{"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}}},{"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}}},{"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}}}]}},"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}}},{"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}}},{"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}}},{"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}}}]}},"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}}},{"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}}},{"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}}},{"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}}}]}},"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}}},{"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}}},{"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}}},{"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}}}]}},"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}}},{"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}}},{"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}}},{"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}}}]}},"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}}},{"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}}},{"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}}},{"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}}}]}},"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":{"allOf":[{"type":"object","properties":{"status":{"type":"string","enum":["pending","in_progress","success","failed"]},"started_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"outputs":{"type":"object","additionalProperties":true,"example":{"affected_entities":"cbbf0e83-0f37-4a0c-9801-93877ec0b2c2"}},"inputs":{"type":"object","additionalProperties":true,"example":{"email":"$.contact.email","name":"$.contact.name","template_id":"6a5b1249-4093-4724-b25a-ae985f7877d6"}}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true}}}]}}}}}}}}}},"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":{"allOf":[{"type":"object","properties":{"status":{"type":"string","enum":["pending","in_progress","success","failed"]},"started_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"outputs":{"type":"object","additionalProperties":true,"example":{"affected_entities":"cbbf0e83-0f37-4a0c-9801-93877ec0b2c2"}},"inputs":{"type":"object","additionalProperties":true,"example":{"email":"$.contact.email","name":"$.contact.name","template_id":"6a5b1249-4093-4724-b25a-ae985f7877d6"}}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true}}}]}}}}}}}}}},"/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":{"allOf":[{"type":"object","properties":{"status":{"type":"string","enum":["pending","in_progress","success","failed"]},"started_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"outputs":{"type":"object","additionalProperties":true,"example":{"affected_entities":"cbbf0e83-0f37-4a0c-9801-93877ec0b2c2"}},"inputs":{"type":"object","additionalProperties":true,"example":{"email":"$.contact.email","name":"$.contact.name","template_id":"6a5b1249-4093-4724-b25a-ae985f7877d6"}}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true}}}]}}}}}}}}},"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":{"allOf":[{"type":"object","properties":{"status":{"type":"string","enum":["pending","in_progress","success","failed"]},"started_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"outputs":{"type":"object","additionalProperties":true,"example":{"affected_entities":"cbbf0e83-0f37-4a0c-9801-93877ec0b2c2"}},"inputs":{"type":"object","additionalProperties":true,"example":{"email":"$.contact.email","name":"$.contact.name","template_id":"6a5b1249-4093-4724-b25a-ae985f7877d6"}}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true}}}]}}}}}}}}}}},"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}}},{"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}}},{"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}}},{"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}}}]}},"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}}},{"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}}},{"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}}},{"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}}}]},"AutomationAction":{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true}}},"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}}},{"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}}},{"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}}},{"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":{"allOf":[{"type":"object","properties":{"status":{"type":"string","enum":["pending","in_progress","success","failed"]},"started_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"outputs":{"type":"object","additionalProperties":true,"example":{"affected_entities":"cbbf0e83-0f37-4a0c-9801-93877ec0b2c2"}},"inputs":{"type":"object","additionalProperties":true,"example":{"email":"$.contact.email","name":"$.contact.name","template_id":"6a5b1249-4093-4724-b25a-ae985f7877d6"}}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true}}}]}}}},"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 a=t[i]={exports:{}};return e[i].call(a.exports,a,a.exports,r),a.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_document":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Document Generation","type":"document-generation","config":{"template_document":{"type":"string","example":"templates/my-template.pdf"}}}},{"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"]}}}}}]},{"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_document":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Document Generation","type":"document-generation","config":{"template_document":{"type":"string","example":"templates/my-template.pdf"}}}},{"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"]}}}}}]},{"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_document":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Document Generation","type":"document-generation","config":{"template_document":{"type":"string","example":"templates/my-template.pdf"}}}},{"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"]}}}}}]},{"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_document":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Document Generation","type":"document-generation","config":{"template_document":{"type":"string","example":"templates/my-template.pdf"}}}},{"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"]}}}}}]},{"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_document":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Document Generation","type":"document-generation","config":{"template_document":{"type":"string","example":"templates/my-template.pdf"}}}},{"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"]}}}}}]},{"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_document":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Document Generation","type":"document-generation","config":{"template_document":{"type":"string","example":"templates/my-template.pdf"}}}},{"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"]}}}}}]},{"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_document":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Document Generation","type":"document-generation","config":{"template_document":{"type":"string","example":"templates/my-template.pdf"}}}},{"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"]}}}}}]},{"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_document":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Document Generation","type":"document-generation","config":{"template_document":{"type":"string","example":"templates/my-template.pdf"}}}},{"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"]}}}}}]},{"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_document":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Document Generation","type":"document-generation","config":{"template_document":{"type":"string","example":"templates/my-template.pdf"}}}},{"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"]}}}}}]},{"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_document":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Document Generation","type":"document-generation","config":{"template_document":{"type":"string","example":"templates/my-template.pdf"}}}},{"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"]}}}}}]},{"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_document":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Document Generation","type":"document-generation","config":{"template_document":{"type":"string","example":"templates/my-template.pdf"}}}},{"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"]}}}}}]},{"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_document":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Document Generation","type":"document-generation","config":{"template_document":{"type":"string","example":"templates/my-template.pdf"}}}},{"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"]}}}}}]},{"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_document":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Document Generation","type":"document-generation","config":{"template_document":{"type":"string","example":"templates/my-template.pdf"}}}},{"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"]}}}}}]},{"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"]}}}}}]},"SendEmailActionConfig":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}},"DocumentGenerationAction":{"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_document":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Document Generation","type":"document-generation","config":{"template_document":{"type":"string","example":"templates/my-template.pdf"}}}},"DocumentGenerationConfig":{"type":"object","properties":{"template_document":{"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_document":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Document Generation","type":"document-generation","config":{"template_document":{"type":"string","example":"templates/my-template.pdf"}}}},{"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"]}}}}}]},{"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 | DocumentGenerationAction | SendEmailAction | AutomationAction;
13
13
  /**
14
14
  * example:
15
15
  * [
@@ -39,6 +39,9 @@ declare namespace Components {
39
39
  config?: {
40
40
  [name: string]: any;
41
41
  };
42
+ status?: ExecutionStatus;
43
+ started_at?: string;
44
+ updated_at?: string;
42
45
  }
43
46
  /**
44
47
  * example:
@@ -46,15 +49,15 @@ declare namespace Components {
46
49
  */
47
50
  export type AutomationActionId = string;
48
51
  export interface AutomationExecution {
49
- id?: AutomationExecutionId;
52
+ id: AutomationExecutionId;
50
53
  /**
51
54
  * example:
52
55
  * success
53
56
  */
54
- status?: "pending" | "in_progress" | "success" | "failed" | "cancelled";
55
- entity_id?: EntityId;
56
- org_id?: OrganizationId;
57
- flow_id?: AutomationFlowId;
57
+ status: ExecutionStatus;
58
+ entity_id: EntityId;
59
+ org_id: OrganizationId;
60
+ flow_id: AutomationFlowId;
58
61
  /**
59
62
  * example:
60
63
  * Handle contact form
@@ -63,37 +66,7 @@ declare namespace Components {
63
66
  created_at?: string; // date-time
64
67
  updated_at?: string; // date-time
65
68
  current_action_id?: AutomationActionId;
66
- actions?: {
67
- status?: "pending" | "in_progress" | "success" | "failed";
68
- started_at?: string; // date-time
69
- updated_at?: string; // date-time
70
- /**
71
- * example:
72
- * {
73
- * "affected_entities": "cbbf0e83-0f37-4a0c-9801-93877ec0b2c2"
74
- * }
75
- */
76
- outputs?: {
77
- [name: string]: any;
78
- };
79
- /**
80
- * example:
81
- * {
82
- * "email": "$.contact.email",
83
- * "name": "$.contact.name",
84
- * "template_id": "6a5b1249-4093-4724-b25a-ae985f7877d6"
85
- * }
86
- */
87
- inputs?: {
88
- [name: string]: any;
89
- };
90
- id?: AutomationActionId;
91
- name?: string;
92
- type?: string;
93
- config?: {
94
- [name: string]: any;
95
- };
96
- }[];
69
+ actions: AnyAction[];
97
70
  }
98
71
  /**
99
72
  * example:
@@ -125,6 +98,35 @@ declare namespace Components {
125
98
  */
126
99
  export type AutomationFlowId = string;
127
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_document": {
109
+ * "type": "string",
110
+ * "example": "templates/my-template.pdf"
111
+ * }
112
+ * }
113
+ * }
114
+ */
115
+ export interface DocumentGenerationAction {
116
+ id?: AutomationActionId;
117
+ name?: string;
118
+ type?: string;
119
+ config?: DocumentGenerationConfig;
120
+ status?: ExecutionStatus;
121
+ started_at?: string;
122
+ updated_at?: string;
123
+ outputs?: {
124
+ [name: string]: any;
125
+ };
126
+ }
127
+ export interface DocumentGenerationConfig {
128
+ template_document?: string;
129
+ }
128
130
  /**
129
131
  * example:
130
132
  * e3d3ebac-baab-4395-abf4-50b5bf1f8b74
@@ -146,6 +148,7 @@ declare namespace Components {
146
148
  operations?: ("createEntity" | "updateEntity" | "deleteEntity")[];
147
149
  };
148
150
  }
151
+ export type ExecutionStatus = "pending" | "in_progress" | "success" | "failed" | "cancelled";
149
152
  export interface FrontendSubmitTrigger {
150
153
  type: "frontend_submission";
151
154
  configuration: {
@@ -210,6 +213,9 @@ declare namespace Components {
210
213
  name?: string;
211
214
  type?: string;
212
215
  config?: MapEntityActionConfig;
216
+ status?: ExecutionStatus;
217
+ started_at?: string;
218
+ updated_at?: string;
213
219
  outputs?: {
214
220
  [name: string]: any;
215
221
  };
@@ -230,6 +236,19 @@ declare namespace Components {
230
236
  * e3d3ebac-baab-4395-abf4-50b5bf1f8b74
231
237
  */
232
238
  export type OrganizationId = string;
239
+ export interface SendEmailAction {
240
+ id?: AutomationActionId;
241
+ name?: string;
242
+ type?: string;
243
+ config?: SendEmailActionConfig;
244
+ status?: ExecutionStatus;
245
+ started_at?: string;
246
+ updated_at?: string;
247
+ }
248
+ export interface SendEmailActionConfig {
249
+ email_template_id?: string;
250
+ language_code?: "de" | "en";
251
+ }
233
252
  export interface StartExecutionRequest {
234
253
  entity_id?: EntityId;
235
254
  flow_id?: AutomationFlowId;
@@ -266,6 +285,9 @@ declare namespace Components {
266
285
  name?: string;
267
286
  type?: string;
268
287
  config?: TriggerWebhookActionConfig;
288
+ status?: ExecutionStatus;
289
+ started_at?: string;
290
+ updated_at?: string;
269
291
  outputs?: {
270
292
  [name: string]: any;
271
293
  };
@@ -313,6 +335,9 @@ declare namespace Components {
313
335
  name?: string;
314
336
  type?: string;
315
337
  config?: TriggerWorkflowConfig;
338
+ status?: ExecutionStatus;
339
+ started_at?: string;
340
+ updated_at?: string;
316
341
  outputs?: {
317
342
  workflow?: {
318
343
  [name: string]: any;
@@ -335,7 +360,7 @@ declare namespace Components {
335
360
  schema: string;
336
361
  }
337
362
  export interface TriggerWorkflowConfig {
338
- target_workflow: string;
363
+ target_workflow?: string;
339
364
  conditions?: TriggerWorkflowCondition[];
340
365
  assign_steps?: AssignUsersToStep[];
341
366
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/automation-client",
3
- "version": "0.7.1",
3
+ "version": "0.7.3",
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 | DocumentGenerationAction | SendEmailAction | AutomationAction;
13
13
  /**
14
14
  * example:
15
15
  * [
@@ -39,6 +39,9 @@ declare namespace Components {
39
39
  config?: {
40
40
  [name: string]: any;
41
41
  };
42
+ status?: ExecutionStatus;
43
+ started_at?: string;
44
+ updated_at?: string;
42
45
  }
43
46
  /**
44
47
  * example:
@@ -46,15 +49,15 @@ declare namespace Components {
46
49
  */
47
50
  export type AutomationActionId = string;
48
51
  export interface AutomationExecution {
49
- id?: AutomationExecutionId;
52
+ id: AutomationExecutionId;
50
53
  /**
51
54
  * example:
52
55
  * success
53
56
  */
54
- status?: "pending" | "in_progress" | "success" | "failed" | "cancelled";
55
- entity_id?: EntityId;
56
- org_id?: OrganizationId;
57
- flow_id?: AutomationFlowId;
57
+ status: ExecutionStatus;
58
+ entity_id: EntityId;
59
+ org_id: OrganizationId;
60
+ flow_id: AutomationFlowId;
58
61
  /**
59
62
  * example:
60
63
  * Handle contact form
@@ -63,37 +66,7 @@ declare namespace Components {
63
66
  created_at?: string; // date-time
64
67
  updated_at?: string; // date-time
65
68
  current_action_id?: AutomationActionId;
66
- actions?: {
67
- status?: "pending" | "in_progress" | "success" | "failed";
68
- started_at?: string; // date-time
69
- updated_at?: string; // date-time
70
- /**
71
- * example:
72
- * {
73
- * "affected_entities": "cbbf0e83-0f37-4a0c-9801-93877ec0b2c2"
74
- * }
75
- */
76
- outputs?: {
77
- [name: string]: any;
78
- };
79
- /**
80
- * example:
81
- * {
82
- * "email": "$.contact.email",
83
- * "name": "$.contact.name",
84
- * "template_id": "6a5b1249-4093-4724-b25a-ae985f7877d6"
85
- * }
86
- */
87
- inputs?: {
88
- [name: string]: any;
89
- };
90
- id?: AutomationActionId;
91
- name?: string;
92
- type?: string;
93
- config?: {
94
- [name: string]: any;
95
- };
96
- }[];
69
+ actions: AnyAction[];
97
70
  }
98
71
  /**
99
72
  * example:
@@ -125,6 +98,35 @@ declare namespace Components {
125
98
  */
126
99
  export type AutomationFlowId = string;
127
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_document": {
109
+ * "type": "string",
110
+ * "example": "templates/my-template.pdf"
111
+ * }
112
+ * }
113
+ * }
114
+ */
115
+ export interface DocumentGenerationAction {
116
+ id?: AutomationActionId;
117
+ name?: string;
118
+ type?: string;
119
+ config?: DocumentGenerationConfig;
120
+ status?: ExecutionStatus;
121
+ started_at?: string;
122
+ updated_at?: string;
123
+ outputs?: {
124
+ [name: string]: any;
125
+ };
126
+ }
127
+ export interface DocumentGenerationConfig {
128
+ template_document?: string;
129
+ }
128
130
  /**
129
131
  * example:
130
132
  * e3d3ebac-baab-4395-abf4-50b5bf1f8b74
@@ -146,6 +148,7 @@ declare namespace Components {
146
148
  operations?: ("createEntity" | "updateEntity" | "deleteEntity")[];
147
149
  };
148
150
  }
151
+ export type ExecutionStatus = "pending" | "in_progress" | "success" | "failed" | "cancelled";
149
152
  export interface FrontendSubmitTrigger {
150
153
  type: "frontend_submission";
151
154
  configuration: {
@@ -210,6 +213,9 @@ declare namespace Components {
210
213
  name?: string;
211
214
  type?: string;
212
215
  config?: MapEntityActionConfig;
216
+ status?: ExecutionStatus;
217
+ started_at?: string;
218
+ updated_at?: string;
213
219
  outputs?: {
214
220
  [name: string]: any;
215
221
  };
@@ -230,6 +236,19 @@ declare namespace Components {
230
236
  * e3d3ebac-baab-4395-abf4-50b5bf1f8b74
231
237
  */
232
238
  export type OrganizationId = string;
239
+ export interface SendEmailAction {
240
+ id?: AutomationActionId;
241
+ name?: string;
242
+ type?: string;
243
+ config?: SendEmailActionConfig;
244
+ status?: ExecutionStatus;
245
+ started_at?: string;
246
+ updated_at?: string;
247
+ }
248
+ export interface SendEmailActionConfig {
249
+ email_template_id?: string;
250
+ language_code?: "de" | "en";
251
+ }
233
252
  export interface StartExecutionRequest {
234
253
  entity_id?: EntityId;
235
254
  flow_id?: AutomationFlowId;
@@ -266,6 +285,9 @@ declare namespace Components {
266
285
  name?: string;
267
286
  type?: string;
268
287
  config?: TriggerWebhookActionConfig;
288
+ status?: ExecutionStatus;
289
+ started_at?: string;
290
+ updated_at?: string;
269
291
  outputs?: {
270
292
  [name: string]: any;
271
293
  };
@@ -313,6 +335,9 @@ declare namespace Components {
313
335
  name?: string;
314
336
  type?: string;
315
337
  config?: TriggerWorkflowConfig;
338
+ status?: ExecutionStatus;
339
+ started_at?: string;
340
+ updated_at?: string;
316
341
  outputs?: {
317
342
  workflow?: {
318
343
  [name: string]: any;
@@ -335,7 +360,7 @@ declare namespace Components {
335
360
  schema: string;
336
361
  }
337
362
  export interface TriggerWorkflowConfig {
338
- target_workflow: string;
363
+ target_workflow?: string;
339
364
  conditions?: TriggerWorkflowCondition[];
340
365
  assign_steps?: AssignUsersToStep[];
341
366
  }