Skip to main content

Drop an Invoice PDF, Get a Text File using Zapier via PDF4me AI Invoice Processing !

· 10 min read
SEO and Content Writer

Drop an invoice PDF into a Dropbox folder—and get a text file with the vendor name, invoice number, and any custom fields you need. No manual typing, no spreadsheets to copy into. PDF4me AI - Invoice Parser reads the PDF and extracts structured data; Create Text File writes it straight into your folder. Three steps, one Zap.

In a nutshell: New File in Folder watches /Blog Data/Process Invoice → AI - Invoice Parser pulls vendor, invoice number, Department Code, Delivery Date → Create Text File saves Result.txt with the extracted values. One credit per invoice.

What You’ll Get

Input: An invoice PDF (e.g. sample_invoice.pdf). Output: A text file in the same folder with the extracted data—for example, vendor name and invoice number concatenated (e.g. ABC Pvt LtdINV-1001). You can map more fields—subtotal, total, custom fields—and build any format you need.

Result panel: TXT 19 bytes, content ABC Pvt LtdINV-1001

Example output: a small text file with vendor name and invoice number.


What You Need

  • ZapierZapier account. New Zap with one trigger and two actions.
  • PDF4me API keyGet your API key. Connect it when adding the AI - Invoice Parser. First time? See Connect PDF4me to Zapier.
  • Dropbox — For the folder trigger and file output. Same pattern works with Google Drive or SharePoint.

The Zap in 3 Steps

  1. New File in Folder (Dropbox) — Triggers when a file appears in your invoice folder. Polls every 2 minutes by default.
  2. AI - Invoice Parser (PDF4me) — Extracts vendor, invoice number, dates, amounts, line items, and custom fields.
  3. Create Text File (Dropbox) — Writes the extracted data into a text file in the same folder.
Zapier Zap: New File in Folder (Dropbox, 2 min) → AI - Invoice Parser (PDF4me) → Create Text File (Dropbox)

Step 1: New File in Folder (Trigger)

Zap so far: Trigger only.

  1. Add trigger — DropboxNew File in Folder.
  2. Space — Default (or your Dropbox space).
  3. Folder (required) — Path to watch, e.g. /Blog Data/Process Invoice.
  4. Include files in subfolders? — False to watch only that folder; True to include subfolders.
  5. Include file contents?Yes. Required so the AI parser receives the actual PDF bytes.
  6. Include sharing link? — Yes or No as needed.
  7. Continue and run a test to pull sample data.
New File in Folder: Space Default, Folder /Blog Data/Process Invoice, Include file contents Yes, Include sharing link Yes

Step 2: AI - Invoice Parser (Action)

Zap so far: Trigger → AI - Invoice Parser.

  1. Add action — PDF4meAI - Invoice Parser.
  2. File (required) — Map 1. File from the New File in Folder step.
  3. File Name — Map 1. File Name and 1. File Ext from step 1 (e.g. sample_invoice + .pdf).
  4. Custom Field (optional) — Add fields like Department Code, Delivery Date, Store Number, Financial Charges, Line Total, Purchase Order Ref. These appear in the parser output alongside standard fields.
AI - Invoice Parser: File from step 1, File Name sample_invoice.pdf, Custom Field Department Code, Delivery Date

Custom field options

Use the Custom Field dropdown to choose which extra fields to extract. Each field has an ID (e.g. storeNumber, deliveryDate) and a display name.

Custom Field dropdown: Store Number, Delivery Date, Financial Charges, Line Total, Purchase Order Ref

Parser output

The action returns structured data: Invoice Number (e.g. INV-1001), Invoice Date, Order Id, Vendor Name (e.g. ABC Pvt Ltd), Vendor Address, Bill To, Sub Total, Cgst, Sgst, Line Items, and any custom fields you configured.

AI - Invoice Parser Data out: Invoice Number INV-1001, Vendor Name ABC Pvt Ltd, line items, Sub Total 1000, Cgst 90, Sgst 90

Step 3: Create Text File (Action)

Zap so far: Trigger → AI - Invoice Parser → Create Text File.

  1. Add action — DropboxCreate Text File.
  2. Space — Default.
  3. Folder (required) — Same folder as the trigger, e.g. /Blog Data/Process Invoice.
  4. File Name (required) — Enter a name (e.g. Result.txt) or map dynamically from step 2 (e.g. 2. Invoice Number + .txt).
  5. File Content (required) — Map the values from step 2. Example: 2. Vendor Name and 2. Invoice Number to get something like ABC Pvt LtdINV-1001. Add more fields (Sub Total, Total, custom fields) as needed.
  6. Overwrite — True to replace an existing file with the same name; False to keep existing files.
  7. Include sharing link? — Yes or No as needed.
Create Text File: Folder /Blog Data/Process Invoice, File Name Result.txt, File Content 2. Vendor Name 2. Invoice Number, Overwrite False

Zap loop warning: Create Text File writes to the same folder the trigger watches. Zapier may show "Possible Zap loop detected" because the new file can retrigger the Zap. To avoid loops: use a different folder for output, add a filter to exclude .txt files, or name the output folder differently. For testing with Result.txt, you can proceed—just be aware of this when going live.


Field Mapping Cheat Sheet

StepFieldMap from / To
1. New File in FolderInclude file contents?Yes (required)
2. AI - Invoice ParserFile1. File
2. AI - Invoice ParserFile Name1. File Name + 1. File Ext
3. Create Text FileFile Content2. Vendor Name, 2. Invoice Number (or more)
3. Create Text FileFolderSame as trigger, or different to avoid loops

What’s Next?

  • Map more fields into File Content (Sub Total, Total, custom fields) for richer output.
  • Use Formatter or Code by Zapier to build a custom string (e.g. CSV line, JSON) before Create Text File.
  • Name the file by invoice number: map 2. Invoice Number to File Name and add .txt as the extension.
  • Need the same flow in Make or Power Automate? Same pattern applies.

Troubleshooting

Parser returns empty or "file is empty"

Set Include file contents? Yes in the trigger. The parser needs the actual file bytes, not just a path.

Custom field missing in output

Add the field in the Custom Field section. Ensure the field exists on the invoice—if it doesn’t, the AI may leave it empty.

401, 402, or API errors

PDF4me Troubleshooting covers 401 (API key), 402 (credits), and more.