Hi all,
Thanks for the forum! this is my first post, and a ask for help.
I’m attempting to send a notification to a list of users returned on a fetch-data step. But I’m not getting the expected behavior.
After some testing I could reproduce the issue with a minimal automation template.
A template like this:
{
"steps": [
{
"action": "send",
"message": {
"to": [
{
"user_id": "1"
},
{
"user_id": "2"
}
],
"template": "1"
}
}
]
}'
will yield message invocations like this:
{
"message": {
"template": "1",
"to": {
"0": {
"user_id": "1"
},
"1": {
"user_id": "2"
}
}
}
}
// instead of the expected format according to the documentation:
{
"message": {
"template": "1",
"to": [
{ "user_id": "1" },
{ "user_id": "2" }
]
}
}
Since on this documentation its pointing to the message format of the 2.0 API i expected it to make the proper type conversion. Since the message api supports a Recipient List as a parameter.
Questions:
- Is this the expected behavior? If so, is there any other way to use the Automation Run Cache information to send a message to multiple users inside an automation template? ? If it’s not the expected behavior, where can I track the bug status?
Alternative solution ideas:
- Synchronize a recipient list through lists endpoint. (wanting to avoid expending development resources on this for now)
- Do not use automation triggers to run my automation and generate the template with one “send” step for recipient. (avoiding due to also expending resources)
- Attempted to replace the entire “message” property for a $ref, but the template validation rejects this format with the error that “template” property is required.
to the team, thanks for the awesome product. to the forum, thanks to having me!
bonus: message ID for reference debugging: Kr6X4aypq5iGgNCBwC9Qg