Is it possible to create a file, while gathering three files in one?
For example, I want to make automation for creating one file with three PDFs. That file should have proof of delivery, invoice and RC
Thank you for your help!
Is it possible to create a file, while gathering three files in one?
For example, I want to make automation for creating one file with three PDFs. That file should have proof of delivery, invoice and RC
Thank you for your help!
Hi @SanjaNikolic,
we currently have no action in the automations to merge PDF files. But we have planned this as soon as we receive enough requests.
You are welcome to create a feature request for this.
The editor where you placed the file variables is unfortunately only for text. But you can create a new PDF from the contents of all other 3 PDF files with static text and variables.
Best regards
Leo
Now that Procfu is starting to support Tape, I might recommend going into their Podio support workspace and possibly adding a feature request for this script:
In principle, the process should be the same for combining PDFs, it’s just the process for collecting the file IDs for the individual fields and then updating the correct field with the new file ID that’s the challenging bit.
Just a suggestion for how you might get what you’re looking for!
Whilst both Leo and Andrew are correct I thought I would give you an alternative:
This uses an API service called ConvertAPI to merge the PDFs the automation I have used in the above example is:
The script is:
const api = collected_api_key_field_apikey_value;
const d = {
"Parameters": [
{
"Name": 'Files',
"FileValues": [
{ "Url": demo___pdf_merge_field_pdf1_file_url },
{ "Url": demo___pdf_merge_field_pdf2_file_url }
]
}
]
};
const { data } = await http.post(
`https://v2.convertapi.com/convert/pdf/to/merge`,{
headers: {
"Authorization": `Bearer ${api}`,
"Content-Type": "application/json"
}
data: d
}
);
console.info(JSON.stringify(data));
const newPDF = Buffer.from(data.Files[0].FileData, 'base64');
const { data: uploadedFile } = await tape.File.upload({
filename: 'updatedPDF.pdf',
source: newPDF,
});
var_pdf = uploadedFile.file_id;
Thank you Jason, we will try this out !
Hey Jason, I just tried this, and I don’t have an option for ConvertAPI. I also don’t have API keys folder, thank you
Oh sorry, I was obviously not clear in what I said:
ConvertApi is a separate service you must sign up for and then use. They provide a document conversion service useable via an API in a similar way to OpenAI (ChatGPT) have an API you can use for AI services.
I hope that makes sense and sorry for the confusion.