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": "e07b5039-0de3-4e99-9803-5112c376ca4a",
"steps": [
{
"name": "create a new client",
"type": "client.create",
"uuid": "cd4d1a6a-6688-45fa-9507-19524760dec9",
"updated": "2025-01-17T11:18:32+00:00",
"created_at": "2025-01-17T11:18:32+00:00",
"configuration": {
"params": {
"account_uuid": {
"type": "ref",
"value": "trigger.account.uuid"
}
}
},
"condition_state": false,
"parent_step_uuid": "93f2b48a-a5ed-43dc-979b-b99185c51eb8"
}
],
"account": {
"firm": "App\\Http\\Resources\\FirmResource",
"name": "Gareth Thompson",
"role": "client",
"tags": "App\\Http\\Resources\\TagResource",
"type": "client",
"uuid": "c757ff87-e91c-4f5a-b0e6-28e826170ff8",
"email": "gareth@codepotato.co.uk",
"groups": "App\\Http\\Resources\\GroupResource",
"owners": "App\\Http\\Resources\\AccountResource",
"last_name": "Thompson",
"created_at": "2025-01-17T11:18:32+00:00",
"first_name": "Gareth",
"updated_at": "2025-01-17T11:18:32+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": "2025-01-17T11:18:32+00:00",
"has_joint_account": true,
"current_time_entry": "App\\Http\\Resources\\TimeEntryResource",
"first_contact_date": "2025-01-17T11:18:32+00:00",
"external_references": "App\\Http\\Resources\\ExternalReferenceResource",
"assigned_paraplanner": "App\\Http\\Resources\\AccountResource",
"previous_review_date": "2025-01-17T11:18:32+00:00",
"primary_phone_number": "App\\Http\\Resources\\ContactDetailResource",
"assigned_administrator": "App\\Http\\Resources\\AccountResource",
"anniversary_review_date": "2025-01-17T11:18:32+00:00"
},
"trigger": "client.create",
"is_active": false,
"conditions": [],
"created_at": "2025-01-17T11:18:32+00:00",
"updated_at": "2025-01-17T11:18:32+00:00",
"steps_count": "1",
"configuration": [],
"webhook_targets": [
{
"url": "https://api.plannrcrm.com/api/v1/webhooks/01605357-9fba-4cab-b4f0-141476dfa4ea",
"uuid": "5e4e3b47-3d7b-4e5c-be68-2dd56d57b2c2",
"created_at": "2025-01-17T11:18:32+00:00",
"updated_at": "2025-01-17T11:18:32+00:00"
}
]
}