Parker Software Ltd Homepage
Forum Home Forum Home > ThinkAutomation Business Process Automation > General
  New Posts New Posts RSS Feed - How to process JSON emails
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Forum LockedHow to process JSON emails

 Post Reply Post Reply
mitesh281 View Drop Down

Joined: 24 Feb 2009
Location: India
Points: 71
Post Options Post Options   Thanks (0) Thanks(0)   Quote mitesh281 Quote  Post ReplyReply Direct Link To This Post Topic: How to process JSON emails
    Posted: 31 May 2021 at 12:01pm

I want to process email which has JSON text in it. I found a link to use "Read JSON Document" action. However my question is how can I process multiple blocks of JSON text because number of block will be different in each JSON formatted email. Below is a sample reference email text

  "data": [
      "applicationName": "Test App", 
      "Status": "Green", 
      "account": "1111", 
      "Duration_AppLoad": "10.10", 
      "dbCluster": "Test_Cluster", 
      "applicationName": "Test App1", 
      "Status": "Red", 
      "account": "2222", 
      "Duration_AppLoad": "11.11", 
      "dbCluster": "Test_Cluster2"

I want to insert value of applicationName, Status, account, duration_appload and dbcluster fields in the DB. I have used below format to fetch data

/json/data/[1]/applicationName = %applicationName%
/json/data/[2]/applicationName = %applicationName%

How can we replace [1], [2] to make it dynamic?

Thank you for help.


Edited by mitesh281 - 31 May 2021 at 12:07pm
Back to Top
Liam7982 View Drop Down
Moderator Group
Moderator Group

Joined: 01 Sep 2021
Location: Stoke on Trent
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote Liam7982 Quote  Post ReplyReply Direct Link To This Post Posted: 01 Sep 2021 at 3:38pm

Thank you for letting me know about this,

If you are using TA5, you can use the extract field action to pull directly from the JSON, set it to a repeating block and call another automation to do the DB updates.

However if you are doing this with TA4 the process is pretty similar as you just need to get the JSON output in a variable and do a regular extract from it, when doing this make sure to use the repeating block option.

Kind regards Liam
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.05
Copyright ©2001-2016 Web Wiz Ltd.

This page was generated in 0.053 seconds.