Import XFDF annotations into PDFs with Nutrient Document Web Services API on Zapier

What is Zapier?
Zapier(opens in a new tab) is a no-code automation platform that connects your favorite apps and services. You can build “Zaps” to automate tasks by setting up triggers and actions between apps like Google Drive, Gmail, and Nutrient.
In this tutorial, you’ll learn how to import XFDF annotation files into PDFs automatically using the Nutrient API.
What is the Nutrient API?
Nutrient Document Web Services API enables powerful document automation tasks, including converting, annotating, extracting, signing, or securing PDF files. With your free account(opens in a new tab), you get 100 credits to try any of the 30+ tools available.
What you’ll need
- A Zapier(opens in a new tab) account (a pro plan is necessary for multi-step Zaps)
- A Google Drive account
- A PDF file stored in a drive folder
- A corresponding
.xfdf
file in a drive folder - A Nutrient API key — sign up here(opens in a new tab)
Step 1 — Trigger a new file in a Google Drive folder
- Select Google Drive as the trigger app.
- Choose the New File in Folder trigger event.
Connect your Google Drive account.
Configure the trigger:
- In the Drive field, select your Google Drive.
- In the Folder field, select or create a folder (e.g.
xfdf-import/input
).
- Test this step with a sample
.pdf
file.
Step 2 — Find the XFDF file in Google Drive
- Add a new step: Google Drive > Find a File.
- Configure the search:
- Filename — Use a static or dynamic name (e.g.
annotations.xfdf
) - Search Type —
Filename contains
- Drive — Select your personal drive
- Folder — Point to where you store XFDF files
- Filename — Use a static or dynamic name (e.g.
Ensure the XFDF file sharing is set to Anyone with the link can view so it’s accessible to the API.
- Test the step to confirm the XFDF file is retrieved.
Step 3 — Import XFDF into PDF (Nutrient API)
- Add Nutrient Document Web Services API as the app.
- Choose Import XFDF to PDF as the action.
- Connect your Nutrient API account using your API key.
You can get your API key from the Nutrient dashboard(opens in a new tab).
- Configure the action:
- PDF File URL — Use the output from step 1.
- XFDF File — Use the output from step 2,
- Output File Name — Optional (e.g.
annotated_report.pdf
)
You can use our sample PDF document(opens in a new tab) and sample XFDF file(opens in a new tab) for testing.
- Test the action to ensure the annotations are correctly applied.
Step 4 — Upload the annotated PDF to Google Drive
- Add Google Drive as the final step and choose Upload File.
Select the drive and folder where the annotated file should be saved.
In the File field, use the result from the previous Nutrient step.
Upload to a different folder to avoid Zap loop warnings.
- Test this step to confirm the final file uploads successfully.
Conclusion
You’ve just built a Zap that automatically imports XFDF annotations into PDFs using the Nutrient API(opens in a new tab). This is perfect for workflows where annotations are stored in separate XML-based XFDF files and need to be merged into PDFs.
Extend this workflow with tools like flattening, signing, or OCR to create even more powerful automations.