Skip to main content
Question

PLEO API Connection

  • Nov 19, 2026 10:45 AM UTC
  • 3 replies
  • 69 views

I would like to use the Pleo app via Zapier to send receipts to Moco. Unfortunately, the current web integration for logging into Pleo requires a JWT token, but Pleo no longer supports these. Will there be an update to the Pleo app so that it can be used again? Or is there another way to connect Pleo?

3 replies

  • New
  • Nov 20, 2026 9:19 AM UTC

Hi Manuel,

It looks like the Pleo app on Zapier still uses Pleo's old Open API tokens. That API is deprecated, and the new Pleo API keys don't work on it, so it's worth reporting to both Pleo and Zapier support.

Until then, you can work around it with a paid Zapier plan (API by Zapier is a premium beta app) and one short Code step.

First, ask Pleo support to turn on API keys for your company. Then an admin or bookkeeper can create a key under Settings > API Keys with the accounting-entries:read scope. How to find your company_id: https://developers.pleo.io/docs/current/how-tos/api-keys/how-to-make-an-api-call-using-standalone-api-keys

Step 1, trigger: API by Zapier, New Item from API

  • Method POST, URL https://external.pleo.io/v1/accounting-entries/receipts:search?company_id=YOUR_ID&limit=100&sorting_keys=createdAt&sorting_order=DESC
  • Body {"includeDeleted": false, "fileType": "ORIGINAL"}
  • Response filter .data, Dedupe Key .id
  • Connection: Static Headers, domain filter external.pleo.io, header Authorization with the value Basic KEY_IN_BASE64. KEY_IN_BASE64 is your key plus a colon at the end, base64 encoded. On a Mac or Linux terminal: printf '%s' 'YOUR_KEY:' | base64. Don't paste the key into a website to encode it.

Step 2: Code by Zapier (JavaScript). Add three input fields from step 1: url, id and mimeType. The url works for 24 hours.

const res = await fetch(inputData.url);
if (!res.ok) throw new Error('Download failed: ' + res.status);
const base64 = Buffer.from(await res.arrayBuffer()).toString('base64');
const ext = (inputData.mimeType || '').split('/')[1] || 'pdf';
return { filename: inputData.id + '.' + ext, base64 };

Very large files can hit Zapier's 6 MB limit for Code steps.

Step 3: API by Zapier, API Request

  • Method POST, URL https://YOURCOMPANY.mocoapp.com/api/v1/purchases/drafts
  • Body {"title": "Pleo receipt", "file": {"filename": "...", "base64": "..."}}, with filename and base64 from step 2
  • A second connection: Static Headers, domain filter YOURCOMPANY.mocoapp.com, header Authorization with the value Token token=YOUR_MOCO_KEY

I haven't tested this end to end, and I tested the code in Node.js, not in Zapier. Should the receipts go to Ausgaben in MOCO, or onto projects as expenses?


ManuelB,

API changes always break older stuff out of nowhere. Since the built in Zapier action fails because that token type is gone, you can use webhooks instead. Set up a Webhooks by Zapier catch hook to get data payloads directly. And then pass the payload through a Code step to fix the formatting before it goes to Moco. Make sure you check both platforms for updated API docs too, since auth endpoints change all the time.


WebhookEngineer
Forum|alt.badge.img+1

A receiving webhook needs something upstream to send it events. It won’t fetch receipts itself or fix the Pleo login problem. Before using that approach, you’d need to check whether Pleo can send the relevant receipt events and how your workflow would retrieve the receipt files.

Priyanshu’s polling proposal takes a different route, but he explicitly says it hasn’t been tested end to end. I’d treat it as a starting point rather than a confirmed fix.

Can you obtain a current Pleo API key, or is getting credentials the blocker?