Create an Automation Blueprint

POST /api/v1/automation-blueprints

Headers

application/json

Body Required

  • name string 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

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • uuid string

      The UUID of the resource.

    • The timestamp of when the resource was created.

    • The timestamp of when the resource was updated.

    • name string

      Name of the Automation Blueprint

    • trigger string

      What type of event will trigger this AutomationBlueprint

    • is_active boolean

      Is the automation currently active? If false will not create new execution instances

    • account object

      Account that made this automation blueprints

    • Conditions for the automation blueprint

    • Extra configuration options for the trigger of this blueprint

    • steps array[object]

      All blueprint steps attached to this blueprint

    • Amount of blueprints steps on this automation blueprint

    • webhook_targets array[object]

      List of webhook target endpoints that can be used to trigger this automation

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": "a3c51e81-da27-41d3-95ed-bfe518ff9b78",
  "steps": [
    {
      "name": "create a new client",
      "type": "client.create",
      "uuid": "703552fb-3876-47d1-9684-ff81c7a3934f",
      "updated": "2024-10-16T11:10:16+01:00",
      "created_at": "2024-10-16T11:10:16+01:00",
      "configuration": {
        "params": {
          "account_uuid": {
            "type": "ref",
            "value": "trigger.account.uuid"
          }
        }
      },
      "condition_state": false,
      "parent_step_uuid": "0f6e3b72-99a9-4e89-a691-9feaa3c2f0e6"
    }
  ],
  "account": {
    "firm": "App\\Http\\Resources\\FirmResource",
    "name": "Gareth Thompson",
    "role": "client",
    "tags": "App\\Http\\Resources\\TagResource",
    "type": "client",
    "uuid": "02625fd7-c648-4a51-a1be-b42c9834d30c",
    "email": "gareth@codepotato.co.uk",
    "groups": "App\\Http\\Resources\\GroupResource",
    "owners": "App\\Http\\Resources\\AccountResource",
    "last_name": "Thompson",
    "created_at": "2024-10-16T11:10:16+01:00",
    "first_name": "Gareth",
    "updated_at": "2024-10-16T11:10:16+01: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-10-16T11:10:16+01:00",
    "has_joint_account": true,
    "current_time_entry": "App\\Http\\Resources\\TimeEntryResource",
    "first_contact_date": "2024-10-16T11:10:16+01:00",
    "external_references": "App\\Http\\Resources\\ExternalReferenceResource",
    "assigned_paraplanner": "App\\Http\\Resources\\AccountResource",
    "previous_review_date": "2024-10-16T11:10:16+01:00",
    "primary_phone_number": "App\\Http\\Resources\\ContactDetailResource",
    "assigned_administrator": "App\\Http\\Resources\\AccountResource",
    "anniversary_review_date": "2024-10-16T11:10:16+01:00"
  },
  "trigger": "client.create",
  "is_active": false,
  "conditions": [],
  "created_at": "2024-10-16T11:10:16+01:00",
  "updated_at": "2024-10-16T11:10:16+01:00",
  "steps_count": "1",
  "configuration": [],
  "webhook_targets": [
    {
      "url": "https://api.plannrcrm.com/api/v1/webhooks/01605357-9fba-4cab-b4f0-141476dfa4ea",
      "uuid": "8f4be2c0-1abb-4484-be09-e43e3070278e",
      "created_at": "2024-10-16T11:10:16+01:00",
      "updated_at": "2024-10-16T11:10:16+01:00"
    }
  ]
}