# PersonMailMessagesByPersonId
## Documentation
The e-mail messages linked to one person. Each request costs 20 tokens of the daily budget of the company.
- Catalog: `Pipedrive`
- Schema: `Contacts`
- Primary Keys: `id`
This is a read-only table function. The Pipedrive API may not support changing the data or the Invantive UniversalSQL driver for Pipedrive does not cover it. In the latter case, please use the table NativePlatformScalarRequests to upload data to the Pipedrive API.
## Parameters of Table Function
The following parameters can be used to control the behaviour of the table function `PersonMailMessagesByPersonId`. A value must be provided at all times for required parameters, but optional parameters in general do not need to have a value and the execution will default to a pre-defined behaviour. Values can be specified by position and by name. In both cases, all parameters not specified will be evaluated using their default values.
Value specification by position is done by listing all values from the first to the last needed value. For example: a `select * from table(value1, value2, value3)` on a table with four parameters will use the default value for the fourth parameter and the specified values for the first three.
Value specification by name is done by listing all values that require a value. For example with `select * from table(name1 => value1, name3 => value3)` on the same table will use the default values for the second and fourth parameters and the specified values for the first and third.
| Name | Data Type | Required | Default Value | Documentation |
|---|:---:|:---:|:---:|---|
| `person_id` | `int64` | ☑ | | The person id. |
## Columns of Table Function
The columns of the table function `PersonMailMessagesByPersonId` are shown below. Each column has an SQL data type.
| Name | Data Type | Label | Required | Documentation |
|---|:---:|---|:---:|---|
| `data_account_id` | `varchar2` | | ☐ | The connection account ID. |
| `data_add_time` | `datetime` | | ☐ | The insertion into the database time of the mail message. |
| `data_bcc` | `varchar2` | | ☐ | The array of mail message blind copies (object). |
| `data_body_url` | `varchar2` | | ☐ | The mail message body URL. |
| `data_body` | `varchar2` | | ☐ | The mail message body content. |
| `data_cc` | `varchar2` | | ☐ | The array of mail message copies (object). |
| `data_company_id` | `int64` | | ☐ | The ID of the company. |
| `data_deleted_flag` | `varchar2` | | ☐ | The data deleted flag. |
| `data_draft_flag` | `varchar2` | | ☐ | The data draft flag. |
| `data_draft` | `varchar2` | | ☐ | If the mail message has a draft status then the value is the mail message object as JSON formatted string, otherwise null. |
| `data_external_deleted_flag` | `char` | | ☐ | If the Mail Message has been deleted on the provider side or not. |
| `data_from` | `varchar2` | | ☐ | The array of mail message sender (object). |
| `data_has_attachments_flag` | `varchar2` | | ☐ | The data has attachments flag. |
| `data_has_body_flag` | `varchar2` | | ☐ | The data has body flag. |
| `data_has_inline_attachments_flag` | `varchar2` | | ☐ | The data has inline attachments flag. |
| `data_has_real_attachments_flag` | `varchar2` | | ☐ | The data has real attachments flag. |
| `data_id` | `int64` | | ☐ | ID of the mail message. |
| `data_item_type` | `varchar2` | | ☐ | The type of the data item. |
| `data_mail_link_tracking_enabled_flag` | `varchar2` | | ☐ | The data mail link tracking enabled flag. |
| `data_mail_thread_id` | `int64` | | ☐ | ID of the mail message thread. |
| `data_mail_tracking_status` | `varchar2` | | ☐ | The status of tracking mail message. |
| `data_message_time` | `datetime` | | ☐ | Creation or receival time of the mail message. |
| `data_mua_message_id` | `varchar2` | | ☐ | The Mail Message ID assigned by the mail user agent. |
| `data_nylas_id` | `varchar2` | | ☐ | The Mail Message ID assigned by the sync provider. |
| `data_read_flag` | `varchar2` | | ☐ | The data read flag. |
| `data_s3_bucket_path` | `varchar2` | | ☐ | The path of the S3 bucket. |
| `data_s3_bucket` | `varchar2` | | ☐ | The name of the S3 bucket. |
| `data_sent_flag` | `varchar2` | | ☐ | The data sent flag. |
| `data_sent_from_pipedrive_flag` | `varchar2` | | ☐ | The data sent from pipedrive flag. |
| `data_smart_bcc_flag` | `varchar2` | | ☐ | The data smart bcc flag. |
| `data_snippet` | `varchar2` | | ☐ | The snippet of mail message. |
| `data_subject` | `varchar2` | | ☐ | The subject of mail message. |
| `data_synced_flag` | `varchar2` | | ☐ | The data synced flag. |
| `data_template_id` | `int64` | | ☐ | The ID of the mail template. |
| `data_timestamp` | `datetime` | | ☐ | The add date and time of the Mail Message. |
| `data_to` | `varchar2` | | ☐ | The array of mail message receiver (object). |
| `data_update_time` | `datetime` | | ☐ | The updating time in the database of the mail message. |
| `data_user_id` | `int64` | | ☐ | ID of the user whom mail message will be assigned to. |
| `object` | `varchar2` | | ☐ | The type of the data item. |
| `person_id` | `int64` | | ☐ | The person id the rows were read for. |
| `timestamp` | `datetime` | | ☐ | The date and time when the item was created. |