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
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.
| Input | Type | Description | |
|---|---|---|---|
workspace_id | string | Required | Workspace ID. Must be lowercase, e.g. 8a8b8c8d8e8f8g8i (from list_workspaces) |
model_id | string | Required | Model ID. Must be UPPERCASE, e.g. 75A40874E6B64FA3AE0743278996850F (from list_models) |
list_id | string | Required | List ID (from list_lists) |
items | array of object | Required | Items to add |
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.
| Input | Type | Description | |
|---|---|---|---|
workspace_id | string | Required | Workspace ID. Must be lowercase, e.g. 8a8b8c8d8e8f8g8i (from list_workspaces) |
model_id | string | Required | Model ID. Must be UPPERCASE, e.g. 75A40874E6B64FA3AE0743278996850F (from list_models) |
list_id | string | Required | List ID (from list_lists) |
items | array of object | Required | Items to delete, each {id} or {code} |
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.
| Input | Type | Description | |
|---|---|---|---|
workspace_id | string | Required | Workspace ID. Must be lowercase, e.g. 8a8b8c8d8e8f8g8i (from list_workspaces) |
model_id | string | Required | Model ID. Must be UPPERCASE, e.g. 75A40874E6B64FA3AE0743278996850F (from list_models) |
file_id | string | Required | File ID, e.g. the objectId of a finished export task |
chunk_id | string | Required | Chunk ID, starting at 0 |
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.
| Input | Type | Description | |
|---|---|---|---|
workspace_id | string | Required | Workspace ID. Must be lowercase, e.g. 8a8b8c8d8e8f8g8i (from list_workspaces) |
model_id | string | Required | Model ID. Must be UPPERCASE, e.g. 75A40874E6B64FA3AE0743278996850F (from list_models) |
kind | string | Required | Which kind of definition the task belongs to |
definition_id | string | Required | The export, import, process or action ID the task was started for |
task_id | string | Required | Task ID returned when the task was started |
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.
| Input | Type | Description | |
|---|---|---|---|
workspace_id | string | Required | Workspace ID. Must be lowercase, e.g. 8a8b8c8d8e8f8g8i (from list_workspaces) |
model_id | string | Required | Model ID. Must be UPPERCASE, e.g. 75A40874E6B64FA3AE0743278996850F (from list_models) |
kind | string | Required | Which definitions to list |
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.
| Input | Type | Description | |
|---|---|---|---|
workspace_id | string | Required | Workspace ID. Must be lowercase, e.g. 8a8b8c8d8e8f8g8i (from list_workspaces) |
model_id | string | Required | Model ID. Must be UPPERCASE, e.g. 75A40874E6B64FA3AE0743278996850F (from list_models) |
file_id | string | Required | File ID, e.g. the objectId of a finished export task |
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.
| Input | Type | Description | |
|---|---|---|---|
workspace_id | string | Required | Workspace ID. Must be lowercase, e.g. 8a8b8c8d8e8f8g8i (from list_workspaces) |
model_id | string | Required | Model ID. Must be UPPERCASE, e.g. 75A40874E6B64FA3AE0743278996850F (from list_models) |
list_id | string | Required | List ID (from list_lists) |
include_all | boolean | Optional | Also return properties, subsets and selective-access fields |
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.
| Input | Type | Description | |
|---|---|---|---|
workspace_id | string | Required | Workspace ID. Must be lowercase, e.g. 8a8b8c8d8e8f8g8i (from list_workspaces) |
model_id | string | Required | Model ID. Must be UPPERCASE, e.g. 75A40874E6B64FA3AE0743278996850F (from list_models) |
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.
| Input | Type | Description | |
|---|---|---|---|
workspace_id | string | Required | Workspace ID. Must be lowercase, e.g. 8a8b8c8d8e8f8g8i (from list_workspaces) |
limit | integer | Optional | Maximum number of models to return |
offset | integer | Optional | Index of the first model to return |
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.
| Input | Type | Description | |
|---|---|---|---|
model_id | string | Required | Model ID. Must be UPPERCASE, e.g. 75A40874E6B64FA3AE0743278996850F (from list_models) |
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.
| Input | Type | Description | |
|---|---|---|---|
model_id | string | Required | Model ID. Must be UPPERCASE, e.g. 75A40874E6B64FA3AE0743278996850F (from list_models) |
include_subsidiary_views | boolean | Optional | Also include unsaved subsidiary views |
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.
| Input | Type | Description | |
|---|---|---|---|
tenant_details | boolean | Optional | Also return each workspace's current size and size allowance |
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.
| Input | Type | Description | |
|---|---|---|---|
model_id | string | Required | Model ID. Must be UPPERCASE, e.g. 75A40874E6B64FA3AE0743278996850F (from list_models) |
view_id | string | Required | View ID (from list_views), or a line item ID |
pages | array of string | Optional | Page selectors as dimensionId:itemId, e.g. 101000000026:330000000028 |
max_rows | integer | Optional | Limit the number of rows returned |
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.
| Input | Type | Description | |
|---|---|---|---|
workspace_id | string | Required | Workspace ID. Must be lowercase, e.g. 8a8b8c8d8e8f8g8i (from list_workspaces) |
model_id | string | Required | Model ID. Must be UPPERCASE, e.g. 75A40874E6B64FA3AE0743278996850F (from list_models) |
export_id | string | Required | The export ID (from list_definitions) |
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.
| Input | Type | Description | |
|---|---|---|---|
workspace_id | string | Required | Workspace ID. Must be lowercase, e.g. 8a8b8c8d8e8f8g8i (from list_workspaces) |
model_id | string | Required | Model ID. Must be UPPERCASE, e.g. 75A40874E6B64FA3AE0743278996850F (from list_models) |
process_id | string | Required | Process ID (from list_definitions with kind processes) |
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.
| Input | Type | Description | |
|---|---|---|---|
workspace_id | string | Required | Workspace ID. Must be lowercase, e.g. 8a8b8c8d8e8f8g8i (from list_workspaces) |
model_id | string | Required | Model ID. Must be UPPERCASE, e.g. 75A40874E6B64FA3AE0743278996850F (from list_models) |
list_id | string | Required | List ID (from list_lists) |
items | array of object | Required | Items to update |
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.
| Input | Type | Description | |
|---|---|---|---|
model_id | string | Required | Model ID. Must be UPPERCASE, e.g. 75A40874E6B64FA3AE0743278996850F (from list_models) |
module_id | string | Required | Module ID (from list_modules) |
cells | array of object | Required | Cells 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. |
await setu.execute({
userId: "user_1",
action: "anaplan.write_cells",
input: {
"model_id": "<model_id>",
"module_id": "<module_id>",
"cells": []
},
});