# Nimble

> Work with Nimble contacts, notes, activities, deals and pipelines.

App · 20 actions. Web page: https://docs.lodol.com/docs/integrations/nimble

## Actions

### Add contact note

Add contact note in Nimble.

**Inputs**

- Contact ID (`contact_id`, text, required): Contact id.
- Note (`note`, text, required): Note.
- Note preview (`note_preview`, text): Optional short version used for previews. Defaults to the full note.

**Outputs**

- `data` (object): The response from Nimble.

**Example output**

```json
{
  "data": {
    "author_name": "example",
    "contacts": [
      {
        "avatar_url": "example",
        "contact_type": "person",
        "email": [
          "example"
        ],
        "employment": {},
        "id": "example",
        "is_viewable": true,
        "name": "example",
        "phones": {}
      }
    ],
    "created": "example",
    "id": "example",
    "note": "example",
    "note_preview": "example",
    "owner": {
      "avatar_url": "example",
      "email": "example",
      "is_active": true,
      "name": "example",
      "user_id": "example"
    },
    "owner_id": "example",
    "updated": "example"
  }
}
```

### Create contact

Create contact in Nimble.

**Inputs**

- Record type (`record_type`, text): Create a person or a company. One of: `person`, `company`. Default: `person`.
- First name (`first_name`, text): The person's first name.
- Last name (`last_name`, text): The person's last name.
- Company name (`company_name`, text): The company's name.
- Email (`email`, text): The contact's email address.
- Fields (`fields`, object): Extra contact fields from List contact metadata.

**Outputs**

- `data` (object): The response from Nimble.

**Example output**

```json
{
  "data": {
    "id": "example"
  }
}
```

### Delete contact

Delete contact in Nimble.

**Inputs**

- Contact ID (`contact_id`, text, required): id of a contact to operate on
- Deletion method (`deletion_method`, text): deletion method to use. 'regular' will return error if there are relations that avoid deletion, 'force' will delete contacts with relations (like exit sequence). One of: `regular`, `force`. Default: `regular`.
- Cleanup email lists (`cleanup_email_lists`, true/false): when true, remove all email list entries whose email address matches any email of the deleted contact. Default: `false`.

**Outputs**

- `data` (object): The response from Nimble.

**Example output**

```json
{
  "data": {}
}
```

### Get contact

Get contact from Nimble.

**Inputs**

- Contact ID (`contact_id`, text, required): id of a contact to operate on
- Fields (`fields`, text): Field names to retrieve, otherwise all fields will be retrieved
- Meta (`meta`, true/false): True if include fields matadata into response, False otherwise
- Tags (`tags`, true/false): True if return tags information, False otherwise
- Contexts (`contexts`, text): comma-separated additional contexts that should be returned with in this contact. One of: `last_contacted_data` (Last contacted data), `employers_data` (Employers data), `leads_data` (Leads data), `sequences_data` (Sequences data), `contact_files` (Contact files), `relationship_scores` (Relationship scores).

**Outputs**

- `data` (object): The response from Nimble.

**Example output**

```json
{
  "data": {
    "contacts_meta": {
      "fields": {},
      "groups": {}
    },
    "resources": [
      {
        "avatar_url": "example",
        "children": [
          "example"
        ],
        "company_last_contacted": {},
        "created": "example",
        "creator": "example",
        "employers_info": [
          {}
        ],
        "fields": {},
        "id": "example",
        "is_important": {},
        "last_contacted": {},
        "last_contacted_user": "example",
        "lc": {},
        "object_type": "contact",
        "owner_id": "example"
      }
    ]
  }
}
```

### Get current user

Get current user from Nimble.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Nimble.

**Example output**

```json
{
  "data": {
    "company_id": "example",
    "company_size": 1,
    "email": "example",
    "name": "example",
    "user_id": "example"
  }
}
```

### Get deal

Get deal from Nimble.

**Inputs**

- Deal ID (`deal_id`, text, required): id of a deal to operate on

**Outputs**

- `data` (object): The response from Nimble.

**Example output**

