Hello all,
I am trying to send mail to "shared mail box" - abc@xz.com through Json code via "send an http mail to SharePoint" method in one of my workflows.
I tried by creating a variable for that mail box (string) and then set that variable with mail id (abc@xz.com). and then i called that variable in my code:
{
'properties': {
'__metadata': {
'type': 'SP.Utilities.EmailProperties'
},
'To': {
'results': @{variables('Task Owner Email ID')}
},
'BCC':{
'results': @{variables('team shared mail box')}
},
'CC': {
'results': ['Team Group']
},
'Body': '@{variables('Reminder Email Body')}',
'Subject': 'Reminder - Task - @{items('Apply_to_each_item_in_team_List')?['Title']}'
}
}
____
This part in above code seems to be not working: 'BCC':{
'results': @{variables('team shared mail box')}
},
However in the output it looks like it does recognize the mail id but throws below error:
"body": {
"status": 400,
"message": "An unexpected 'PrimitiveValue' node was found when reading from the JSON reader. A 'StartArray' node was expected.\r\nclientRequestId: 74f71b44-8513-4ef1-a5f8-b95235c14dac\r\nserviceRequestId: 9e4b8fa0-e007-6000-1178-c83305bb7607",
"source": "https://sites.xz.com/sites/team/_api/SP.Utilities.Utility.SendEmail",
"errors": [
"-1",
"Microsoft.Data.OData.ODataException"
]
}
}

can someone help with this .. how to fix it or is there another way to write the code to make it work.