creditcardsps
BBuildShip
•Created by creditcardsps on 4/13/2025 in #❓・buildship-help
Buildship Database - Create Document within Loop Node not working correctly
Hello - thanks in advance for any help. Beginner here.
I have a workflow where in one of the first nodes I'm pulling some data that a user selected about which credit card(s) they use. The output of this (called "selectedCards") is below:
{
"id": "OkmQ6tjC33NQj4Ahexwz2sX8z4l1",
"fieldKey": "selectedCards",
"value": [
"discover-it",
"capital-one-venture",
"chase-sapphire-preferred"
],
"status": "success!"
}
Later in a loop node, I'm trying to input 3 rows in the buildship database (1 for each of the "values" above) and input that value in the "card_id" field. So I basically want 3 rows, 1 with "discover-it" in the "card_id" field, 1 with "capital-one-venture" in the "card_id" field, and 1 with "chase_sapphire-preferred" in the "card_id" field.
In the loop node, I've input "selectedCards.value" as the item. Within the loop, I'm trying to create a new document in the "user_card_recs" collection and input the card_id which is basically the string of the current item in the loop. When I use a log, it shows the below:
[
0:"discover-it"
1:"capital-one-venture"
2:"chase-sapphire-preferred"
]
But in the collection, 1 row is added, and the card_id shows as "discover-it,capital-one-venture,chase-sapphire-preferred".
Can anyone help me figure out why this is happening?
4 replies