```json
{
  "data": {
    "created": "example",
    "creator": {
      "avatar_url": "example",
      "email": "example",
      "is_active": true,
      "name": "example",
      "user_id": "example"
    },
    "currency": "example",
    "deal_id": "example",
    "deal_number": 1,
    "fields_values": {
      "field_id": "example",
      "values": [
        {}
      ]
    },
    "fields_values_with_names": {
      "field_name": "example",
      "values": [
        {}
      ]
    },
    "is_editable": true,
    "owner": {
      "avatar_url": "example",
      "email": "example",
      "is_active": true,
      "name": "example",
      "user_id": "example"
    },
    "privacy": {
      "edit": {},
      "read": {}
    },
    "related_contacts": [
      {
        "contact": {},
        "employments": [
          {}
        ],
        "note": "example"
      }
    ],
    "related_external_contacts": [
      {
        "contact_info": "example",
        "note": "example"
      }
    ],
    "updated": "example",
    "updated_by": "example"
  }
}
```

### Get deal pipeline

Get deal pipeline from Nimble.

**Inputs**

- Pipeline ID (`pipeline_id`, text, required): Id of pipeline to operate with

**Outputs**

- `data` (object): The response from Nimble.

**Example output**

```json
{
  "data": {
    "archived_at": "example",
    "color": "example",
    "created": "example",
    "creator": {
      "avatar_url": "example",
      "email": "example",
      "is_active": true,
      "name": "example",
      "user_id": "example"
    },
    "default_currency": "example",
    "description": "example",
    "is_default": true,
    "lost_reasons": [
      {
        "id": "example",
        "text": "example"
      }
    ],
    "name": "example",
    "pipeline_id": "example",
    "stages": [
      {
        "archived_at": "example",
        "created": "example",
        "creator": {},
        "default_probability": 1,
        "description": "example",
        "expected_days": 1,
        "name": "example",
        "pipline_id": "example",
        "role": {},
        "stage_id": "example",
        "updated": "example"
      }
    ],
    "tabs": [
      {
        "members": {},
        "pipeline_id": "example",
        "tab_id": "example",
        "tab_name": "example"
      }
    ],
    "updated": "example"
  }
}
```

### Get note

Get note from Nimble.

**Inputs**

- Note ID (`note_id`, text, required): Note id.

**Outputs**

- `data` (object): The response from Nimble.

**Example output**

```json
{
  "data": {
    "author_name": "example",
    "contacts": [
      {
        "avatar_url": "example",
        "contact_type": "person",
        "email": [
          "example"
        ],
        "employment": {},
        "id": "example",
        "is_viewable": true,
        "name": "example",
        "phones": {}
      }
    ],
    "created": "example",
    "id": "example",
    "note": "example",
    "note_preview": "example",
    "owner": {
      "avatar_url": "example",
      "email": "example",
      "is_active": true,
      "name": "example",
      "user_id": "example"
    },
    "owner_id": "example",
    "updated": "example"
  }
}
```

### List activities

List activities from Nimble.

**Inputs**

- Direction (`direction`, text, required): Indicates a direction of the query. `pending` -- to get future activities, `past` -- to get old activities. One of: `pending`, `past`.
- Limit (`limit`, number): Indicates how many activities to show per page. Can be combined with `until_tstamp` to paginate within a date range. At least 1.
- Types (`types`, list): List of activity types to return. `Default:` return activities of all types
- Contacts (`contacts`, list): List of contacts for which to select activities.
- Deals (`deals`, list): List of deals for which to select activities.
- Users (`users`, list): List of users for which to select activities.
- Completed (`completed`, true/false): True for only completed activities, False for uncompleted.
- Tags (`tags`, list): List of tags to filter by.
- Next tstamp (`next_tstamp`, text): Show activities before or after that timestamp (depending on the `direction`).
- Next activity ID (`next_activity_id`, text): Show activities before or after that id (depending on the `direction`).
- Until tstamp (`until_tstamp`, text): Select activities between `next_tstamp` and this timestamp, inclusive. Can be combined with `limit` to paginate within the date range.
- Events calendar IDS (`events_calendar_ids`, list): List of calendar ids to get related events.
- Calls resolution (`calls_resolution`, text): status of calls which to select. One of: `successful`, `unsuccessful`, `abandoned`, `left_voicemail` (Left voicemail).
- Include total (`include_total`, true/false): When true, `meta.total` gives an approximate count of all activities matching the query filters. Intended for "Select All" bulk-delete UX. Omit or set to false for regular listing to avoid extra DB queries. Default: `false`.
- Sequence ID (`sequence_id`, text): Filter activities to only those created by steps of the given sequence. Must be a 24-character hexadecimal MongoDB ObjectId identifying the sequence. Can be combined with `contacts`, `deals`, `users`, `completed`, and `tags` filters.

**Outputs**

- `data` (object): The response from Nimble.

**Example output**

