I’m looking to automate data from Airtable to Asana. In both Airtable and Asana there is a multi-select field(“Name”), each with the same 4 options (“Option A”, “Option B”, “Option C”, and “Option D”). If “Name” only has one option selected (ex. just “Option C” is present in the field in Airtable), it runs without issue, but I get an error if there are multiple fields (ex. “Option A” & “Option D” are present in the field in Airtable).
This is my scenario:
The Iterator pulls in the “Name” Array and separates them
[
{
"value": "Option A",
"__IMTINDEX__": 1,
"__IMTLENGTH__": 4
},
{
"value": "Option B",
"__IMTINDEX__": 2,
"__IMTLENGTH__": 4
},
{
"value": "Option C",
"__IMTINDEX__": 3,
"__IMTLENGTH__": 4
},
{
"value": "Option D",
"__IMTINDEX__": 4,
"__IMTLENGTH__": 4
}
]
The Switch tool swaps the text from the array with the corresponding Asana ID number, as I found that even with just one option selected, Asana did not accept text to text, and needed the ID:
The text aggregator brings them back together:
NOTE: While it currently says “Row Separator: Other”, "Separator: , ", I have tried this with every iteration in the “row separator” dropdown, as well as added the “toArray()” function around the text output to no avail.
In the output of both Asana Routes, the text aggregator is mapped to the “Name” field:
NOTE: I have also tried to add the “toArray()” function around the text output here as well, but in this instance, it returns an error regardless of how many options are selected on the Airtable side.
This is what a successful output looks like when a record only has one option selected:
"custom_fields": [
{
"gid": "120...",
"resource_type": "custom_field",
"resource_subtype": "multi_enum",
"type": "multi_enum",
"name": "NAME",
"enabled": true,
"enum_options": [
{
"gid": "1205691905a",
"resource_type": "enum_option",
"enabled": true,
"name": "Option A",
"color": "blue"
},
{
"gid": "1205691905b",
"resource_type": "enum_option",
"enabled": true,
"name": "Option B",
"color": "blue-green"
},
{
"gid": "1205691905c",
"resource_type": "enum_option",
"enabled": true,
"name": "Option C",
"color": "yellow-green"
},
{
"gid": "1205691905d",
"resource_type": "enum_option",
"enabled": true,
"name": "Option D",
"color": "aqua"
}
],
"multi_enum_values": [
{
"gid": "1205691905d",
"resource_type": "enum_option",
"enabled": true,
"name": "Option D",
"color": "aqua"
}
],
"display_value": "Option D",
}
}
And here are the error messages I’ve been receiving:
Can someone help me? I think my issue is that the text aggregator isn’t combining back into an array, but I’ve run out of ideas on how to do that.
I apologize for censoring some parts of this and not sharing the blueprint .json, but I am not comfortable sharing everything as it shows data I am not comfortable sharing pulled from both Airtable and Asana. Know that the text to ID swap works exactly as intended, as it will run properly with all 4 options so long as it is the only one selected, and so is not part of the issue.