Hello,
We are trying to create email drafts using web connectors.
We managed to easily create the e-mails drafts but the problem is that we cannot add attachments to them.
We are trying to pass a parameter that contains the file data as varbinary using both HTTP connector and the Web Connector
1.For the HTTP connector we have defined the following inputs:
![](https://uploads-eu-west-1.insided.com/thinkwise-en/attachment/b1b9200b-7f83-4b33-b457-0148d8e6b501.png)
The {file_storage} is a varbinary variable that contains the file in base64.
We have a task at the beggining and one af the end for checking the file storage values and they both show up as base64:
![](https://uploads-eu-west-1.insided.com/thinkwise-en/attachment/4dff881f-ddb2-4988-b333-1e4891df2a8d.png)
The task input parameter shown above also has the type varbinary.
When we run with the variable, we recieve this error:
![](https://uploads-eu-west-1.insided.com/thinkwise-en/attachment/190e3971-a2d0-409e-a9f9-3dfb0be68edb.png)
If we hardcode the {file_storage} with the result from the incoming_storage] value, the attachment is working fine and the file is not corrupted. Yet, if we use it as a variable defined in the process {file_storage}, then we receive the above error message followed by the code 400.
The conclusion we have is that the parameter is automatically converted to string when we enter it in the body of the HTTP request.
- For the Web Connector
For the Web connnector, we have designed a base URL one and an endpoint configured in the same manner as in the HTTP request
![](https://uploads-eu-west-1.insided.com/thinkwise-en/attachment/8aa2cfd3-0430-4fc6-844b-caf55ee45a87.png)
.We defined an input parameter named {file_storage}
![](https://uploads-eu-west-1.insided.com/thinkwise-en/attachment/54f702d6-a234-48a5-821e-aef56b6f2723.png)
This request works, it attach the file to the email but the file is corrupted, getting this error message when opening the PDF.
![](https://uploads-eu-west-1.insided.com/thinkwise-en/attachment/befc3e3c-cfdf-480f-86a8-8d19fadcbb05.png)
We think that the encoding to Base64 is not working as intended.
Thanks!