Bridge: Stuck! GET /users/{{inputs.userId}} Child Flow not running

I can't get my child CHILD WORKFLOW B (See Below) workflow to run. I've been on ChatGPT all day and it keeps making me run in circles.
It works GREAT up until Child workflow B. there is nothing in the run log showing why :(
WHAT I'M TRYING TO ACCOMPLISH: Should be fairly simple, right? Not for me. :)
- This Parent workflow gets all users,
- Child A publishes the user list and some details to a sheet (Email, Name, Status, Admin Boolean, etc),
- Child B publishes the other user details to the newly populated sheet with more user details (Company, Department, Title, locale, role, timezone, office phone, mobile phone).
How my workflows are all setup:
══════════════════════════════════════════════════════════════
PARENT WORKFLOW · “Parent-Users2Sheet”
══════════════════════════════════════════════════════════════
START
↓
Get Sheet – Find Column Info
→ Type: Get Sheet
→ Sheet: 4168714359361412
→ Results Per Page: 10000
→ Output: sheetId, columns[]
↓
Call API – Get Users List ALL
→ Type: Call API
→ Endpoint: GET /users
→ API profile: Smartsheet
→ Output: users[] (basic info only)
↓
JavaScript – UniversalUsersOnly (optional filter)
→ Input:
users: {{states.Get Users List ALL.call_api.make_api_call.response.data}}
→ Output: filteredUsers[]
↓
Run Child Workflow A – Insert users to sheet
→ Child : Child1-Users2Sheet
→ Number of Runs:
{{states.UniversalUsersOnly.javascript.run_script.chunked.length}}
→ Child Entity Values:
usersChunk: {{states.UniversalUsersOnly.javascript.run_script.chunked[run_index]}}
sheetId : {{states.Get Sheet-Find Column Info.smartsheet.get_sheet.sheet.id}}
↓
Get Sheet – Refresh Contacts Sheet (second pull)
→ Type: Get Sheet
→ Sheet: 4168714359361412
→ Results Per Page: 10000
→ Output: rows[], columns[] (now includes new rows)
↓
JavaScript – Child B Javascript-Map userId and rowId
→ Maps user.id ↔ rowId using “User ID” column
→ Script Parameters:
users : {{states.Get Users List ALL.call_api.make_api_call.response.data}}
columns : {{states.Get Sheet Round 2.smartsheet.get_sheet.sheet.columns}}
sheetRows : {{states.Get Sheet Round 2.smartsheet.get_sheet.sheet.rows}}
→ Output: {{javascript.run_script.result}} → array [{ userId, rowId }]
WHERE IT BREAKS
↓
Run Child Workflow B – Enrich user rows
→ Child : Child2-Users2Sheet
→ Number of Runs:
{{states.Child B Javascript-Map userId and rowId.javascript.run_script.result.length}}
→ Child Entity Values:
userId : {{states.Child B Javascript-Map userId and rowId.javascript.run_script.result[run_index].userId}}
rowId : {{states.Child B Javascript-Map userId and rowId.javascript.run_script.result[run_index].rowId}}
columns : {{states.Get Sheet Round 2.smartsheet.get_sheet.sheet.columns}}
sheetId : {{states.Get Sheet-Find Column Info.smartsheet.get_sheet.sheet.id}}
══════════════════════════════════════════════════════════════
WORKING: CHILD WORKFLOW A · “Child1-Users2Sheet” (bulk insert ≤ 500 rows)
══════════════════════════════════════════════════════════════
Trigger (inputs: usersChunk[], sheetId)
↓
Call API – POST /sheets/{{inputs.sheetId}}/rows
→ API profile: Smartsheet
→ HTTP Body : {{runtime.data}} (the usersChunk array)
══════════════════════════════════════════════════════════════
CHILD WORKFLOW B · “Child2-Users2Sheet” (per-user enrichment)
══════════════════════════════════════════════════════════════
Trigger (inputs: userId, rowId, columns[], sheetId)
↓
Call API – Get User Details
→ Endpoint: GET /users/{{inputs.userId}}
→ API profile: Smartsheet
→ Output: user
↓
JavaScript – Build Row Update Payload
→ Script Parameters:
user : {{states.Call API – Get User Details.call_api.make_api_call.response}}
columns : {{inputs.columns}}
rowId : {{inputs.rowId}}
→ Output: rowUpdateArray ( [ { id: rowId, cells:[ … ] } ] )
↓
Call API – PUT /sheets/{{inputs.sheetId}}/rows
→ API profile: Smartsheet
→ HTTP Body : {{states.Build Row Update Payload.javascript.run_script}}
==============
Script that runs just before Child B: MapUserIDstoRowIDs
/*************************************************************************
Build a lookup of sheet-row IDs keyed by the “User ID” cell value,
then emit an array that Child B can iterate over.
*************************************************************************/
const USER_ID_COL = "User ID";
/* 1 – build {title → columnId} map */
const columnMap = new Map(columns.map(c => [c.title, c.id]));
/* 2 – build {userId → rowId} map */
const rowIdByUserId = new Map();
for (const row of sheetRows) {
if (!row || typeof row.cells !== "object") continue;
const cell = row.cells[USER_ID_COL];
if (cell && cell.value != null) rowIdByUserId.set(String(cell.value), row.id);
}
/* 3 – return an array of {userId,rowId} for every match */
return users
.map(u => {
const rowId = rowIdByUserId.get(String(u.id));
return rowId ? { userId: u.id, rowId } : null;
})
.filter(Boolean);
I humbly summon my favorite Bridge Experts to this post—Alakazam! @SSFeatures , @Genevieve P. , @Brian_Richardson , @Paul Newcome, @Darren Mullen , @jmyzk_cloudsmart_jp, :) Thanks all!
-Neil
Best Answers
-
I figured it out. I fixed the # of runs to {{states.Child B Javascript-Map userId and rowId.javascript.run_script.result}}
For some reason ChatGPT had me adding .length to the end of that but Bridge didn't like it.
Thanks for offering to help!
-Neil
-
@NeilKY Glad you got it sorted. And yes… When you want it to run a variable number of times, you simply enter a reference to the array output. I usually hardcode 2 during testing and have at times forgotten to update it when ready to move into production. Haha.
Comments
-
-
What does the run log look like for the child workflow?
-
Oh, I should really have shared the logs! The child doesn't get triggered though, so there's no log for the child B.
Here's an small portion of the output from the Script that runs just before Child B, (Names changed to protect the innocent :)
[
{ "rowId": 574194234143613, "userId": 7095308258734416 },
{ "rowId": 8522119475412731, "userId": 9838654310024740 },
{ "rowId": 4310256606845314, "userId": 3038116492579540 },
{ "rowId": 1864853999035856, "userId": 6969760626435000 },
{ "rowId": 9924818951732936, "userId": 6546375919790400 },
{ "rowId": 4074573932403662, "userId": 9196624703288236 },
{ "rowId": 1137201986749378, "userId": 1323528651456544 },
{ "rowId": 8993181846420914, "userId": 2991738708360772 },
{ "rowId": 416955342272727, "userId": 7522877103420976 },
{ "rowId": 2044592590615228, "userId": 3786776985045028 },
{ "rowId": 2117606060626112, "userId": 2006992671743150 },
{ "rowId": 7683538698340254, "userId": 9806779577264400 },
{ "rowId": 818852701943948, "userId": 8512003584717176 },
{ "rowId": 2460758563743902, "userId": 4145172156050268 },
{ "rowId": 3256295931351112, "userId": 6760353078237964 }
]The CHILD B workflow doesn't even have a log :( Parent log looks like this:
-Neil
-
-
I figured it out. I fixed the # of runs to {{states.Child B Javascript-Map userId and rowId.javascript.run_script.result}}
For some reason ChatGPT had me adding .length to the end of that but Bridge didn't like it.
Thanks for offering to help!
-Neil
-
@NeilKY Glad you got it sorted. And yes… When you want it to run a variable number of times, you simply enter a reference to the array output. I usually hardcode 2 during testing and have at times forgotten to update it when ready to move into production. Haha.
-
I was trying to say to check the call limit, as if your organization has a large number of users, you can hit it. (Smartsheet API rate limit ~300 calls/min). Since each user triggers both GET /users and PUT /rows, we can batch the row updates in groups of 300 and add a 60-second sleep before the subsequent calls.
-
@jmyzk_cloudsmart_jp. You were 100% correct. I'm hitting the limit at about 350 users. How do I group them? (Your first post was blank)
-Neil