Hi there,
Is it possible to read PDF files from an SFTP and send them as Gmail attachments through Celigo?
If so can you kindly share a documentation with me?
Thanks
Hi there,
Is it possible to read PDF files from an SFTP and send them as Gmail attachments through Celigo?
If so can you kindly share a documentation with me?
Thanks
I think you asked a similar question a few years ago. The Google Mail connector doesn't support sending attachments, but you could do it through a universal HTTP connection. According to Google Mail's REST API, you can upload an attachment as multipart/form-data. Here are some steps you'll need to follow:
If you have any further questions, feel free to comment here or make a separate post in the community! Thanks!
A note: I've moved your post to the Troubleshoot custom flows section of the Community for more visibility.
Thanks Kathyana.
@tharakaathukorala it's possible, but not easy. There is a template in the marketplace that I created for sending google mail emails with attachments, but it requires you to have the file represented as a base64 encoded string. So the main issue is converting the pdfs you get from your FTP server and converting it the base64 encoded string. We don't currently have a way to convert the blobKey you get into this. You would need to make an intermediate step to convert the blob to base64 encoded string like this: https://connective.celigo.com/t/faq-convert-a-blob-key-to-base64-string-for-import/358 Alternatively, if you have NetSuite, I could create a better method using NetSuite as an intermediary and post it here.
Hi Tyler,
Appreciate your guidance.
We also already created an integration to send base64 encoded JSON data as attachments via a Gmail HTTP connector.
import sjcl from 'sjcl';
base64Encode: (str) => {
return sjcl.codec.base64.fromBits(sjcl.codec.utf8String.toBits(str));
}
Now we are stuck on sending PDFs through Gmail. According to my understanding, the Celigo does not support converting PDFs to base64 string.
I will further dig into your solution.
Thanks again.