Tasks
Retrieve task events for Calendar.
Table Specific Information
Retrieve task events for Calendar. A shortcut of the standard events call for finer-grained control.
Select
You can filter through results with StartDate, EndDate, EmailCampaignId, IncludeNoCampaigns. In case StartDate is not specified its default value will be 01/01/2010. In case EndDate is not specified its default value will be the actual date. For example:
The following query will return results in the range of the specified dates satisfying other conditions as well:
SELECT * FROM Tasks WHERE StartDate = '2014-01-01 12:00:00' AND EndDate = '2019-01-01 12:00:00' AND IncludeNoCampaigns = 'true' SELECT * FROM Tasks WHERE EmailCampaignId IN ('12345678', '2345689') AND StartDate = '2014-01-01 12:00:00Z' AND EndDate = '2019-01-01 12:00:00'
Columns
Name | Type | References | Description |
Id [KEY] | String | The unique id of the task. | |
Name | String | Name of Task. | |
Description | String | Description of Task. | |
EventType | String | Type of calendar event; for tasks this is always PUBLISHING_TASK. | |
EventDate | Datetime | When the task is set to be due. | |
Category | String | Type of task; one of BLOG_POST, EMAIL, LANDING_PAGE, CUSTOM. | |
CategoryId | Integer | Numeric value corresponding to the type of task; one of 3 (BLOG_POST), 2 (EMAIL), 1 (LANDING_PAGE), 0 (CUSTOM). | |
ContentId | Long | Id value of the COS content object associated with the task, null if nothing associated. | |
ContentGroupId | Long | The ID of the content group (aka blog) that the associated Blog Post belongs to, if any. Otherwise null. Only populated for single task GETs and for Blog Post Tasks.. | |
PortalId | Long | The hub id. | |
State | String | Value of TODO or DONE. | |
EmailCampaignId | String | Value of campaign GUID associated with Task. | |
Url | String | URL of the task. | |
OwnerId | Long |
Owners.OwnerId | HubSpot id of the user that the task is assigned to. |
CreatedBy | Long |
Owners.OwnerId | HubSpot id of the user that the task was created by. |
PreviewKey | String | The preview key. | |
SocialUsername | String | The username. | |
SocialDisplayName | String | The display name. | |
AvatarUrl | String | User avatar url. | |
TopicIds | String | The list of ids of topics associated with the associated Blog Post, if any. Otherwise null. Only populated for single task GETs and for Blog Post Tasks.. | |
IsRecurring | Boolean | Boolean indicating whether is the task recurring. |
Pseudo-Columns
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source. For more information, see the WHERE clause section.
Name | Type | Description | |
IncludeNoCampaigns | Boolean | The beginning value of the query range. | |
StartDate | Datetime | The beginning value of the query range. | |
EndDate | Datetime | Include tasks without a campaign specified (true, false). Defaults to false. |