How to Use the JSON Parser Tool in Bit Flows for Data Extraction

Estimated reading: 5 minutes 1336 views

The JSON Parser Tool in Bit Flows is used to handle scenarios where data arrives as a JSON string, which cannot be directly used as structured JSON data. This tool converts the JSON string into a usable JSON format, allowing efficient extraction and processing of data in workflows.

In this demonstration, we will receive a list after parsing JSON. Since the parsed JSON data appears as a list, we will also use the Iterator Tool to loop through and process each item individually. By the end of this setup, you’ll have a seamless workflow that captures structured form submission details and efficiently logs them in Google Sheets, simplifying data management and analysis.

For your case, if the parsed data does not appear as a list, there is no need to use the Iterator Tool.

What is the JSON Parser in Bit Flows?

The JSON Parser in Bit Flows is a tool used to extract and structure specific data from JSON-formatted responses. It helps transform raw JSON strings into usable data formats, making it easier to map and send the extracted information to other applications for efficient processing.

Add JSON Parser to a Workflow

Open or Create a Workflow

To add a JSON Parser to your flow, you can either open an existing flow or create a new one by setting up your trigger and actions. If you’re unfamiliar with creating workflows, refer to the relevant documentation for guidance.

In this example, we already have a flow named “FluentFormToGoogleSheet.” We will now add a JSON Parser to this flow to extract specific form submission details from the Fluent Forms response.

Add JSON Parser to Your Flow

To add a JSON Parser to your flow, first go to the “Tools” section located next to “Apps.” In the Tools menu, you will find various tools. Drag the “JSON Parser” tool and drop it into your flow at the desired point to extract and process specific data from JSON responses.

Congratulations! You have successfully added a JSON Parser to your flow.

Link with the JSON Parser

To connect the JSON Parser with the trigger (in this case, Fluent Forms), follow these steps:

  1. Unlink Existing Connections: If any connections are already linked, remove them.
  2. Connect Fluent Forms to JSON Parser: Link the Fluent Forms trigger from Fluent Forms to the JSON Parser tool.

This setup ensures that whenever a form submission event is triggered by Fluent Forms, the JSON Parser will extract specific data from the incoming JSON payload before proceeding to the next step in the workflow.

Configure the JSON Parser

To configure the JSON Parser in Bit Flows, follow these steps:

  1. Open the Configuration: Click on the JSON Parser tool to open the configuration popup.
  2. Specify JSON Path: In the popup, select the JSON path for the data you want to extract. JSON paths help you navigate the JSON structure and pinpoint specific data fields.
  3. Example Selection: In this demonstration, we want to parse the “form_fields” data from the Fluent Forms trigger. Select “form_fields” as the target JSON path.
  4. Close the Configuration: After configuring the JSON path, click the “Close” button to save your changes.

Setting up the JSON Parser correctly ensures precise extraction of relevant data from your incoming JSON payloads, making your workflow more efficient.

View Data and Test the JSON Parser Tool

To view and map the data extracted by the JSON Parser, you first need to trigger the event. Without running the trigger, the data extracted by the JSON Parser will not appear when mapping to the next action.

info-icon-bit-apps  INFO

If you are using the JSON Parser in your workflow, after specifying your JSON path, you must click on “Test Flow Once” and run the trigger. Otherwise, the parsed data will not appear when mapping to your actions.

For example, if we add Google Sheets as an action in our workflow and try to map the fields, we won’t initially see any JSON Parser data. To view the parsed data, first click on “Test Flow Once” to run the trigger (in this case, Fluent Forms). Once the trigger is successfully run, return to the Google Sheets action and try mapping the fields again. This time, you’ll see the values extracted by the JSON Parser.

In this demonstration, we aim to send the following data to Google Sheets: Index No, Type of Element, Attributes Type, and Attributes Name. These fields are part of a list in the parsed data, so we need to use the Iterator Tool to extract the required information.

To do this, follow these steps:

  1. Unlink the connection between Google Sheets and the JSON Parser.
  2. Drag and drop the Iterator Tool into the workflow.
  3. Set up the Iterator Tool to process the list data.
  4. Reconnect the Google Sheets action to the Iterator.

Finally, test the workflow to ensure the data is extracted and sent to Google Sheets correctly. Refer to the Iterator Tool documentation for more details on setting up and configuring the tool.

Share this Doc

How to Use the JSON Parser Tool in Bit Flows for Data Extraction

Or copy link

CONTENTS

Subscribe

×
Cancel