Setu Recipes: reusable digital workers across every app.Browse templates

Integrations / Anaplan

Anaplan

Connected planning: read Anaplan workspaces, models, views and lists, write cells and list items, and run exports and processes.

17 actions token_login 11 read5 write1 destructive Calls api.anaplan.com

Connect

TypeScript
const conn = await setu.connections.initiate({ userId: "user_1", toolkit: "anaplan" });
console.log(conn.connectUrl); // show this to your user
await conn.waitUntilActive();

Permissions requested

This toolkit uses a single credential and requests no scopes.

Actions

Add list itemswriteanaplan.add_list_itemsAdd items to an Anaplan list (up to 100,000 per call). Each item has a name (not allowed on numbered lists), optional code, parent name, custom properties and subsets. Duplicate names or codes are rejected and reported in failures. Requires the Workspace Administrator role.
InputTypeDescription
workspace_idstringRequiredWorkspace ID. Must be lowercase, e.g. 8a8b8c8d8e8f8g8i (from list_workspaces)
model_idstringRequiredModel ID. Must be UPPERCASE, e.g. 75A40874E6B64FA3AE0743278996850F (from list_models)
list_idstringRequiredList ID (from list_lists)
itemsarray of objectRequiredItems to add
TypeScript
await setu.execute({
  userId: "user_1",
  action: "anaplan.add_list_items",
  input: {
    "workspace_id": "<workspace_id>",
    "model_id": "<model_id>",
    "list_id": "<list_id>",
    "items": []
  },
});
Delete list itemsdestructiveanaplan.delete_list_itemsPermanently delete items from an Anaplan list (up to 100,000 per call), identified by id or code. This removes the items and the data tied to them. Requires the Workspace Administrator role.
InputTypeDescription
workspace_idstringRequiredWorkspace ID. Must be lowercase, e.g. 8a8b8c8d8e8f8g8i (from list_workspaces)
model_idstringRequiredModel ID. Must be UPPERCASE, e.g. 75A40874E6B64FA3AE0743278996850F (from list_models)
list_idstringRequiredList ID (from list_lists)
itemsarray of objectRequiredItems to delete, each {id} or {code}
TypeScript
await setu.execute({
  userId: "user_1",
  action: "anaplan.delete_list_items",
  input: {
    "workspace_id": "<workspace_id>",
    "model_id": "<model_id>",
    "list_id": "<list_id>",
    "items": []
  },
  confirm: true,
});
Get file chunkreadanaplan.get_file_chunkDownload one chunk of a file (for example an export result) as raw text, usually CSV. Large files have several chunks; list them with list_file_chunks and read each in turn.
InputTypeDescription
workspace_idstringRequiredWorkspace ID. Must be lowercase, e.g. 8a8b8c8d8e8f8g8i (from list_workspaces)
model_idstringRequiredModel ID. Must be UPPERCASE, e.g. 75A40874E6B64FA3AE0743278996850F (from list_models)
file_idstringRequiredFile ID, e.g. the objectId of a finished export task
chunk_idstringRequiredChunk ID, starting at 0
TypeScript
await setu.execute({
  userId: "user_1",
  action: "anaplan.get_file_chunk",
  input: {
    "workspace_id": "<workspace_id>",
    "model_id": "<model_id>",
    "file_id": "<file_id>",
    "chunk_id": "<chunk_id>"
  },
});
Get task statusreadanaplan.get_taskCheck the status of a running export, import, process or action task: taskState (NOT_STARTED, IN_PROGRESS, COMPLETE, CANCELLING, CANCELLED), progress and result (successful, objectId, details). COMPLETE means finished, successful or not. Poll no more than once every 5 seconds.
InputTypeDescription
workspace_idstringRequiredWorkspace ID. Must be lowercase, e.g. 8a8b8c8d8e8f8g8i (from list_workspaces)
model_idstringRequiredModel ID. Must be UPPERCASE, e.g. 75A40874E6B64FA3AE0743278996850F (from list_models)
kindstringRequiredWhich kind of definition the task belongs to
definition_idstringRequiredThe export, import, process or action ID the task was started for
task_idstringRequiredTask ID returned when the task was started
TypeScript
await setu.execute({
  userId: "user_1",
  action: "anaplan.get_task",
  input: {
    "workspace_id": "<workspace_id>",
    "model_id": "<model_id>",
    "kind": "<kind>",
    "definition_id": "<definition_id>",
    "task_id": "<task_id>"
  },
});
List imports, exports, processes or actionsreadanaplan.list_definitionsList the import, export, process or model action definitions in an Anaplan model with their IDs. Choose kind: exports, imports, processes or actions. Processes come back as a plain list, the others wrapped in an object. You can only see ones your model role allows.
InputTypeDescription
workspace_idstringRequiredWorkspace ID. Must be lowercase, e.g. 8a8b8c8d8e8f8g8i (from list_workspaces)
model_idstringRequiredModel ID. Must be UPPERCASE, e.g. 75A40874E6B64FA3AE0743278996850F (from list_models)
kindstringRequiredWhich definitions to list
TypeScript
await setu.execute({
  userId: "user_1",
  action: "anaplan.list_definitions",
  input: {
    "workspace_id": "<workspace_id>",
    "model_id": "<model_id>",
    "kind": "<kind>"
  },
});
List file chunksreadanaplan.list_file_chunksList the chunk IDs of a file, such as the file an export produced (task result.objectId). Then read each chunk with get_file_chunk.
InputTypeDescription
workspace_idstringRequiredWorkspace ID. Must be lowercase, e.g. 8a8b8c8d8e8f8g8i (from list_workspaces)
model_idstringRequiredModel ID. Must be UPPERCASE, e.g. 75A40874E6B64FA3AE0743278996850F (from list_models)
file_idstringRequiredFile ID, e.g. the objectId of a finished export task
TypeScript
await setu.execute({
  userId: "user_1",
  action: "anaplan.list_file_chunks",
  input: {
    "workspace_id": "<workspace_id>",
    "model_id": "<model_id>",
    "file_id": "<file_id>"
  },
});
List list itemsreadanaplan.list_list_itemsRead the items of an Anaplan list (id, name, code, parent), optionally with custom properties and subsets. At most 1,000,000 records. Requires the Workspace Administrator role.
InputTypeDescription
workspace_idstringRequiredWorkspace ID. Must be lowercase, e.g. 8a8b8c8d8e8f8g8i (from list_workspaces)
model_idstringRequiredModel ID. Must be UPPERCASE, e.g. 75A40874E6B64FA3AE0743278996850F (from list_models)
list_idstringRequiredList ID (from list_lists)
include_allbooleanOptionalAlso return properties, subsets and selective-access fields
TypeScript
await setu.execute({
  userId: "user_1",
  action: "anaplan.list_list_items",
  input: {
    "workspace_id": "<workspace_id>",
    "model_id": "<model_id>",
    "list_id": "<list_id>"
  },
});
List listsreadanaplan.list_listsList the lists (dimensions such as products or regions) in an Anaplan model with their IDs and names.
InputTypeDescription
workspace_idstringRequiredWorkspace ID. Must be lowercase, e.g. 8a8b8c8d8e8f8g8i (from list_workspaces)
model_idstringRequiredModel ID. Must be UPPERCASE, e.g. 75A40874E6B64FA3AE0743278996850F (from list_models)
TypeScript
await setu.execute({
  userId: "user_1",
  action: "anaplan.list_lists",
  input: {
    "workspace_id": "<workspace_id>",
    "model_id": "<model_id>"
  },
});
List modelsreadanaplan.list_modelsList the Anaplan models in a workspace with their IDs (UPPERCASE) and state (UNLOCKED, ARCHIVED and so on). Non-administrators only see models they were given access to.
InputTypeDescription
workspace_idstringRequiredWorkspace ID. Must be lowercase, e.g. 8a8b8c8d8e8f8g8i (from list_workspaces)
limitintegerOptionalMaximum number of models to return
offsetintegerOptionalIndex of the first model to return
TypeScript
await setu.execute({
  userId: "user_1",
  action: "anaplan.list_models",
  input: {
    "workspace_id": "<workspace_id>"
  },
});
List modulesreadanaplan.list_modulesList the IDs and names of all modules in an Anaplan model. Module IDs are needed to write cells and to find line items. Requires the Workspace Administrator role.
InputTypeDescription
model_idstringRequiredModel ID. Must be UPPERCASE, e.g. 75A40874E6B64FA3AE0743278996850F (from list_models)
TypeScript
await setu.execute({
  userId: "user_1",
  action: "anaplan.list_modules",
  input: {
    "model_id": "<model_id>"
  },
});
List viewsreadanaplan.list_viewsList the saved views in an Anaplan model with their IDs and parent module IDs. A view ID is needed to read cell data. Requires the Workspace Administrator role.
InputTypeDescription
model_idstringRequiredModel ID. Must be UPPERCASE, e.g. 75A40874E6B64FA3AE0743278996850F (from list_models)
include_subsidiary_viewsbooleanOptionalAlso include unsaved subsidiary views
TypeScript
await setu.execute({
  userId: "user_1",
  action: "anaplan.list_views",
  input: {
    "model_id": "<model_id>"
  },
});
List workspacesreadanaplan.list_workspacesList the Anaplan workspaces the connected user can access, with their IDs (lowercase). Start here: other actions need a workspace ID.
InputTypeDescription
tenant_detailsbooleanOptionalAlso return each workspace's current size and size allowance
TypeScript
await setu.execute({
  userId: "user_1",
  action: "anaplan.list_workspaces",
  input: {},
});
Read view datareadanaplan.read_view_dataRead the cell values of a saved view (or a line item ID used as a view) as JSON: page selections, column coordinates and rows of cells. Cell values come back as strings. The view may hold at most 1,000,000 cells. Requires the Workspace Administrator role.
InputTypeDescription
model_idstringRequiredModel ID. Must be UPPERCASE, e.g. 75A40874E6B64FA3AE0743278996850F (from list_models)
view_idstringRequiredView ID (from list_views), or a line item ID
pagesarray of stringOptionalPage selectors as dimensionId:itemId, e.g. 101000000026:330000000028
max_rowsintegerOptionalLimit the number of rows returned
TypeScript
await setu.execute({
  userId: "user_1",
  action: "anaplan.read_view_data",
  input: {
    "model_id": "<model_id>",
    "view_id": "<view_id>"
  },
});
Run exportwriteanaplan.run_exportStart an Anaplan export by ID and return the task ID. It runs in the background: poll get_task (no more than every 5 seconds) until the state is COMPLETE and check result.successful. When it finishes, result.objectId is the file ID to download with list_file_chunks and get_file_chunk.
InputTypeDescription
workspace_idstringRequiredWorkspace ID. Must be lowercase, e.g. 8a8b8c8d8e8f8g8i (from list_workspaces)
model_idstringRequiredModel ID. Must be UPPERCASE, e.g. 75A40874E6B64FA3AE0743278996850F (from list_models)
export_idstringRequiredThe export ID (from list_definitions)
TypeScript
await setu.execute({
  userId: "user_1",
  action: "anaplan.run_export",
  input: {
    "workspace_id": "<workspace_id>",
    "model_id": "<model_id>",
    "export_id": "<export_id>"
  },
});
Run processwriteanaplan.run_processStart an Anaplan process (a saved sequence of imports, exports and other actions) by ID. It can change model data. It runs in the background: poll get_task (no more than every 5 seconds) with kind processes until COMPLETE and check result.successful.
InputTypeDescription
workspace_idstringRequiredWorkspace ID. Must be lowercase, e.g. 8a8b8c8d8e8f8g8i (from list_workspaces)
model_idstringRequiredModel ID. Must be UPPERCASE, e.g. 75A40874E6B64FA3AE0743278996850F (from list_models)
process_idstringRequiredProcess ID (from list_definitions with kind processes)
TypeScript
await setu.execute({
  userId: "user_1",
  action: "anaplan.run_process",
  input: {
    "workspace_id": "<workspace_id>",
    "model_id": "<model_id>",
    "process_id": "<process_id>"
  },
});
Update list itemswriteanaplan.update_list_itemsUpdate existing items of an Anaplan list (up to 100,000 per call). Identify each item by exactly one of id, code or name, and give the new code, parent, properties or subsets. Failures are reported per item. Requires the Workspace Administrator role.
InputTypeDescription
workspace_idstringRequiredWorkspace ID. Must be lowercase, e.g. 8a8b8c8d8e8f8g8i (from list_workspaces)
model_idstringRequiredModel ID. Must be UPPERCASE, e.g. 75A40874E6B64FA3AE0743278996850F (from list_models)
list_idstringRequiredList ID (from list_lists)
itemsarray of objectRequiredItems to update
TypeScript
await setu.execute({
  userId: "user_1",
  action: "anaplan.update_list_items",
  input: {
    "workspace_id": "<workspace_id>",
    "model_id": "<model_id>",
    "list_id": "<list_id>",
    "items": []
  },
});
Write cellswriteanaplan.write_cellsSet cell values in an Anaplan module (up to 100,000 cells or 15 MB per call). Each cell names its line item and one item per dimension, by ID or by name, plus the value. Calculated and aggregate cells cannot be written; per-cell problems come back in failures. Downstream calculations finish before it returns. Requires the Workspace Administrator role.
InputTypeDescription
model_idstringRequiredModel ID. Must be UPPERCASE, e.g. 75A40874E6B64FA3AE0743278996850F (from list_models)
module_idstringRequiredModule ID (from list_modules)
cellsarray of objectRequiredCells to write, each {lineItemId or lineItemName, dimensions: [{dimensionId or dimensionName, itemId or itemName or itemCode}], value}. Dates as YYYY-MM-DD, time periods as labels like Dec 20.
TypeScript
await setu.execute({
  userId: "user_1",
  action: "anaplan.write_cells",
  input: {
    "model_id": "<model_id>",
    "module_id": "<module_id>",
    "cells": []
  },
});