# Brandfolder

> Add, update and organize brand assets in Brandfolder: assets, collections, tags and custom fields.

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

## Actions

### Add custom field to asset

Give an asset a value for one of the Brandfolder's custom fields.

**Inputs**

- Brandfolder (`brandfolder_id`, text): The Brandfolder the asset is in. Choosing it lists its assets to pick from.
- Custom field (`custom_field_key_id`, text, required): The custom field to fill in.
- Asset (`asset_id`, text, required): The asset to use.
- Value (`value`, text, required): The value to give the asset.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": [
      {
        "attributes": {
          "key": "example",
          "value": "example"
        },
        "id": "example",
        "type": "example"
      }
    ]
  }
}
```

### Add tags to asset

Add one or more tags to an asset. Its existing tags stay.

**Inputs**

- Brandfolder (`brandfolder_id`, text): The Brandfolder the asset is in. Choosing it lists its assets to pick from.
- Asset (`asset_id`, text, required): The asset to use.
- Tags (`tags`, list, required): The tags to add, one per entry.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": [
      {
        "attributes": {
          "auto_generated": true,
          "name": "example"
        },
        "id": "example",
        "type": "example"
      }
    ],
    "meta": {
      "current_page": 1,
      "next_page": 1,
      "prev_page": 1,
      "total_count": 1,
      "total_pages": 1
    }
  }
}
```

### Create asset

Add an asset to a Brandfolder from a file at a public link. Brandfolder finishes processing the file shortly after the step.

**Inputs**

- Brandfolder (`brandfolder_id`, text, required): The Brandfolder to use.
- Section (`section_id`, text, required): The section of the Brandfolder new assets go in. Assets are created in a section, and each section holds one kind of asset, such as files or fonts.
- Collection (`collection_id`, text): Also add the asset to this collection.
- Name (`name`, text, required): The asset's name.
- Description (`description`, text): A description of the asset.
- Approved (`approved`, true/false): Whether the asset is approved for use.
- Available from (`available_from`, date and time): When the asset is published. Until then Brandfolder shows it as a draft.
- Available until (`available_until`, date and time): When the asset expires. After this Brandfolder shows it as expired.
- File link (`file_url`, text): A public link to the file. Brandfolder downloads it from there, so the link must work without signing in.
- File name (`filename`, text): The file's name, with its extension (for example `logo.png`). Leave empty to use the name in the link.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": [
      {
        "attributes": {
          "approved": true,
          "created_at": "example",
          "description": "example",
          "name": "example",
          "thumbnail_url": "example",
          "updated_at": "example"
        },
        "id": "example",
        "type": "example"
      }
    ]
  }
}
```

### Create collection

Create a collection in a Brandfolder, to group and share a set of its assets.

**Inputs**

- Brandfolder (`brandfolder_id`, text, required): The Brandfolder to use.
- Name (`name`, text, required): The collection's name. Brandfolder makes its link from it.
- Tagline (`tagline`, text): A short line describing the collection.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": {
      "attributes": {
        "is_workspace": true,
        "name": "example",
        "public": true,
        "slug": "example",
        "stealth": true,
        "tagline": "example"
      },
      "id": "example",
      "type": "example"
    }
  }
}
```

### Delete asset

Delete an asset and all of its files.

**Inputs**

- Brandfolder (`brandfolder_id`, text): The Brandfolder the asset is in. Choosing it lists its assets to pick from.
- Asset (`asset_id`, text, required): The asset to use.

**Outputs**

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

**Example output**

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

### Delete collection

Delete a collection. Its assets stay in the Brandfolder.

**Inputs**

- Collection (`collection_id`, text, required): The collection to use.

**Outputs**

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

**Example output**

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

### Get asset

Get an asset's name, description and approval, and optionally its files, tags and custom fields.

**Inputs**

