Create an Automation Blueprint
Headers
-
Content-Type string
-
Accept string
Body Required
-
Name of the automation
-
trigger string
What triggers this automation, leave null if activation is manual
-
is_active boolean
Is this automation currently active, defaults to false
-
conditions array[string]
List of conditions to evaluate on the trigger before running automation, operator types can be on ofequals, not_equal_to, more_than, less_than, less_than_or_equal_to and more_than_or_equal_to
-
configuration array[string]
Extra configuration options for the trigger of this blueprint
POST /api/v1/automation-blueprints
curl \
-X POST https://api.plannrcrm.com/api/v1/automation-blueprints \
-H "Authorization: Bearer {OAUTH_ACCESS_TOKEN or PERSONAL_ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"name":"Add a new client to system on calendly webhook","trigger":"webhook","is_active":false,"conditions":[{"field":"client.is_prospect","value":true,"operator":"equals"}],"configuration":["string"]}'
Request examples
# Headers
Authorization: Bearer {OAUTH_ACCESS_TOKEN or PERSONAL_ACCESS_TOKEN}
Content-Type: application/json
Accept: application/json
# Payload
{
"name": "Add a new client to system on calendly webhook",
"trigger": "webhook",
"is_active": false,
"conditions": [
{
"field": "client.is_prospect",
"value": true,
"operator": "equals"
}
],
"configuration": [
"string"
]
}
Response examples (200)
{
"name": "Add new client on webhook",
"uuid": "f4b33bba-28c8-4198-8ff3-b8d8aff97426",
"steps": [
{
"name": "create a new client",
"type": "client.create",
"uuid": "3c616185-4ba1-4285-9ede-e0ed613d0bf9",
"updated": "2024-11-20T13:24:03+00:00",
"created_at": "2024-11-20T13:24:03+00:00",
"configuration": {
"params": {
"account_uuid": {
"type": "ref",
"value": "trigger.account.uuid"
}
}
},
"condition_state": false,
"parent_step_uuid": "4d6a1244-787a-4dae-adcb-d7de29cc2942"
}
],
"account": {
"firm": "App\\Http\\Resources\\FirmResource",
"name": "Gareth Thompson",
"role": "client",
"tags": "App\\Http\\Resources\\TagResource",
"type": "client",
"uuid": "f549e690-1374-4f5b-b34b-67a3d331ee9d",
"email": "gareth@codepotato.co.uk",
"groups": "App\\Http\\Resources\\GroupResource",
"owners": "App\\Http\\Resources\\AccountResource",
"last_name": "Thompson",
"created_at": "2024-11-20T13:24:03+00:00",
"first_name": "Gareth",
"updated_at": "2024-11-20T13:24:03+00:00",
"with_login": true,
"custom_fields": "App\\Http\\Resources\\CustomFieldValueResource",
"introduced_by": "App\\Http\\Resources\\AccountResource",
"primary_email": "App\\Http\\Resources\\ContactDetailResource",
"can_be_deleted": "false",
"assigned_adviser": "App\\Http\\Resources\\AccountResource",
"next_review_date": "2024-11-20T13:24:03+00:00",
"has_joint_account": true,
"current_time_entry": "App\\Http\\Resources\\TimeEntryResource",
"first_contact_date": "2024-11-20T13:24:03+00:00",
"external_references": "App\\Http\\Resources\\ExternalReferenceResource",
"assigned_paraplanner": "App\\Http\\Resources\\AccountResource",
"previous_review_date": "2024-11-20T13:24:03+00:00",
"primary_phone_number": "App\\Http\\Resources\\ContactDetailResource",
"assigned_administrator": "App\\Http\\Resources\\AccountResource",
"anniversary_review_date": "2024-11-20T13:24:03+00:00"
},
"trigger": "client.create",
"is_active": false,
"conditions": [],
"created_at": "2024-11-20T13:24:03+00:00",
"updated_at": "2024-11-20T13:24:03+00:00",
"steps_count": "1",
"configuration": [],
"webhook_targets": [
{
"url": "https://api.plannrcrm.com/api/v1/webhooks/01605357-9fba-4cab-b4f0-141476dfa4ea",
"uuid": "bd7b2642-9052-4d47-b3d0-179e4fafa6e8",
"created_at": "2024-11-20T13:24:03+00:00",
"updated_at": "2024-11-20T13:24:03+00:00"
}
]
}