locked
SharePoint Hosted App Workflow parse JSON string in Email body RRS feed

  • Question

  • Has anyone worked on SharePoint Hosted App workflow with JSON string?

    I would like to parse JSON string (captured in comments column) in workflow email body (string) - Expression Editor.

    Example JSON String (Comments):

    [{"Value":"Started working on it.","TimeStamp":1467645902499,"Author":"John","AuthorId":9},{"Value":"Need some other information.","TimeStamp":1467645925272,"Author":"John","AuthorId":9}]

    I would like to Display in Email:

    John 7/4/2016 10:25:02 AM
    Started working on it.
    John 7/4/2016 10:25:25 AM
    Need some other information.



    Anuradha!!

    Monday, July 4, 2016 3:33 PM

Answers

  • Hi,

    It would cost more effort to parse a JSON string in SharePoint workflow when comparing to do it via programming languages such C# and JavaScript.

    Anyway, here is a demo about how to call the SharePoint 2013 Rest API from a SharePoint Designer Workflow, there are steps about how to parse the JSON string which returned from a web service call which should be helpful to you:

    https://sergeluca.wordpress.com/2013/04/09/calling-the-sharepoint-2013-rest-api-from-a-sharepoint-designer-workflow/

    Best regards,

    Patrick

    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    • Proposed as answer by Patrick_Liang Wednesday, July 13, 2016 8:56 AM
    • Marked as answer by Patrick_Liang Friday, July 15, 2016 10:41 AM
    Tuesday, July 5, 2016 8:22 AM