# Trello

This integration is provided as an Open Authorization API (OAA) connector package. Contact our support team for more information.

## Veza Trello Connector

Veza Connector for Trello Organizations. Enables discover of Trello Users that belong to an Organization and their role in the org.

#### Veza Application Mapping

| Trello        | OAA Application  | Notes |
| ------------- | ---------------- | ----- |
| Trello.com    | Application      |       |
| Members       | Local User       |       |
| Organizations | Custom Resources |       |

#### Discovered Properties

| Entity       | Property       | Description                                                               |
| ------------ | -------------- | ------------------------------------------------------------------------- |
| Member       | `id`           | User's ID provided by Trello                                              |
| Member       | `username`     | User's username                                                           |
| Member       | `member_type`  | User's member type. It can be either normal or ghost                      |
| Member       | `email`        | User's email address. `Will only fetch if --get-individual-user-details`  |
| Member       | `active`       | User is active or not. `Will only fetch if --get-individual-user-details` |
| Member       | `login_types`  | User's login type. `Will only fetch if --get-individual-user-details`     |
| Organization | `id`           | Organization's ID provided by Trello                                      |
| Organization | `name`         | Name of the Organization.                                                 |
| Organization | `display_name` | Display name of the Organization.                                         |
| Organization | `domain_name`  | Domain name of the Organization.                                          |
| Organization | `team_type`    | Organization's Team Type.                                                 |

#### Limitations

* The maximum number of Users for an Organization that can be discovered is 1,000 due to a limitation in the Trello API.
* Depending on the Trello Organization configuration and plan level, the connector may not be able to retrieve Trello User's email addresses to use for identity mapping. In some cases running the connector with `--get-individual-user-details` can retrieve the user details, but can be very slow in large environments and may be subject to Trello rate limiting.

### Setup

#### Trello

1. Follow the instructions on the [API Integration](https://developer.atlassian.com/cloud/trello/guides/rest-api/api-introduction/#managing-your-api-key) page to generate an API key for Trello by creating a new Power Up.
2. Note the API key and Secret for the Power Up.

#### Veza

1. Generate an API key for your Veza user. API keys can be managed in the Veza interface under Administration -> API Keys. For detailed instructions consult the Veza User Guide.

### Running the Connector

#### Command Line

1. Install the requirements:

   ```
   pip3 install -r requirements.txt
   ```
2. Set the Secrets:

   ```
   export VEZA_API_KEY="ZXldTcj...JCWGU3Qlo1OHR3RTBfc00yN3lfSFk="
   export TRELLO_KEY="6ed173a951f433d7c71214XXXXXXX"
   export TRELLO_TOKEN="ATTAbbc7d54f42e4b89a93d679d9fa57adc3d3f6f652c89771a48e7b7f4cc08XXXXXXXX"
   ```
3. Run the connector:

   ```
   ./veza_trello.py --veza-url https://<your-org>.vezacloud.com
   ```

#### Parameters

| CLI Parameter                   | Environment Variable          | Description                                                                       |
| ------------------------------- | ----------------------------- | --------------------------------------------------------------------------------- |
| `--veza-url`                    | `VEZA_URL`                    | URL of Veza system                                                                |
|                                 | `VEZA_API_KEY`                | API key for Veza connection                                                       |
| `--trello-key`                  | `TRELLO_KEY`                  | Trello API Key                                                                    |
| n/a                             | `TRELLO_TOKEN`                | Trello token also referred to as the secret                                       |
| `--get-individual-user-details` | `get_individual_user_details` | Make Extra call to `members/<mem_id>` to fetch `loginTypes`, `email` and `active` |
| `--debug`                       |                               | Enable verbose debug output                                                       |
| `--save-json`                   |                               | Save OAA Payload as local JSON file before upload                                 |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.veza.com/4yItIzMvkpAvMVFAamTf/integrations/integrations/trello.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
