I have a Power Automate flow that gets a JSON file from a SharePoint folder (when dropped into it) and I want to be able to read its contents and extract a key/value. The issue I am having is that it crashes in the second step, Get File Content, with the error
Encountered internal server error. The tracking Id is '3bc1890c-1932-4a2e-af14-6e5cca1534be'.
I realized that it has to do with the JSON file's syntax. When I ran the flow with the below JSON file
{
"products": {
"GF": [
{
"product_name": "GF",
"remediation": {
"type": "package",
"packages": [
{
"service": "av",
"service_name": "AV",
"description": "Detects Prestige ransomware payloads",
"kill_chain": {
"step": "Delivery"
},
"link": "https://www.GF.com/updates/antivirus?version=90.06850",
"minimum_version": "90.06850"
}
]
},
"detection": {
"virus": [
"W32/Filecoder.OMM!tr.ransom"
],
"virusid": [
10108353
]
}
}
]
},
"title": "Prestige Ransomware",
"sub_title": "Impacting organizations in Ukraine and Poland",
"link": "https://www.microsoft.com/security/blog/2022/10/14/new-prestige-ransomware-impacts-organizations-in-ukraine-and-poland/",
"cve_list": [
"TBA"
],
"description": "Researchers at Microsoft Threat Intelligence Center (MSTIC) have identified evidence of a novel ransomware campaign targeting organizations in the transportation and logistics industries in Ukraine and Poland. According to the report, the new ransomware labels itself with a ransom note of “Prestige ranusomeware”.",
"tag": "Prestige Ransomware",
"event_handler_desc": "",
"m": 851548,
"additional_resources": [
{
"Source": "Microsoft Security Blog",
"Link": "https://www.microsoft.com/security/blog/2022/10/14/new-prestige-ransomware-impacts-organizations-in-ukraine-and-poland/"
}
],
"ob_url": "https://www.GF.com/ob-alert/prestige-ransomware"
}
the PA workflow executes successfully. However, when I try with the same PA workflow with the JSON file below (the required one)
[
{
"products": {
"GF": [
{
"product_name": "GF",
"remediation": {
"type": "package",
"packages": [
{
"service": "av",
"service_name": "AV",
"description": "Detects Prestige ransomware payloads",
"kill_chain": {
"step": "Delivery"
},
"link": "https://www.GF.com/updates/antivirus?version=90.06850",
"minimum_version": "90.06850"
}
]
},
"detection": {
"virus": [
"W32/Filecoder.OMM!tr.ransom"
],
"virusid": [
10108353
]
}
}
]
},
"title": "Prestige Ransomware",
"sub_title": "Impacting organizations in Ukraine and Poland",
"link": "https://www.microsoft.com/security/blog/2022/10/14/new-prestige-ransomware-impacts-organizations-in-ukraine-and-poland/",
"cve_list": [
"TBA"
],
"description": "Researchers at Microsoft Threat Intelligence Center (MSTIC) have identified evidence of a novel ransomware campaign targeting organizations in the transportation and logistics industries in Ukraine and Poland. According to the report, the new ransomware labels itself with a ransom note of “Prestige ranusomeware”.",
"tag": "Prestige Ransomware",
"event_handler_desc": "",
"m": 851548,
"additional_resources": [
{
"Source": "Microsoft Security Blog",
"Link": "https://www.microsoft.com/security/blog/2022/10/14/new-prestige-ransomware-impacts-organizations-in-ukraine-and-poland/"
}
],
"ob_url": "https://www.GF.com/ob-alert/prestige-ransomware"
}
]
the workflow crashes with the error I posted in the beginning of my post. It seems that the initial and ending [ ] make the workflow step of Get File Content to crash.
The problem is that this is the actual JSON syntax I need to work with. Any idea or suggestion would ne very valuable, because I have been working on it for the last couple of days and I am stuck BIG TIME!
Thank you in advance, Nikos