# Planable

> Work with campaign records, social posts, media, and reporting.

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

## Actions

### Count posts

Count posts.

**Inputs**: None.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": {
      "total": 1,
      "workspaces": [
        {}
      ]
    }
  }
}
```

### Create a campaign

Create a campaign.

**Inputs**

- Workspace (`workspace_id`, text, required): Workspace id.
- Name (`name`, text, required): Name.
- Status (`status`, text): Status. One of: `active`, `archived`, `paused`, `planned`, `completed`.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": {
      "color": "example",
      "createdAt": "example",
      "description": "example",
      "endedAt": "example",
      "icon": "star",
      "id": "example",
      "links": [
        {}
      ],
      "name": "example",
      "startedAt": "example",
      "status": "active",
      "workspaceId": "example"
    }
  }
}
```

### Delete a campaign

Delete a campaign.

**Inputs**

- Campaign ID (`campaign_id`, text, required): Campaign id.

**Outputs**

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

**Example output**

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

### Get a campaign

Get a campaign.

**Inputs**

- Campaign ID (`campaign_id`, text, required): Campaign id.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": {
      "color": "example",
      "createdAt": "example",
      "description": "example",
      "endedAt": "example",
      "icon": "star",
      "id": "example",
      "links": [
        {}
      ],
      "name": "example",
      "startedAt": "example",
      "status": "active",
      "workspaceId": "example"
    }
  }
}
```

### Get a post

Get a post.

**Inputs**

- Post ID (`post_id`, text, required): Post id.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": {
      "approval": {
        "approved": true,
        "completedLevels": 1,
        "currentLevelId": "example",
        "levels": [
          {}
        ],
        "status": "NOT_APPLICABLE",
        "totalLevels": 1,
        "type": "NONE"
      },
      "approved": true,
      "approvedBy": [
        {}
      ],
      "archived": true,
      "campaignId": "example",
      "classification": "example",
      "commentsCounter": 1,
      "createdAt": "example",
      "creatorId": "example",
      "firstComment": "example",
      "gridPosition": 1,
      "groupId": "example",
      "groupPageIds": [
        "example"
      ],
      "groupSync": true,
      "id": "example",
      "instagramCollaborators": [
        {}
      ],
      "instagramTrialReels": {
        "isTrial": true,
        "shareToFeed": true,
        "trialGraduationStrategy": "MANUAL"
      },
      "instagramUserTags": [
        {}
      ],
      "labels": [
        {}
      ],
      "media": [
        "example"
      ],
      "mediaType": "example",
      "mentions": [
        {}
      ],
      "modifiedAt": "example",
      "notesCounter": 1,
      "pageId": "example",
      "pinterest": {
        "boardId": "example",
        "boardName": "example",
        "description": "example",
        "link": "example",
        "title": "example"
      },
      "plainText": "example",
      "publicShareLink": "example",
      "published": true,
      "publishedPostLink": "example",
      "scheduledAt": "example",
      "scheduledSet": true,
      "status": "example",
      "suggestionsCounter": 1,
      "teamOnly": true,
      "type": "example",
      "universalTitle": "example",
      "validationErrors": [
        {}
      ],
      "videoThumbnailUrl": "example",
      "workspaceId": "example"
    }
  }
}
```

### Get an uploaded media item

Get an uploaded media item.

**Inputs**

- Media ID (`media_id`, text, required): Media id.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": {
      "createdAt": "example",
      "height": 1,
      "id": "example",
      "mimeType": "example",
      "name": "example",
      "size": 1,
      "status": "uploading",
      "thumbnailUrl": "example",
      "type": "image",
      "url": "example",
      "width": 1,
      "workspaceId": "example"
    }
  }
}
```

### Get page metrics sync status

Get page metrics sync status.

**Inputs**

- Page ID (`page_id`, text, required): Page id.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": {
      "lastSyncedAt": "example",
      "pageId": "example",
      "syncInProgress": true
    }
  }
}
```

### Get post metrics

Get post metrics.

**Inputs**