- Brandfolder (`brandfolder_id`, text): The Brandfolder the asset is in. Choosing it lists its assets to pick from.
- Asset (`asset_id`, text, required): The asset to use.
- Extra details (`extra_details`, list): Extra details to return with each asset, such as when it was created or its public link. Each one can slow the answer down. One or more of: `created_at` (Created at), `updated_at` (Updated at), `cdn_url` (Cdn url), `availability`.
- Also return (`related`, list): Related records to return with the asset, listed under `included`. One or more of: `attachments`, `tags`, `custom_fields` (Custom fields), `section`, `collections`, `brandfolder`.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": {
      "attributes": {
        "approved": true,
        "created_at": "example",
        "description": "example",
        "name": "example",
        "thumbnail_url": "example",
        "updated_at": "example"
      },
      "id": "example",
      "type": "example"
    },
    "included": [
      {}
    ]
  }
}
```

### Get attachment

Get one of an asset's files: its name, type, size, dimensions and download link.

**Inputs**

- Brandfolder (`brandfolder_id`, text): The Brandfolder the asset is in. Choosing it lists its assets to pick from.
- Asset (`asset_id`, text): The asset the record belongs to. Choosing it lists its records to pick from.
- File (`attachment_id`, text, required): The file to get.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": {
      "attributes": {
        "extension": "example",
        "filename": "example",
        "height": 1,
        "mimetype": "example",
        "size": 1,
        "thumbnail_url": "example",
        "url": "example",
        "width": 1
      },
      "id": "example",
      "type": "example"
    }
  }
}
```

### Get collection

Get a collection's name, tagline and sharing settings.

**Inputs**

- Collection (`collection_id`, text, required): The collection to use.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": {
      "attributes": {
        "is_workspace": true,
        "name": "example",
        "public": true,
        "slug": "example",
        "stealth": true,
        "tagline": "example"
      },
      "id": "example",
      "type": "example"
    }
  }
}
```

### List asset custom fields

List an asset's custom fields and their values.

**Inputs**

- Brandfolder (`brandfolder_id`, text): The Brandfolder the asset is in. Choosing it lists its assets to pick from.
- Asset (`asset_id`, text, required): The asset to use.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": [
      {
        "attributes": {
          "key": "example",
          "value": "example"
        },
        "id": "example",
        "type": "example"
      }
    ],
    "meta": {
      "current_page": 1,
      "next_page": 1,
      "prev_page": 1,
      "total_count": 1,
      "total_pages": 1
    }
  }
}
```

### List assets

List the assets in a Brandfolder, or only those in one of its collections, sections or labels. Use Page to read past the first page.

**Inputs**

- Brandfolder (`brandfolder_id`, text, required): The Brandfolder to use.
- Collection (`collection_id`, text): Only list assets in this collection.
- Section (`section_id`, text): Only list assets in this section.
- Label (`label_id`, text): Only list assets with this label. Labels aren't turned on for every Brandfolder account.
- Search (`search`, text): Only list assets that match this search, written as you would in Brandfolder's search bar (for example `extension:png`).
- Extra details (`extra_details`, list): Extra details to return with each asset, such as when it was created or its public link. Each one can slow the answer down. One or more of: `created_at` (Created at), `updated_at` (Updated at), `cdn_url` (Cdn url), `availability`.
- Page (`page`, number): Which page of results to return, starting at 1. At least 1.
- Assets per page (`per_page`, number): How many assets to return on each page, up to 3000. Brandfolder returns 100 if left empty. From 1 to 3000.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": [
      {
        "attributes": {
          "approved": true,
          "created_at": "example",
          "description": "example",
          "name": "example",
          "thumbnail_url": "example",
          "updated_at": "example"
        },
        "id": "example",
        "type": "example"
      }
    ],
    "meta": {
      "current_page": 1,
      "next_page": 1,
      "prev_page": 1,
      "total_count": 1,
      "total_pages": 1
    }
  }
}
```

### List Brandfolders

List the Brandfolders your account can open.

**Inputs**

- Search (`search`, text): Only list Brandfolders that match these search words.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": [
      {
        "attributes": {
          "name": "example",
          "privacy": "example",
          "slug": "example",
          "tagline": "example"
        },
        "id": "example",
        "type": "example"
      }
    ],
    "meta": {
      "current_page": 1,
      "next_page": 1,
      "prev_page": 1,
      "total_count": 1,
      "total_pages": 1
    }
  }
}
```

### List collections

List the collections in a Brandfolder.

**Inputs**

