# Files ## Documentation The files attached to deals, persons, organizations, products, activities, notes and leads. Each request costs 20 tokens of the daily budget of the company. - Catalog: `Pipedrive` - Schema: `Notes` - Primary Keys: `id` - Retrieve: True - Insert: False - Update: True - Delete: True ## Table Columns The columns of the table `Files` are shown below. Each column has an SQL data type. A new non-null value must be provided for every required column at all times during update. | Name | Data Type | Label | Required | Documentation | |---|:---:|---|:---:|---| | `active_flag` | `char` | | ☐ | Whether the user is active or not. | | `activity_id` | `int64` | | ☐ | The ID of the activity to associate the file with. | | `add_time` | `datetime` | | ☐ | The date and time when the file was added/created. | | `cid` | `varchar2` | | ☐ | The ID of the inline attachment. | | `deal_id` | `int64` | | ☐ | The ID of the deal to associate the file with. | | `deal_name` | `varchar2` | | ☐ | The name of the deal associated with the file. | | `description` | `varchar2` | | ☐ | The description of the file. | | `file_name` | `varchar2` | | ☐ | The original name of the file. | | `file_size` | `int64` | | ☐ | The size of the file. | | `id` | `int64` | | ☑ | The ID of the file. | | `inline_flag` | `char` | | ☐ | Whether the file was uploaded as inline or not. | | `lead_id` | `varchar2` | | ☐ | The ID of the lead to associate the file with. | | `lead_name` | `varchar2` | | ☐ | The name of the lead associated with the file. | | `mail_message_id` | `varchar2` | | ☐ | The ID of the mail message to associate the file with. | | `mail_template_id` | `varchar2` | | ☐ | The ID of the mail template to associate the file with. | | `name` | `varchar2` | | ☐ | The visible name of the file. | | `org_id` | `int64` | | ☐ | The ID of the organization to associate the file with. | | `org_name` | `varchar2` | | ☐ | The name of the organization associated with the file. | | `person_id` | `int64` | | ☐ | The ID of the person to associate the file with. | | `person_name` | `varchar2` | | ☐ | The name of the person associated with the file. | | `product_id` | `int64` | | ☐ | The ID of the product to associate the file with. | | `product_name` | `varchar2` | | ☐ | The name of the product associated with the file. | | `project_id` | `int64` | | ☐ | The ID of the project to associate the file with. | | `project_name` | `varchar2` | | ☐ | The name of the project associated with the file. | | `remote_id` | `varchar2` | | ☐ | The ID of the remote item. | | `remote_location` | `varchar2` | | ☐ | The location type to send the file to. | | `s3_bucket` | `varchar2` | | ☐ | The location of the cloud storage. | | `update_time` | `datetime` | | ☐ | The last updated date and time of the file. | | `url` | `varchar2` | | ☐ | The URL of the download file. | | `user_id` | `int64` | | ☐ | The ID of the user to associate the file with. | ## Foreign Keys The values of these columns refer to a row of another table. | Columns | Referenced Table | Referenced Columns | Guarantee | |---|---|---|---| | `activity_id` | [[Activities-Activities\|Activities.Activities]] | `id` | Declared by the connector, not enforced by the platform | | `deal_id` | [[Deals-Deals\|Deals.Deals]] | `id` | In words only: The deal, in Deals or, once archived, in ArchivedDeals; a deleted deal stays readable for 30 days with status 'deleted'. | | `deal_id` | [[Deals-ArchivedDeals\|Deals.ArchivedDeals]] | `id` | In words only: The deal, in Deals or, once archived, in ArchivedDeals; a deleted deal stays readable for 30 days with status 'deleted'. | | `lead_id` | [[Leads-Leads\|Leads.Leads]] | `id` | In words only: The lead, in Leads or, once archived, in ArchivedLeads. | | `lead_id` | [[Leads-ArchivedLeads\|Leads.ArchivedLeads]] | `id` | In words only: The lead, in Leads or, once archived, in ArchivedLeads. | | `org_id` | [[Contacts-Organizations\|Contacts.Organizations]] | `id` | Declared by the connector, not enforced by the platform | | `person_id` | [[Contacts-Persons\|Contacts.Persons]] | `id` | Declared by the connector, not enforced by the platform | | `product_id` | [[Products-Products\|Products.Products]] | `id` | Declared by the connector, not enforced by the platform | | `project_id` | [[Projects-Projects\|Projects.Projects]] | `id` | In words only: The project, in Projects or, once archived, in ArchivedProjects. | | `project_id` | [[Projects-ArchivedProjects\|Projects.ArchivedProjects]] | `id` | In words only: The project, in Projects or, once archived, in ArchivedProjects. | | `user_id` | [[Users-Users\|Users.Users]] | `id` | Declared by the connector, not enforced by the platform | ## Referenced By The columns of these tables refer to a row of this table. | Table | Columns | Guarantee | |---|---|---| | [[Settings-RecentChangesBySinceTimestamp\|Settings.RecentChangesBySinceTimestamp]] | `id` | In words only: The changed row of Files, when item is 'file'. |