diff --git a/packages/server/src/integrations/rest.ts b/packages/server/src/integrations/rest.ts index dc63b961c4..3262aba980 100644 --- a/packages/server/src/integrations/rest.ts +++ b/packages/server/src/integrations/rest.ts @@ -151,6 +151,9 @@ class RestIntegration implements IntegrationBase { data = data[keys[0]] } raw = rawXml + } else if (contentType.includes("application/pdf")) { + data = await response.arrayBuffer() // Save PDF as ArrayBuffer + raw = Buffer.from(data) } else { data = await response.text() raw = data