Extract key-value pairs from documents with Nutrient Document Web Services API on Zapier

Table of contents

    This tutorial shows you how to extract key-value pairs from PDF or image-based documents using the Nutrient Document Web Services API on Zapier. This is useful for automating data capture from receipts, invoices, forms, or contracts.
    Extract key-value pairs from documents with Nutrient Document Web Services API on Zapier

    What is Zapier?

    Zapier(opens in a new tab) is an automation platform that connects your favorite apps and services with no code required. You can build “Zaps” to automate repetitive tasks by setting up triggers and actions between apps like Google Drive, Slack, Gmail, and more.

    In this tutorial, you’ll extract key-value pairs from documents and save the JSON result to Google Drive using Nutrient DWS Processor API.

    What is Nutrient DWS Processor API?

    Nutrient DWS Processor API is a powerful platform for document automation. With your free account(opens in a new tab), you get 50 credits, which you can use to perform various document operations. Each tool (e.g. conversion, signing, flattening) consumes a different amount of credits depending on complexity.

    Nutrient offers more than 30 tools with the ability to:

    What you’ll need

    Step 1 — Trigger a new file in a Google Drive folder

    1. Select Google Drive as the trigger app.

    Choose Google Drive as the trigger app

    1. Choose the New File in Folder trigger event.

    New File in Folder selected in trigger step

    1. Connect your Google Drive account.
    2. Configure the trigger:
    • In the Drive field, select your Google Drive.
    • In the Folder field, select or create a folder (e.g. kvp-input).

    Folder picker showing selected folder

    1. Test the trigger with a sample PDF or image file.

    Test trigger successfully detects a PDF file

    Step 2 — Extract key-value pairs action (Nutrient DWS Processor API)

    1. Select Nutrient Document Web Services API as the action app.

    Choose Nutrient DWS Processor API as the action app

    1. Choose the Extract Key-Value Pairs From PDF action.

    Select Extract KVPs from PDF as the action

    1. Connect your Nutrient account using your API key.

    Paste your Nutrient DWS Processor API key

    You can find your API key in the Nutrient dashboard(opens in a new tab).

    API key location in Nutrient dashboard

    1. Configure the fields:
    • Image File — Use the file from step 1.
    • File Name — Optional, e.g. extracted_kvp.json.

    Map the file URL and output name fields

    Make sure the files are publicly accessible or uploaded through a supported trigger like Google Drive.

    1. Test the action and open the returned File. Check that the JSON contains the expected keys and values from your sample document.

    Key-value extraction test returns a File URL

    Step 3 — Upload the JSON result to Google Drive

    1. Now, add another step by selecting Google Drive as the app and Upload File as the action event. Connect your Google Drive account if needed.

    Upload file action for storing the extracted JSON

    1. Configure the following:
    • In the Drive and Folder fields — Choose where to store the extracted data (e.g. kvp-output).
    • In the File field — Map File from the Nutrient DWS Processor API step.

    Choose output location and map the JSON file

    To avoid Zap loops, use different folders for input and output.

    1. Run a test to verify the JSON file is uploaded successfully.

    Final step confirms JSON file is stored

    Conclusion

    This Zap sends documents to Nutrient DWS Processor API and saves the key-value extraction result in Google Drive. Check the extracted fields before using them in another system. To set up your own workflow, create a Processor API account(opens in a new tab) and connect it to the Zapier integration(opens in a new tab). For tabular data, follow the Zapier table-extraction tutorial.

    Hulya Masharipov

    Hulya Masharipov

    Technical Writer

    Hulya is a frontend web developer and technical writer who enjoys creating responsive, scalable, and maintainable web experiences. She’s passionate about open source, web accessibility, cybersecurity privacy, and blockchain.

    Explore related topics

    Try for free Ready to get started?