```json
{
  "data": {
    "activities": [
      {
        "activity_id": "example",
        "activity_type": {},
        "assigned_to": {},
        "comments": [
          {}
        ],
        "completed_tstamp": {},
        "created": "example",
        "description": "example",
        "details": {},
        "feed_tstamp": {},
        "is_important": true,
        "name": "example",
        "owner": {},
        "priority": "high",
        "related_contacts": [
          {}
        ]
      }
    ],
    "meta": {
      "total": 1
    },
    "next_page": {}
  }
}
```

### List contact ids

List contact ids from Nimble.

**Inputs**

- Keyword (`keyword`, text): Specifies a set of simple search criteria for the query. This simple search is performed on any (indexed in our search engine) field of contact
- Fields (`fields`, text): Specifies a comma separated list of fields to return. If this parameter is excluded, all fields will be returned
- Tags (`tags`, true/false): Specifies whether tags should be included in the results. Default: `true`.
- Last contacted (`last_contacted`, true/false): True if return last contacted information, False otherwise. Default: `true`.
- Sort (`sort`, list): Identifies the sort field and sort order. Sort order is required when this parameter is used. An single sort field can be specified. Any field can be sorted in either asc or desc order. All searchable fields which aren’t multiple and aren’t custom fields are sortable.
- Query (`query`, list): Specifies query for contacts advanced search. Please note, that this parameter not compatible with parameters record_type and keyword
- Record type (`record_type`, text): Record type. One of: `person`, `company`, `all`. Default: `all`.
- Page (`page`, number): Specifies which page to display. At least 1. Default: `1`.
- Per page (`per_page`, number): Specifies the number of items to return per page of results. At least 1. Default: `30`.

**Outputs**

- `data` (object): The response from Nimble.

**Example output**

```json
{
  "data": {
    "meta": {
      "page": 1,
      "pages": 1,
      "per_page": 1,
      "total": 1
    },
    "resources": [
      "example"
    ]
  }
}
```

### List contact metadata

List contact metadata from Nimble.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Nimble.

**Example output**

```json
{
  "data": {
    "fields": {},
    "groups": {}
  }
}
```

### List contact notes

List contact notes from Nimble.

**Inputs**

- Contact ID (`contact_id`, text, required): Contact id.
- Page (`page`, number): Page. At least 1.
- Per page (`per_page`, number): Per page. At least 1.

**Outputs**

- `data` (object): The response from Nimble.

**Example output**

```json
{
  "data": {
    "meta": {
      "has_more": true,
      "page": 1,
      "pages": 1,
      "per_page": 1,
      "total": 1
    },
    "resources": [
      {
        "author_name": "example",
        "contacts": [
          {}
        ],
        "created": "example",
        "id": "example",
        "note": "example",
        "note_preview": "example",
        "owner": {},
        "owner_id": "example",
        "updated": "example"
      }
    ]
  }
}
```

### List contact pipelines

List contact pipelines from Nimble.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Nimble.

**Example output**

```json
{
  "data": {
    "pipelines": [
      {
        "archived_at": "example",
        "color": "example",
        "created": "example",
        "creator": {},
        "description": "example",
        "fields": [
          {}
        ],
        "lost_reasons": [
          {}
        ],
        "name": "example",
        "pipeline_id": "example",
        "stages": [
          {}
        ],
        "updated": "example"
      }
    ]
  }
}
```

### List contacts

List contacts from Nimble.

**Inputs**

- Keyword (`keyword`, text): Specifies a set of simple search criteria for the query. This simple search is performed on any (indexed in our search engine) field of contact
- Fields (`fields`, text): Specifies a comma separated list of fields to return. If this parameter is excluded, all fields will be returned
- Tags (`tags`, true/false): Specifies whether tags should be included in the results. Default: `true`.
- Sort (`sort`, list): Identifies the sort field and sort order. Sort order is required when this parameter is used. An single sort field can be specified. Any field can be sorted in either asc or desc order. All searchable fields which aren’t multiple and aren’t custom fields are sortable.
- Query (`query`, text): JSON-encoded advanced search query. The not operator accepts one subquery, including a nested and/or group. This parameter cannot be combined with record_type or keyword.
- Record type (`record_type`, text): Record type. One of: `person`, `company`, `all`. Default: `all`.
- Page (`page`, number): Specifies which page to display. At least 1. Default: `1`.
- Per page (`per_page`, number): Specifies the number of items to return per page of results. At least 1. Default: `30`.
- Contexts (`contexts`, text): comma-separated additional contexts that should be returned with in this contact. One of: `last_contacted_data` (Last contacted data), `employers_data` (Employers data), `leads_data` (Leads data), `sequences_data` (Sequences data), `contact_files` (Contact files), `relationship_scores` (Relationship scores).