- Post ID (`post_id`, text, required): Post id.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": {
      "engagement": 1,
      "facebook": {},
      "fetchedAt": "example",
      "impressions": 1,
      "instagram": {},
      "linkedin": {},
      "pageId": "example",
      "pageType": "example",
      "postId": "example",
      "reactions": 1,
      "threads": {},
      "tiktok": {},
      "twitter": {},
      "youtube": {}
    }
  }
}
```

### Get post metrics sync status

Get post metrics sync status.

**Inputs**

- Post ID (`post_id`, text, required): Post id.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": {
      "lastSyncedAt": "example",
      "postId": "example",
      "syncInProgress": true
    }
  }
}
```

### Get social page metrics

Get social page metrics.

**Inputs**

- Page ID (`page_id`, text, required): Page id.
- Start date (`start_date`, date and time, required): Start date.
- End date (`end_date`, date and time, required): End date.
- Offset (`offset`, number): Offset. At least 0.
- Limit (`limit`, number): Limit. From 1 to 90.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": [
      {
        "facebook": {},
        "fetchedAt": "example",
        "googleMyBusiness": {},
        "instagram": {},
        "linkedin": {},
        "pageId": "example",
        "pageType": "example",
        "partial": true,
        "threads": {},
        "tiktok": {},
        "twitter": {},
        "youtube": {}
      }
    ],
    "pagination": {
      "hasMore": true,
      "limit": 1,
      "offset": 1
    }
  }
}
```

### List campaigns

List campaigns.

**Inputs**

- Workspace (`workspace_id`, text, required): Workspace id.
- Status (`status`, text): Status. One of: `active`, `archived`, `paused`, `planned`, `completed`.
- Offset (`offset`, number): Offset.
- Limit (`limit`, number): Limit.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": [
      {
        "color": "example",
        "createdAt": "example",
        "description": "example",
        "endedAt": "example",
        "icon": "star",
        "id": "example",
        "links": [
          {}
        ],
        "name": "example",
        "startedAt": "example",
        "status": "active",
        "workspaceId": "example"
      }
    ],
    "pagination": {
      "hasMore": true,
      "limit": 1,
      "offset": 1
    }
  }
}
```

### List comments on a post

List comments on a post.

**Inputs**

- Post ID (`post_id`, text, required): Post id.
- Offset (`offset`, number): Offset.
- Limit (`limit`, number): Limit.
- Team only (`team_only`, text): Team only. One of: `true`, `false`.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": [
      {
        "authorId": "example",
        "createdAt": "example",
        "id": "example",
        "mentions": [
          {}
        ],
        "postId": "example",
        "reactions": [
          {}
        ],
        "replyFor": "example",
        "suggestionId": "example",
        "teamOnly": true,
        "text": "example"
      }
    ],
    "pagination": {
      "hasMore": true,
      "limit": 1,
      "offset": 1
    }
  }
}
```

### List posts

List posts.

**Inputs**

- Workspace (`workspace_id`, text, required): Workspace id.
- Page ID (`page_id`, text): Page id.
- Campaign ID (`campaign_id`, text): Filter by campaign ID, or `no-campaign` for posts not assigned to any campaign
- Scheduled after (`scheduled_after`, date and time): ISO 8601 datetime. Only return posts scheduled at or after this time. Posts with no schedule are excluded when this or `scheduledBefore` is set.
- Scheduled before (`scheduled_before`, date and time): ISO 8601 datetime. Only return posts scheduled before this time. Combine with `scheduledAfter` for a date range.
- Created after (`created_after`, date and time): ISO 8601 datetime. Only return posts created at or after this time.
- Created before (`created_before`, date and time): ISO 8601 datetime. Only return posts created before this time.
- Offset (`offset`, number): Offset.
- Limit (`limit`, number): Limit.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": [
      {
        "approval": {},
        "approved": true,
        "approvedBy": [
          {}
        ],
        "archived": true,
        "campaignId": "example",
        "classification": "example",
        "commentsCounter": 1,
        "createdAt": "example",
        "creatorId": "example",
        "firstComment": "example",
        "gridPosition": 1,
        "groupId": "example",
        "groupPageIds": [
          "example"
        ],
        "groupSync": true,
        "id": "example",
        "instagramCollaborators": [
          {}
        ],
        "instagramTrialReels": {},
        "instagramUserTags": [
          {}
        ],
        "labels": [
          {}
        ],
        "media": [
          "example"
        ],
        "mediaType": "example",
        "mentions": [
          {}
        ],
        "modifiedAt": "example",
        "notesCounter": 1,
        "pageId": "example",
        "pinterest": {},
        "plainText": "example",
        "publicShareLink": "example",
        "published": true,
        "publishedPostLink": "example",
        "scheduledAt": "example",
        "scheduledSet": true,
        "status": "example",
        "suggestionsCounter": 1,
        "teamOnly": true,
        "type": "example",
        "universalTitle": "example",
        "validationErrors": [
          {}
        ],
        "videoThumbnailUrl": "example",
        "workspaceId": "example"
      }
    ],
    "pagination": {
      "hasMore": true,
      "limit": 1,
      "offset": 1
    }
  }
}
```

