Skip to content

Docs

import_content

Import a Buffer, Typefully, Hootsuite or Postiz export, or a CSV, into this workspace: each item becomes content on the board (Idea, Drafting or In review) with its text as the original draft, its tags as campaigns, its date as a planning date, and a draft post for each channel it names that has a connected account. Nothing is ever scheduled or published on import: a person schedules the drafts later. Call preview_import first and show the person what will be created and skipped. The whole file imports or nothing does. Idempotent per file and options: the same file with the same format, `defaultChannelAccountId` and `includePublished` creates nothing and returns the earlier import (`alreadyImported: true`). With other options it imports again, skipping items already imported (from any file), so turning on includePublished brings in only the published items; an item without its own channel imported with another default channel counts as new. Formats and limits: as in preview_import. Free: imports never cost credits.

Import a Buffer, Typefully, Hootsuite or Postiz export, or a CSV, into this workspace: each item becomes content on the board (Idea, Drafting or In review) with its text as the original draft, its tags as campaigns, its date as a planning date, and a draft post for each channel it names that has a connected account. Nothing is ever scheduled or published on import: a person schedules the drafts later. Call preview_import first and show the person what will be created and skipped. The whole file imports or nothing does. Idempotent per file and options: the same file with the same format, defaultChannelAccountId and includePublished creates nothing and returns the earlier import (alreadyImported: true). With other options it imports again, skipping items already imported (from any file), so turning on includePublished brings in only the published items; an item without its own channel imported with another default channel counts as new. Formats and limits: as in preview_import. Free: imports never cost credits.

Access and cost

  • Kind: mutation
  • Scope: workspace
  • Actors: member, agent
  • Credits: Free
  • Requires confirmation: false
  • Accepts idempotency key: false

Input schema

{
  "properties": {
    "workspaceId": {
      "format": "uuid",
      "type": "string"
    },
    "content": {
      "type": "string"
    },
    "format": {
      "default": "auto",
      "enum": [
        "auto",
        "csv",
        "buffer",
        "buffer_insights",
        "typefully",
        "hootsuite",
        "postiz"
      ],
      "type": "string"
    },
    "fileName": {
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "defaultChannelAccountId": {
      "format": "uuid",
      "type": "string"
    },
    "includePublished": {
      "default": false,
      "type": "boolean"
    }
  },
  "required": [
    "workspaceId",
    "content"
  ],
  "type": "object"
}

Output schema

{
  "additionalProperties": false,
  "properties": {
    "import": {
      "additionalProperties": false,
      "properties": {
        "id": {
          "format": "uuid",
          "type": "string"
        },
        "fileName": {
          "type": [
            "string",
            "null"
          ]
        },
        "format": {
          "enum": [
            "csv",
            "buffer",
            "buffer_insights",
            "typefully",
            "hootsuite",
            "postiz"
          ],
          "type": "string"
        },
        "formatLabel": {
          "type": "string"
        },
        "rowCount": {
          "type": "integer"
        },
        "createdCount": {
          "type": "integer"
        },
        "skippedCount": {
          "type": "integer"
        },
        "postCount": {
          "type": "integer"
        },
        "createdAt": {
          "format": "date-time",
          "type": "string"
        },
        "createdByAccountId": {
          "anyOf": [
            {
              "format": "uuid",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "createdByAgentClientId": {
          "anyOf": [
            {
              "format": "uuid",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "defaultChannelAccountId": {
          "anyOf": [
            {
              "format": "uuid",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "includePublished": {
          "type": "boolean"
        }
      },
      "required": [
        "id",
        "fileName",
        "format",
        "formatLabel",
        "rowCount",
        "createdCount",
        "skippedCount",
        "postCount",
        "createdAt",
        "createdByAccountId",
        "createdByAgentClientId",
        "defaultChannelAccountId",
        "includePublished"
      ],
      "type": "object"
    },
    "alreadyImported": {
      "type": "boolean"
    },
    "rows": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "row": {
            "minimum": 1,
            "type": "integer"
          },
          "action": {
            "enum": [
              "create",
              "skip"
            ],
            "type": "string"
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "title": {
            "type": "string"
          },
          "excerpt": {
            "type": "string"
          },
          "status": {
            "enum": [
              "idea",
              "drafting",
              "in_review"
            ],
            "type": "string"
          },
          "plannedFor": {
            "type": [
              "string",
              "null"
            ]
          },
          "labels": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "channels": {
            "items": {
              "additionalProperties": false,
              "properties": {
                "name": {
                  "type": "string"
                },
                "platform": {
                  "anyOf": [
                    {
                      "enum": [
                        "x",
                        "linkedin",
                        "threads",
                        "bluesky",
                        "instagram",
                        "facebook",
                        "tiktok",
                        "youtube",
                        "sandbox"
                      ],
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "channelAccountId": {
                  "anyOf": [
                    {
                      "format": "uuid",
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "handle": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "issue": {
                  "anyOf": [
                    {
                      "additionalProperties": false,
                      "properties": {
                        "label": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "label",
                        "message"
                      ],
                      "type": "object"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "name",
                "platform",
                "channelAccountId",
                "handle",
                "issue"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "warnings": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "pieceId": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "row",
          "action",
          "reason",
          "title",
          "excerpt",
          "status",
          "plannedFor",
          "labels",
          "channels",
          "warnings",
          "pieceId"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "summary": {
      "additionalProperties": false,
      "properties": {
        "rows": {
          "type": "integer"
        },
        "create": {
          "type": "integer"
        },
        "skip": {
          "type": "integer"
        },
        "posts": {
          "type": "integer"
        }
      },
      "required": [
        "rows",
        "create",
        "skip",
        "posts"
      ],
      "type": "object"
    },
    "pieceIds": {
      "items": {
        "format": "uuid",
        "type": "string"
      },
      "type": "array"
    }
  },
  "required": [
    "import",
    "alreadyImported",
    "rows",
    "summary",
    "pieceIds"
  ],
  "type": "object"
}

Errors

[
  "invalid_file",
  "file_too_large",
  "too_many_rows"
]

Annotations

{
  "destructiveHint": false,
  "idempotentHint": true,
  "openWorldHint": false,
  "readOnlyHint": false,
  "title": "Import content"
}