Article
From Template to Live Project with Smartsheet API
Link copied
Mastering Smartsheet API series — part 7
This post is part of the Mastering Smartsheet API series, a practical companion to the Smartsheet API documentation.
New learning blogs drop regularly — join the Builders Community group in the Smartsheet Community and click Follow → Include in Email Digest to get each new blogpost delivered straight to your inbox via the weekly digest.
A deal closes in your CRM. Somewhere, a project manager opens Smartsheet, finds the project template, copies it, renames it, shares it with the delivery team, and types start dates and durations into thirty tasks. Half an hour later the project exists. Next week there are four more deals.
The point isn’t the half hour. “Save as New” in the UI is fast too. What the API gives you is three things the UI can’t: the project is created by the system where the work starts, not by a person who remembers to do it; the plan is built from that system’s data, so a three-week onboarding and a six-month rollout come from the same template; and every project comes out the same shape, which is what makes the reporting on top of it trustworthy.
If your projects are set up by a PMO from a fixed blueprint, Control Center already does this without code. Reach for the API when the project starts in another system, or when the plan has to be built from that system’s data.
Every post in this series so far has worked with a sheet that already existed: reading it, writing to it, validating what goes in. This one creates. By the end you’ll have a script that turns a template and a closed deal into a live project with a working schedule, and a clear rule for what belongs in the template and what belongs in your code.
Design it once, in the UI
The most useful thing to know about setting up projects with the API is how much the template does for you. Columns, types and dropdown options, automations, forms, filters, and project settings come with it. You don’t rebuild them with code.
Project settings are the clearest example. We created a sheet through the API from a project-plan template, and it arrived with Start, Finish, Duration and Predecessors already wired together as a dependency-enabled schedule. No extra call. The columns even carry tags that say what they are:
Tag | Column |
|---|---|
GANTT_START_DATE | Start |
GANTT_END_DATE | Finish |
GANTT_DURATION | Duration |
GANTT_PREDECESSOR | Predecessors |
GANTT_PERCENT_COMPLETE | % Complete |
So the split is simple. Anything that’s the same for every project lives in the template, where the people who own the process can change it without touching code. Anything that’s different for each project (its name, its dates, its tasks, its team) is what your script fills in.
Create the project
Two calls: a workspace for the project, then the plan sheet inside it, created from your template. The second response gives you the new sheet’s ID directly.
Python import os import requests API = "https://api.smartsheet.com/2.0" HEADERS = { "Authorization": f"Bearer {os.environ['SMARTSHEET_ACCESS_TOKEN']}", "Content-Type": "application/json", } def api(method, path, **kwargs): response = requests.request(method, f"{API}{path}", headers=HEADERS, **kwargs) response.raise_for_status() return response.json() def create_project(name, template_id): """Create a workspace for the project and its plan sheet from a template. Returns (workspace_id, sheet_id).""" workspace = api("POST", "/workspaces", json={"name": f"{name} — Onboarding"})["result"] sheet = api( "POST", f"/workspaces/{workspace['id']}/sheets", params={"include": "rules,ruleRecipients,forms,filters"}, json={"name": f"{name} — Project Plan", "fromId": template_id}, )["result"] return workspace["id"], sheet["id"]
include decides what comes along besides the structure: automations (rules and ruleRecipients), forms, filters, and optionally data, attachments, discussions and cell links. Pick only what every project needs.
When one sheet isn’t enough. If a project in your organization is a whole set of things (a plan, a RAID log, a status report, a dashboard), copy a template workspace instead with POST /workspaces/{workspaceId}/copy. Its include parameter covers the same elements plus shares and brand, and cell links, reports, sheet hyperlinks and dashboards are re-mapped to the new copies unless you opt out with skipRemap, so the dashboard in the copy points at the copy’s sheets. The copy response returns only the new workspace, so list its contents with GET /workspaces/{workspaceId}/children to find the sheets inside. Everything from here on works the same way on those sheets.
Find the project columns by tag, not by ID
Part 2 made the case for column IDs over titles, and that still holds. But every sheet created from a template is a new sheet with its own column IDs. We created two sheets from the same template and every column ID was different. So don’t hardcode IDs from the template; look them up once per new sheet.
For the schedule columns, the tags are even better than titles: someone can rename “Start” to “Kickoff date” in the template and your code still finds it.
Python PROJECT_TAGS = { "GANTT_START_DATE": "start", "GANTT_DURATION": "duration", "GANTT_PREDECESSOR": "predecessors", } def project_columns(sheet_id): columns = api("GET", f"/sheets/{sheet_id}/columns")["data"] found = {"task": next(c["id"] for c in columns if c.get("primary"))} for column in columns: for tag in column.get("tags") or []: if tag in PROJECT_TAGS: found[PROJECT_TAGS[tag]] = column["id"] missing = set(PROJECT_TAGS.values()) - found.keys() if missing: raise RuntimeError( f"No {sorted(missing)} column found. " "Check that dependencies are enabled in the template's project settings." ) return found
If this raises, the fix is in the template, not in the script.
Build the plan from the deal
In a real integration the plan isn’t hardcoded. It comes from the event that started the project: the products on the deal, the size of the rollout, the region. Two deals, two different plans, one template.
Describe the building blocks as data. Each task has a key, a duration, and optionally the task it comes after:
Python KICKOFF_PHASE = {"phase": "Kickoff", "tasks": [ {"key": "kickoff", "name": "Kickoff meeting", "duration": "1d"}, {"key": "scope", "name": "Confirm scope", "duration": "3d", "after": "kickoff"}, ]} PHASES_BY_PRODUCT = { "Core": {"phase": "Core setup", "tasks": [ {"key": "core_build", "name": "Configure workspace", "duration": "5d", "after": "scope"}, {"key": "core_review", "name": "Client review", "duration": "2d", "after": "core_build", "lag_days": 1}, ]}, "Integrations": {"phase": "Integrations", "tasks": [ {"key": "int_build", "name": "Build integrations", "duration": "10d", "after": "scope"}, {"key": "int_test", "name": "Test with client data", "duration": "3d", "after": "int_build"}, ]}, } def plan_for(deal): """Every project starts with kickoff, then one phase per product sold.""" return [KICKOFF_PHASE] + [PHASES_BY_PRODUCT[p] for p in deal["products"]]
On a dependency-enabled sheet, Smartsheet does the date arithmetic. Your job is to give it the inputs it expects, and the rules are strict. We tested each of these on a live sheet:
What you send | What happens |
|---|---|
Start + Duration ( "3d" ) on a task | Works Finish is calculated for you |
A Finish date | Error 1080 End dates on dependency-enabled sheets can't be written. Send Start or Duration instead |
A start date on a phase (parent) row | Silently ignored Parent rows roll up from their children, and the request still returns success |
A predecessor as objectValue with a row ID | Works A real dependency. The task's start is calculated from its predecessor |
A predecessor as plain text, like "2FS" | Silently ignored Stored as text. No dependency, no calculated dates, and the request still returns success |
A task with neither a Start nor a predecessor | No dates The task gets no dates at all |
Two of those return success without doing what you meant, which is the same lesson as Part 2 and Part 6: a 200 is not proof. Check what the sheet actually holds.
The last row tells you the shape of the plan: the first task in a chain gets a start date, and every other task gets a predecessor. Since a predecessor needs the row ID of the task it depends on, and you only get row IDs after the rows exist, this takes two passes:
Python def build_plan(sheet_id, cols, start_date, plan): # Pass 1a: phases. Name only. Their dates roll up from their tasks. phase_rows = api("POST", f"/sheets/{sheet_id}/rows", json=[ {"toBottom": True, "cells": [{"columnId": cols["task"], "value": p["phase"]}]} for p in plan ])["result"] # Pass 1b: tasks under each phase. One call per phase, # because every row in a call must use the same location (mixing parents returns error 1123). row_ids = {} for phase, phase_row in zip(plan, phase_rows): rows = [] for task in phase["tasks"]: cells = [ {"columnId": cols["task"], "value": task["name"]}, {"columnId": cols["duration"], "value": task["duration"]}, ] if "after" not in task: cells.append({"columnId": cols["start"], "value": start_date}) rows.append({"parentId": phase_row["id"], "toBottom": True, "cells": cells}) added = api("POST", f"/sheets/{sheet_id}/rows", json=rows)["result"] for task, row in zip(phase["tasks"], added): row_ids[task["key"]] = row["id"] # Pass 2: dependencies, now that every task has a row ID. updates = [] for phase in plan: for task in phase["tasks"]: if "after" in task: updates.append({"id": row_ids[task["key"]], "cells": [{ "columnId": cols["predecessors"], "objectValue": { "objectType": "PREDECESSOR_LIST", "predecessors": [{ "rowId": row_ids[task["after"]], "type": "FS", "lag": {"objectType": "DURATION", "days": task.get("lag_days", 0)}, }], }, }]})` if updates: api("PUT", f"/sheets/{sheet_id}/rows", json=updates) return row_ids
We ran this plan for a deal with both products and one start date, December 1. This is what Smartsheet calculated:
Task | Start | Finish | Predecessors |
|---|---|---|---|
Kickoff | Dec 1 | Dec 4 | |
Kickoff meeting | Dec 1 | Dec 1 | |
Confirm scope | Dec 2 | Dec 4 | 2FS |
Core setup | Dec 5 | Dec 12 | |
Configure workspace | Dec 5 | Dec 9 | 3FS |
Client review | Dec 11 | Dec 12 | 5FS +1d |
| Integrations | Dec 5 | Dec 17 | |
| Build integrations | Dec 5 | Dec 14 | 3FS |
| Test with client data | Dec 15 | Dec 17 | 8FS |
Phase rows are shaded and roll up from their tasks.
The same plan in Gantt view: one start date, two product phases running in parallel, and the one-day lag before the client review.
One date in, a whole schedule out. Both product phases start as soon as scope is confirmed and run in parallel, the one-day lag before the client review is there, and the phase rows rolled up on their own.
A few notes on the details:
- Send durations as text in the form Smartsheet displays them, such as “3d”.
- Type can be FS, SS, FF or SF, and lag is a duration object: FS with days: 1 is what shows up as 5FS +1d above.
- The calendar comes from the template. Working days and non-working days are project settings. The template we used treats weekends as working days, which is why some tasks above start on a Saturday. Yours will follow its own settings.
- Large plans: the same 500-row limit and chunking from Part 5 apply. A typical project template is well under it.
Putting it together
Python def create_project_from_deal(deal, template_id): workspace_id, sheet_id = create_project(deal["name"], template_id) cols = project_columns(sheet_id) build_plan(sheet_id, cols, deal["start_date"], plan_for(deal)) return workspace_id, sheet_id deal = {"name": "Acme Corp", "products": ["Core", "Integrations"], "start_date": "2026-12-01"} create_project_from_deal(deal, template_id=1234567890123456)
Create, look up the columns, build. Wire it to the event that starts a project (a closed deal, an approved request, a submitted intake form) and every project starts the same way, with a schedule that already reflects what was sold.
The last step is the team. Sharing goes through one endpoint for every asset type: POST /shares, with assetType=workspace and the workspace ID as query parameters, and a body with accessLevel plus either a groupId or an email. Share with a group rather than with people one by one, so that when the team changes, you change the group, not every project. sendEmail defaults to false, so nobody gets a notification unless you ask for one.
And because every project has the same structure, the next step is easy: one report or dashboard across all of them, or an AI assistant connected through the Smartsheet MCP Server that can answer “which onboarding projects are slipping?” without anyone cleaning up the data first.
Symptom to cause
What you see | Likely cause | Fix |
|---|---|---|
Error 1080 | Writing a Finish date on a dependency-enabled sheet | Write Start and Duration instead |
Predecessor shows "2FS" but nothing moves | Written as value, stored as text | Write it as objectValue with a row ID |
A task has no dates | No Start and no predecessor | Give the first task in each chain a Start |
A phase date won't change | Parent rows roll up from their tasks | Change the tasks, not the phase |
No start, duration or predecessor column found | Dependencies aren't enabled in the template | Enable them in the template's project settings |
Code that worked on one project fails on the next | Column IDs hardcoded from another sheet | Look them up per sheet, by tag |
| Dates land on weekends, or a day off | The template's working days | Check the template's project settings |
What this post doesn’t cover
Building the template itself, and editing automations through the API. And we deliberately kept project settings in the template rather than setting them per sheet: it’s one place to change them, and every new sheet gets them for free.
The project setup checklist
Template:
- Columns, dropdown options, automations and forms live in the template
- Dependencies are enabled in the template’s project settings, with the right working days
Create:
- One workspace per project, with the plan created from the template inside it
- include lists only what every project needs
- Column IDs are looked up per new sheet, using tags for the schedule columns
Plan:
- The plan is built from the triggering event’s data, not hardcoded
- The first task in each chain has a Start; every other task has a predecessor
- Durations are sent as text, like “3d”
- Predecessors are written as objectValue with row IDs, never as text
- No Finish dates and no dates on phase rows
- The result is read back, not inferred from a 200
Sharing:
- Shared with a group, not person by person
What do you set up today by copying and renaming by hand? Tell us in the comments. We’d like to know which templates people rebuild most.
Catch up on the series
Part 1 — Zero to API: Your First Successful Smartsheet Integration in 30 Minutes
Part 2 — The Smartsheet Data Model: What Every Developer Needs to Know
Part 3 — Authentication Mastery with Smartsheet API
Part 4 — Rate Limits, Retry Logic & Error Handling with Smartsheet API
Part 5 — Bulk Operations at Scale with Smartsheet API
Part 6 — Cell Types and Data Validation with Smartsheet API
New learning blogs drop regularly — join the Builders Community group in the Smartsheet Community and click Follow → Include in Email Digest to get each new blogpost delivered straight to your inbox via the weekly digest.
This post is part of the Mastering Smartsheet API series, designed as a practical companion to the Smartsheet API documentation. For questions, visit the Smartsheet Community or the developer forum.
Link copied