- Brandfolder (`brandfolder_id`, text, required): The Brandfolder to use.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": [
      {
        "attributes": {
          "is_workspace": true,
          "name": "example",
          "public": true,
          "slug": "example",
          "stealth": true,
          "tagline": "example"
        },
        "id": "example",
        "type": "example"
      }
    ],
    "meta": {
      "current_page": 1,
      "next_page": 1,
      "prev_page": 1,
      "total_count": 1,
      "total_pages": 1
    }
  }
}
```

### List custom fields

List the custom fields set up for a Brandfolder, with the values each one allows.

**Inputs**

- Brandfolder (`brandfolder_id`, text, required): The Brandfolder to use.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": [
      {
        "attributes": {
          "allowed_values": [
            "example"
          ],
          "name": "example",
          "position": 1,
          "prioritized": true,
          "required": true,
          "restricted": true
        },
        "id": "example",
        "type": "example"
      }
    ],
    "meta": {
      "current_page": 1,
      "next_page": 1,
      "prev_page": 1,
      "total_count": 1,
      "total_pages": 1
    }
  }
}
```

### List sections

List the sections of a Brandfolder. Every asset belongs to one section.

**Inputs**

- Brandfolder (`brandfolder_id`, text, required): The Brandfolder to use.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": [
      {
        "attributes": {
          "default_asset_type": "example",
          "name": "example",
          "position": 1
        },
        "id": "example",
        "type": "example"
      }
    ],
    "meta": {
      "current_page": 1,
      "next_page": 1,
      "prev_page": 1,
      "total_count": 1,
      "total_pages": 1
    }
  }
}
```

### Remove custom field from asset

Remove one of an asset's custom field values.

**Inputs**

- Brandfolder (`brandfolder_id`, text): The Brandfolder the asset is in. Choosing it lists its assets to pick from.
- Asset (`asset_id`, text): The asset the record belongs to. Choosing it lists its records to pick from.
- Custom field (`custom_field_value_id`, text, required): The custom field value to remove.

**Outputs**

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

**Example output**

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

### Remove tags from asset

Remove tags from an asset. Brandfolder removes them in the background, so they can take a moment to disappear.

**Inputs**

- Brandfolder (`brandfolder_id`, text): The Brandfolder the asset is in. Choosing it lists its assets to pick from.
- Asset (`asset_id`, text, required): The asset to remove tags from.
- Tags (`tags`, list, required): The tags to remove.

**Outputs**

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

**Example output**

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

### Update asset

Change an asset's name, description, approval or dates, or add a file to it. Fields left empty keep their current values.

**Inputs**

- Brandfolder (`brandfolder_id`, text): The Brandfolder the asset is in. Choosing it lists its assets to pick from.
- Asset (`asset_id`, text, required): The asset to use.
- Name (`name`, text): The asset's name.
- Description (`description`, text): A description of the asset.
- Approved (`approved`, true/false): Whether the asset is approved for use.
- Available from (`available_from`, date and time): When the asset is published. Until then Brandfolder shows it as a draft.
- Available until (`available_until`, date and time): When the asset expires. After this Brandfolder shows it as expired.
- File link (`file_url`, text): A public link to the file. Brandfolder downloads it from there, so the link must work without signing in.
- File name (`filename`, text): The file's name, with its extension (for example `logo.png`). Leave empty to use the name in the link.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": {
      "attributes": {
        "approved": true,
        "created_at": "example",
        "description": "example",
        "name": "example",
        "thumbnail_url": "example",
        "updated_at": "example"
      },
      "id": "example",
      "type": "example"
    }
  }
}
```

### Update asset custom field

Change the value of one of an asset's custom fields.

**Inputs**

- Brandfolder (`brandfolder_id`, text): The Brandfolder the asset is in. Choosing it lists its assets to pick from.
- Asset (`asset_id`, text): The asset the record belongs to. Choosing it lists its records to pick from.
- Custom field (`custom_field_value_id`, text, required): The custom field value to change.
- Value (`value`, text, required): The new value.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": [
      {
        "attributes": {
          "key": "example",
          "value": "example"
        },
        "id": "example",
        "type": "example"
      }
    ],
    "meta": {
      "current_page": 1,
      "next_page": 1,
      "prev_page": 1,
      "total_count": 1,
      "total_pages": 1
    }
  }
}
```

### Update collection

Rename a collection or change its tagline. Fields left empty keep their current values.

**Inputs**

- Collection (`collection_id`, text, required): The collection to use.
- Name (`name`, text): The collection's new name.
- Tagline (`tagline`, text): The collection's new tagline.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": {
      "attributes": {
        "is_workspace": true,
        "name": "example",
        "public": true,
        "slug": "example",
        "stealth": true,
        "tagline": "example"
      },
      "id": "example",
      "type": "example"
    }
  }
}
```
