My second attempt to resolve this issue. Let me simplify my question 🙂 Specifically, this example can be done in a much simpler way, but it is just for example purposes, and my other stuff can be run only through Apps Script.
Let's say I have a table "tracking_id". In this table, "tr_id" is the key and label, and "status" is a text field. Let's say I need to create a bot that takes text from "tr_id" and adds "@dev". Let's say I want to do it through Apps Script.
In my EVENT settings, I activate "For Each Row In Table" and select my table "tracking_id". For the PROCESS, I have two tasks:
1. Apps Script
function appendDev(botEvent) {
var text = botEvent || ""; // Use the provided column value
var result = text + "@dev";
Logger.log(result);
return result;
}
2. Set row values
Column "status" = [textscript].[Output]
Now I run the bot, but it always updates "status" for the last row only. And if other rows have anything in "status", the bot erases it. What am I missing?
Thank you!
You might get more details fro the automation Monitor logs. In the "3 dot" menu in the upper right of the Bot (next to the Disable button) there should be a Monitor menu option. Tap that and when it opens select your app on the left hand side then select the "Runs" tab on the bottom. In the middle panel search for the Bot and see if any Bot runs had errors. Each row is represented individually.
It would appear, based on what you have provided, that not all the rows are not being selected to run through the Bot. Please show us the "textbot" Event step at the top and how it is configured. Is there any criteria that filters the rows?
Thank you. I checked this monitor, but there is literally nothing that can help. I will copy/paste data about rows data02 (which was not updated) and data04 (the one that was updated).
data02
Events tab:
Name
textbot
Created TimeStamp
2/1/2025 5:00:04 PM
Data
{
"Row ID": "qiLs5GrvVrc3ipaEihlRZ1",
"tr_id": "data02",
"status": "",
"duplicate": "",
"added_on": "02/01/2025 07:29:51",
"uid": "257Lx2one3hQAfCGpFJ2Iu"
}
Process > Steps tab:
#
1
Name
Input
Created TimeStamp
2/1/2025 5:00:04 PM
Output data
{
"Row ID": null,
"tr_id": null,
"status": null,
"duplicate": null,
"added_on": null,
"uid": null,
"Related tracking_historys": null
}
#
2
Name
textscript
Created TimeStamp
2/1/2025 5:00:06 PM
Output data
{
"Row ID": null,
"tr_id": null,
"status": null,
"duplicate": null,
"added_on": null,
"uid": null,
"Related tracking_historys": null
}
Task Properties
{
"Success": true,
"ReturnValue": {
"stringValue": "data02@dev"
},
"Task Type": "AppsScript",
"Task Name": "textscript Task - 1",
"ScriptId": "1STeIIpXekEq3FglXZQht3yvooLh-K2SRSmz1ithKwlW7lNmXZJbVyW8v",
"FunctionName": "appendDev",
"FunctionArguments": {
"stringValue": "data02"
}
}
#
3
Name
addtext
Created TimeStamp
2/1/2025 5:00:09 PM
Output data
{
"Row ID": null,
"tr_id": null,
"status": null,
"duplicate": null,
"added_on": null,
"uid": null,
"Related tracking_historys": null
}
#
4
Name
Process for New Bot 2 - 1-returnStep
Created TimeStamp
2/1/2025 5:00:09 PM
Output data
{}
data04
Events tab:
Name
textbot
Created TimeStamp
2/1/2025 5:00:04 PM
Data
{
"Row ID": "IqRSYXLw3wMwkIgzxeJpt9",
"tr_id": "data04",
"status": "data04@dev",
"duplicate": "",
"added_on": "02/01/2025 07:30:03",
"uid": "qX2wMaE33D2uEiRW5u97b4"
}
Process > Steps tab:
#
1
Name
Input
Created TimeStamp
2/1/2025 5:00:04 PM
Output data
{
"Row ID": null,
"tr_id": null,
"status": null,
"duplicate": null,
"added_on": null,
"uid": null,
"Related tracking_historys": null
}
#
2
Name
textscript
Created TimeStamp
2/1/2025 5:00:08 PM
Output data
{
"Row ID": null,
"tr_id": null,
"status": null,
"duplicate": null,
"added_on": null,
"uid": null,
"Related tracking_historys": null
}
Task Properties
{
"Success": true,
"ReturnValue": {
"stringValue": "data04@dev"
},
"Task Type": "AppsScript",
"Task Name": "textscript Task - 1",
"ScriptId": "1STeIIpXekEq3FglXZQht3yvooLh-K2SRSmz1ithKwlW7lNmXZJbVyW8v",
"FunctionName": "appendDev",
"FunctionArguments": {
"stringValue": "data04"
}
}
#
3
Name
addtext
Created TimeStamp
2/1/2025 5:00:09 PM
Output data
{
"Row ID": null,
"tr_id": null,
"status": null,
"duplicate": null,
"added_on": null,
"uid": null,
"Related tracking_historys": null
}
#
4
Name
Process for New Bot 2 - 1-returnStep
Created TimeStamp
2/1/2025 5:00:09 PM
Output data
{}
User | Count |
---|---|
36 | |
8 | |
3 | |
2 | |
2 |