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:
This actually worked great. I had to change it a bit to use data from a csv instead of a SharePoint list but the functionality is the same.
Hi @TyTerror
I have posted the solution on my blog site, pls check it out:
You have to skip get items & update item actions as those are not required in your case.
If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.
Here's what the card looks like on the website
Here's what it looks like in the emails from the automation
WarrenBelz
146,645
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,997
Most Valuable Professional