Hi I have an automation that reads in a csv and converts it to JSON for easy manipulation. The csv is full of user subscription data. The goal is to send the users an email asking if they use their subscriptions and I've gotten the automation to work, except that it sends a separate email for each one. Idealy I'd like to create an adaptive card with all the subscriptions for a given user that asks if each one is in use. I've created the adaptive card and gotten it to display correctly on adaptivecards.io but cannot get it to display correctly in the actual automation. What am I doing wrong?
Here's the JSON for my card:
{
"type": "AdaptiveCard",
"body": [
{
"type": "Container",
"style": "emphasis",
"items": [
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"items": [
{
"type": "TextBlock",
"size": "Large",
"weight": "Bolder",
"text": "**Which Subscriptions Aren't Needed?**",
"style": "heading",
"wrap": true
}
],
"width": "stretch"
}
]
}
],
"bleed": true
},
{
"type": "Container",
"spacing": "Large",
"style": "emphasis",
"items": [
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"items": [
{
"type": "TextBlock",
"weight": "Bolder",
"text": "SUBSCRIPTION",
"wrap": true
}
],
"width": "stretch"
},
{
"type": "Column",
"spacing": "Large",
"items": [
{
"type": "TextBlock",
"weight": "Bolder",
"text": "DEPARTMENT",
"wrap": true
}
],
"width": "auto"
},
{
"type": "Column",
"spacing": "Large",
"items": [
{
"type": "TextBlock",
"weight": "Bolder",
"text": "Subscription Used?",
"wrap": true
}
],
"width": "auto"
}
]
}
],
"bleed": true,
"$data": "${userSub}"
},
{
"type": "Container",
"items": [
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"items": [
{
"type": "TextBlock",
"text": "${subscription}",
"wrap": true,
"id": "subscription"
}
],
"width": 1
},
{
"type": "Column",
"spacing": "Medium",
"items": [
{
"type": "TextBlock",
"text": "${department}",
"wrap": true
}
],
"width": 1
},
{
"type": "Column",
"spacing": "Medium",
"items": [
{
"type": "Input.ChoiceSet",
"id": "SubscriptionNeededStatus",
"style": "expanded",
"isRequired": true,
"errorMessage": "This is a required input",
"choices": [
{
"title": "Yes",
"value": "True"
},
{
"title": "No",
"value": "False"
}
]
}
],
"width": 1
}
]
}
],
"$data": "${$root.user_subs}"
},
{
"type": "Container"
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.4",
"fallbackText": "This card requires Adaptive Cards v1.5 support to be rendered properly."
}
Here's the JSON data that was working on the website:
{
"user_subs": [
{
"email": "bob.bobbert@company.com",
"last_name": "Bobbert",
"first_name": "Bob",
"department": "department 1",
"subscription": "Subscription A",
"creation_date": "11-Jun-21",
"status": "active",
"part_number": "AAAAAAAA",
"region": "Global",
"contract": "Contract1"
},
{
"email": "bob.bobbert@company.com",
"last_name": "Bobbert",
"first_name": "Bob",
"department": "department 1",
"subscription": "Subscription B",
"creation_date": "11-Jun-21",
"status": "active",
"part_number": "AAAAAAAA",
"region": "Global",
"contract": "Contract1"
},
{
"email": "bob.bobbert@company.com",
"last_name": "Bobbert",
"first_name": "Bob",
"department": "department 1",
"subscription": "Access",
"creation_date": "",
"status": "",
"part_number": "",
"region": "",
"contract": ""
}
]
}