Hi folks,
I'm trying to do some automation, but wanted to know if you can attach multiple documents to one request? It allows me to attach one document and fax successfully, but not a second or multiple. For example, this is what I have when writing it in JSON:
Request URL: https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/extension/~/fax
Request Body: [ { "control_type": "text", "label": "To", "name": "to", "type": "string", "optional": false }, { "control_type": "text", "label": "Cover index", "name": "coverIndex", "type": "string", "optional": false }, { "control_type": "text", "label": "Cover page text", "name": "coverPageText", "type": "string", "optional": false }, { "name": "attachments", "type": "array", "optional": false, "binary_content": "false", "properties": [] } ]
Yes, you can send multiple attachments. Just make sure the total of all attachments size must not exceed the max size of 50MB. See this code sample using the RingCentral JS SDK.
async function send_fax() { try{ var endpoint = "/restapi/v1.0/account/~/extension/~/fax" var FormData = require('form-data'); formData = new FormData(); var body = { to: [{'phoneNumber': "RECIPIENT_NUMBER", 'name': "Recipient name" }], faxResolution: "High" coverPageText: "This is a demo Fax page from Node JS\n \ Recipient company\n \ Sender name\n \ Fax number\n \ Subject is subject\n \ Comments/Notes" } formData.append('json', new Buffer.from(JSON.stringify(body)), { filename: 'text.json', contentType: 'application/json' }); formData.append('attachment', require('fs').createReadStream('first_file.jpg')); formData.append('attachment', require('fs').createReadStream('second_file.png')); var resp = await platform.post(endpoint, formData) var jsonObj = await resp.json() console.log("FAX sent. Current status: " + jsonObj.messageStatus + "/" + jsonObj.id) }catch(e){ console.log(e.messsage) } }
See the dev guide documentation for more details
I am not a Workato expert. You can either ask Workato support or check this out since you said that it is similar to Postman.
Cool, thanks for that.
Hi @Sy Hasan
From what I know and what I have tested, you have an option of attaching multiple files/documents to fax but they will get converted to a single pdf file (with multiple pages) and will be sent to the recipient.
What that means is that the recipient will have a single document with multiple pages in it which can represent different documents attached from the source.
Could you share more details about your use case and am I understanding it correctly that you want the recipient to receive multiple documents instead of a single file with multiple pages?
A new Community is coming to RingCentral!
Posts are currently read-only as we transition into our new platform.We thank you for your patience
during this downtime.
Try Workflow Builder
Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!Try RingCentral Workflow Builder