question

HectorMHJimenez-7899 avatar image
0 Votes"
HectorMHJimenez-7899 asked MayankBargali-MSFT commented

Parse JSON Dynamic Content (Dates) not showing in Office 365 Outlook - Send An Email action

The dynamic dates content from Json parse is not showing in send email action.

This is the json parse schema:

{
"items": {
"properties": {
"ApplicationID": {
"type": "string"
},
"ApplicationName": {
"type": "string"
},
"Certificate End Date": {
"type": [
"string",
"null"
]
},
"Certificate Start Date": {
"type": [
"string",
"null"
]
},
"Owner": {
"type": "string"
},
"Owner_ObjectID": {
"type": "string"
},
"Secret End Date": {
"type": [
"string",
"null"
]
},
"Secret Start Date": {
"type": [
"string",
"null"
]
}
},
"required": [
"ApplicationName",
"ApplicationID",
"Secret Start Date",
"Secret End Date",
"Certificate Start Date",
"Certificate End Date",
"Owner",
"Owner_ObjectID"
],
"type": "object"
},
"type": "array"
}

Json paser: input:

{
"ApplicationName": "SCE EPM PowerBI Index",
"ApplicationID": "e513fd91-6cb6-4cb5-94cb-90df401f0eeb",
"Secret Start Date": "\/Date(1565716686786)\/",
"Secret End Date": "\/Date(1628875086786)\/",
"Certificate Start Date": null,
"Certificate End Date": null,
"Owner": "haranath.varanasi@sce.com",
"Owner_ObjectID": "eac244f7-8635-4841-9991-1acf9b49f6d9"
},
{
"ApplicationName": "CAPA Latency",
"ApplicationID": "f9cbb3e0-37f9-4b00-9869-e25c96670a40",
"Secret Start Date": "\/Date(1597847815948)\/",
"Secret End Date": "\/Date(1629383783849)\/",
"Certificate Start Date": null,
"Certificate End Date": null,
"Owner": "Kevin.Lee@sce.com",
"Owner_ObjectID": "8b640ced-324b-4c27-a731-9f336df35ab9"
},

Dinamyc content showing , is not showing any date.

197092-image.png


azure-logic-appsazure-automation
image.png (29.1 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

MayankBargali-MSFT avatar image
0 Votes"
MayankBargali-MSFT answered MayankBargali-MSFT commented

@HectorMHJimenez-7899 Thanks for reaching out. As per your output and the Schema it is expected behavior as your Certificate Start Date and Certificate End Date has the null value. In case these properties can have the null value, then you need to update the schema as below:

 {
     "type": "array",
     "items": {
         "type": "object",
         "properties": {
             "ApplicationID": {
                 "type": "string"
             },
             "ApplicationName": {
                 "type": "string"
             },
             "Certificate End Date": {},
             "Certificate Start Date": {},
             "Owner": {
                 "type": "string"
             },
             "Owner_ObjectID": {
                 "type": "string"
             },
             "Secret End Date": {
                 "type": "string"
             },
             "Secret Start Date": {
                 "type": "string"
             }
         },
         "required": [
             "ApplicationID",
             "ApplicationName",
             "Certificate End Date",
             "Certificate Start Date",
             "Owner",
             "Owner_ObjectID",
             "Secret End Date",
             "Secret Start Date"
         ]
     }
 }

The best way to generate the schema is using the sample response and leveraging the Use sample payload to generate schema option in your Parse Json action.

Feel free to get back to me if you need any assistance.

Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi Mayank , thanks for the response , now i can see the date fields, but like those are in string format and in my email appear in unformatted date,

197452-image.png


Exist any form to change it to correct format date, thanks

197328-image.png


0 Votes 0 ·
image.png (12.4 KiB)
image.png (18.2 KiB)

@HectorMHJimenez-7899 Thanks for your response. Can you please create a new Q&A post so it can help in searching other community members facing a similar issue. As it is the string value you need to leverage the workflow expression function to format it as per your business needs. You can leverage the split function to format your string and then convert your string to date and time.

0 Votes 0 ·