Automate a workflow and am running into a file corruption issue

I’m trying to automate a workflow and am running into a file corruption issue. I’m hoping someone can spot what I’m doing wrong.

The Goal:
When a survey is completed in NestForms, I want to take the generated PDF from that submission and upload it to a “File” field in the correct record in my Tadabase app.

My Make.com Scenario:
My scenario is set up as follows, and it runs to completion without errors:

  1. Webhooks (Custom webhook): Receives the full JSON payload from NestForms.

  2. Webhooks (Webhook response): Immediately sends a 200 OK status to prevent timeouts.

  3. Iterator: Correctly pulls the Record ID from the JSON data.

  4. Tadabase (Upload a File): The final step, configured to upload the PDF.

What’s Working:

  • The scenario triggers correctly every time.

  • The Record ID is read successfully.

  • The scenario completes without any timeout or API errors.

  • A file with the correct name is successfully created in the correct Tadabase record.

The Problem:
The PDF file that gets uploaded to Tadabase is always corrupted and cannot be opened.

About the Data:
The JSON from NestForms provides the PDF as a Base64 encoded string. I have tested this Base64 string independently, and it decodes into a perfectly valid and readable PDF. This confirms the source data is good.

What I Have Already Tried in the Tadabase Module:

To solve the corruption, I have tried sending the data in two different ways, and both failed:

  1. Converting to Binary: Using Make’s base64() function on the PDF string to send binary data.

  2. Sending Raw Text: Sending the raw Base64 text string directly without using any function.

Both methods result in an unreadable file in Tadabase. Since the source data is valid and the scenario runs without error, it seems to be an issue with how the file data is being processed or sent by the Tadabase module.

Could anyone advise on the correct way to handle a Base64 encoded file upload for Tadabase within a Make.com scenario?

Thank you for your help.

I got into a similar situation with attachements and PDF’s earlier this week but managed to sort it out, it may be related to your problem. Would you be willing to share with me (some dummy data) the PDF data output that you’re mapping to the data field on the Tadabase file upload module? I’d like to run it through my process and see if I can it to upload to TB…

1 Like

Hi

This is what I got from make.com support.

I have checked the scenario and I see that the file data from the webhook is in base64. You will need to convert to binary with this expression:

This fixed the issue

Hopefully this is some help to some other user in the future tks Noel

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.