**Outputs**

- `data` (object): The response from Nimble.

**Example output**

```json
{
  "data": {
    "meta": {
      "page": 1,
      "pages": 1,
      "per_page": 1,
      "total": 1
    },
    "resources": [
      {
        "avatar_url": "example",
        "children": [
          "example"
        ],
        "company_last_contacted": {},
        "created": "example",
        "creator": "example",
        "employers_info": [
          {}
        ],
        "fields": {},
        "id": "example",
        "is_important": {},
        "last_contacted": {},
        "last_contacted_user": "example",
        "lc": {},
        "object_type": "contact",
        "owner_id": "example"
      }
    ]
  }
}
```

### List deal fields

List deal fields from Nimble.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Nimble.

**Example output**

```json
{
  "data": {
    "pipelines_tabs": [
      {
        "members": {},
        "pipeline_id": "example",
        "tab_id": "example",
        "tab_name": "example"
      }
    ],
    "standard_fields": [
      {
        "available_actions": "example",
        "field_id": "example",
        "field_name": "example",
        "field_type": "example",
        "modifier": "example",
        "multiples": true,
        "read_only": true
      }
    ]
  }
}
```

### List deal pipelines

List deal pipelines from Nimble.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Nimble.

**Example output**

```json
{
  "data": {
    "pipelines": [
      {
        "archived_at": "example",
        "color": "example",
        "created": "example",
        "creator": {},
        "default_currency": "example",
        "description": "example",
        "is_default": true,
        "lost_reasons": [
          {}
        ],
        "name": "example",
        "pipeline_id": "example",
        "stages": [
          {}
        ],
        "tabs": [
          {}
        ],
        "updated": "example"
      }
    ]
  }
}
```

### List deal tags

List deal tags from Nimble.

**Inputs**

- Starts with (`starts_with`, text): Find tags that start with
- Limit (`limit`, number): A number of tags to return. At least 1.

**Outputs**

- `data` (object): The response from Nimble.

**Example output**

```json
{
  "data": {
    "tags": [
      {
        "created": "example",
        "name": "example"
      }
    ]
  }
}
```

### List deals

List deals from Nimble.

**Inputs**

- Sort (`sort`, text, required): Sort.
- Limit (`limit`, number): Limit. At least 1.

**Outputs**

- `data` (object): The response from Nimble.

**Example output**

```json
{
  "data": {
    "meta": {
      "page": 1,
      "pages": 1,
      "per_page": 1,
      "total": 1
    },
    "resources": [
      {
        "created": "example",
        "creator": {},
        "currency": "example",
        "deal_id": "example",
        "deal_number": 1,
        "fields_values": {},
        "fields_values_with_names": {},
        "is_editable": true,
        "owner": {},
        "privacy": {},
        "related_contacts": [
          {}
        ],
        "related_external_contacts": [
          {}
        ],
        "updated": "example",
        "updated_by": "example"
      }
    ]
  }
}
```

### List pipeline deals

List pipeline deals from Nimble.

**Inputs**

- Pipeline ID (`pipeline_id`, text, required): id of pipeline to get listing for
- Sort (`sort`, text, required): parameter to sort by
- Limit (`limit`, number): limit of deals per page. At least 1. Default: `10`.
- Query (`query`, text): unparsed NSE search query
- Stage ID (`stage_id`, text): id of stage to get info about
- Stuck (`stuck`, true/false): Filter deals by whether they are stuck in the current stage.

**Outputs**

- `data` (object): The response from Nimble.

**Example output**

```json
{
  "data": {
    "stages": [
      {
        "deals": [
          {}
        ],
        "meta": {},
        "stage": {}
      }
    ]
  }
}
```

### List pipeline owners

List pipeline owners from Nimble.

**Inputs**

- Pipeline ID (`pipeline_id`, text, required): id of pipeline to get listing for
- Sort (`sort`, text, required): parameter to sort by
- Limit (`limit`, number): limit of deals per page. At least 1. Default: `10`.
- Query (`query`, text): unparsed NSE search query

**Outputs**

- `data` (object): The response from Nimble.

**Example output**

```json
{
  "data": {
    "groups": [
      {
        "deals": [
          {}
        ],
        "meta": {},
        "owner": {}
      }
    ]
  }
}
```