### List social pages

List social pages.

**Inputs**

- Workspace (`workspace_id`, text): Workspace id.
- Offset (`offset`, number): Offset.
- Limit (`limit`, number): Limit.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": [
      {
        "createdAt": "example",
        "id": "example",
        "isConnected": true,
        "link": "example",
        "name": "example",
        "platform": "example",
        "profilePicture": "example",
        "workspaceId": "example"
      }
    ],
    "pagination": {
      "hasMore": true,
      "limit": 1,
      "offset": 1
    }
  }
}
```

### List suggestions on a post

List suggestions on a post.

**Inputs**

- Post ID (`post_id`, text, required): Post id.
- Offset (`offset`, number): Offset.
- Limit (`limit`, number): Limit.
- Status (`status`, text): Status. One of: `PENDING`, `ACCEPTED`, `DECLINED`.
- Team only (`team_only`, text): Team only. One of: `true`, `false`.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": [
      {
        "authorId": "example",
        "createdAt": "example",
        "editedAt": "example",
        "id": "example",
        "originalText": "example",
        "postId": "example",
        "resolvedBy": "example",
        "status": "PENDING",
        "suggestedText": "example",
        "teamOnly": true
      }
    ],
    "pagination": {
      "hasMore": true,
      "limit": 1,
      "offset": 1
    }
  }
}
```

### List uploaded media

List uploaded media.

**Inputs**

- Workspace (`workspace_id`, text, required): Workspace id.
- Deletable (`deletable`, text): Deletable. One of: `true`, `false`.
- Offset (`offset`, number): Offset.
- Limit (`limit`, number): Limit.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": [
      {
        "createdAt": "example",
        "height": 1,
        "id": "example",
        "mimeType": "example",
        "name": "example",
        "size": 1,
        "status": "uploading",
        "thumbnailUrl": "example",
        "type": "image",
        "url": "example",
        "width": 1,
        "workspaceId": "example"
      }
    ],
    "pagination": {
      "hasMore": true,
      "limit": 1,
      "offset": 1
    }
  }
}
```

### List workspace labels

List workspace labels.

**Inputs**

- Workspace (`workspace_id`, text, required): Workspace id.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": [
      {
        "color": "example",
        "id": "example",
        "name": "example"
      }
    ]
  }
}
```

### List workspace members

List workspace members.

**Inputs**

- Workspace (`workspace_id`, text, required): Workspace id.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": [
      {
        "approvalLevelIds": [
          "example"
        ],
        "avatarUrl": "example",
        "email": "example",
        "id": "example",
        "isApprover": true,
        "membership": "example",
        "name": "example",
        "permissions": [
          "example"
        ]
      }
    ]
  }
}
```

### List workspaces

List workspaces.

**Inputs**: None.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": [
      {
        "approvalSettings": {},
        "companyId": "example",
        "createdAt": "example",
        "defaultTeamOnlyPosts": true,
        "hideEmailsFromClients": true,
        "id": "example",
        "labels": [
          {}
        ],
        "name": "example",
        "timezone": "example",
        "updatedAt": "example",
        "websiteUrl": "example"
      }
    ]
  }
}
```

### Update a campaign

Update a campaign.

**Inputs**

- Campaign ID (`campaign_id`, text, required): Campaign id.
- Name (`name`, text): Name.
- Status (`status`, text): Status. One of: `active`, `archived`, `paused`, `planned`, `completed`.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "data": {
      "color": "example",
      "createdAt": "example",
      "description": "example",
      "endedAt": "example",
      "icon": "star",
      "id": "example",
      "links": [
        {}
      ],
      "name": "example",
      "startedAt": "example",
      "status": "active",
      "workspaceId": "example"
    }
  }
}
```
