<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Convert document to base64 string</title><link>https://community.appian.com/discussions/f/integrations/28729/convert-document-to-base64-string</link><description>Hi all, We need to send a document from appian to an external system which receives document as a part of json with document converted into base64 string. For example: { 
 &amp;quot;name&amp;quot;:&amp;quot;Document_name&amp;quot;, 
 &amp;quot;document&amp;quot;:&amp;quot;base64 string encoded document&amp;quot; } 
 The request</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Convert document to base64 string</title><link>https://community.appian.com/thread/121780?ContentTypeID=1</link><pubDate>Thu, 16 Nov 2023 09:04:56 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4e92ccfb-00db-42ec-b3de-bf671cb10d73</guid><dc:creator>sarathkumar13</dc:creator><description>&lt;p&gt;Content type is JSON&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Convert document to base64 string</title><link>https://community.appian.com/thread/121779?ContentTypeID=1</link><pubDate>Thu, 16 Nov 2023 09:02:54 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ce5a2f36-fe05-49ea-9fc9-3095be286cac</guid><dc:creator>pittalakirank0001</dc:creator><description>&lt;p&gt;I have tried the same, but we are receiving 500 internal server error. What is the content type you are passing is it &amp;quot;Json&amp;quot; or &amp;quot;Document Auto detect&amp;quot; ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Convert document to base64 string</title><link>https://community.appian.com/thread/121778?ContentTypeID=1</link><pubDate>Thu, 16 Nov 2023 08:59:58 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2305246a-c0eb-4611-9f4c-ce341cd23a66</guid><dc:creator>sarathkumar13</dc:creator><description>&lt;p&gt;I used todocument() function to achieve it. Pass the document id as parameter to this function and rest appian will take care&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Convert document to base64 string</title><link>https://community.appian.com/thread/121774?ContentTypeID=1</link><pubDate>Thu, 16 Nov 2023 08:52:18 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6b52b26b-745f-4886-9eee-fed7c347f223</guid><dc:creator>pittalakirank0001</dc:creator><description>&lt;p&gt;@&lt;a class="internal-link view-user-profile" href="/members/sarathkumarr0001"&gt;Sarathkumar R&lt;/a&gt;&amp;nbsp;- I&amp;#39;m facing the same issue, How did you fixed that ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Convert document to base64 string</title><link>https://community.appian.com/thread/113015?ContentTypeID=1</link><pubDate>Fri, 19 May 2023 08:57:09 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ec9ae5d0-bdfd-4017-8388-d15dc1248c6e</guid><dc:creator>sarathkumar13</dc:creator><description>&lt;p&gt;ok thanks stefan&lt;br /&gt;will check on it&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Convert document to base64 string</title><link>https://community.appian.com/thread/113014?ContentTypeID=1</link><pubDate>Fri, 19 May 2023 08:53:21 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fa814db6-7c34-441c-b965-96d57e71a37e</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;If your last sentence refers to the documentation posted above, then yes.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Convert document to base64 string</title><link>https://community.appian.com/thread/113010?ContentTypeID=1</link><pubDate>Fri, 19 May 2023 08:12:57 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f4932c7d-9155-4c96-ab82-2b0b67d9c05f</guid><dc:creator>sarathkumar13</dc:creator><description>&lt;p&gt;This is a sample of the code how it will look like and how i have implemented&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;&amp;quot;name&amp;quot;:&amp;quot;Document_name&amp;quot;,&lt;/p&gt;
&lt;p&gt;&amp;quot;document&amp;quot;:todocument(documentID)&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;So Stefan, you are saying that if we use base64 encoding in appian, it will give us the &lt;strong&gt;base64 string&lt;/strong&gt;&amp;nbsp;and we dont need to worry much about it. It will just pass it as the string to the external system&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Convert document to base64 string</title><link>https://community.appian.com/thread/113008?ContentTypeID=1</link><pubDate>Fri, 19 May 2023 08:07:50 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2984350d-ffa9-4fa1-ac58-acf6cbb93c49</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;As explained in the documentation, Appian will take care of the base64 encoding automatically if done as described. Do you want to share your current configuration?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Convert document to base64 string</title><link>https://community.appian.com/thread/113002?ContentTypeID=1</link><pubDate>Fri, 19 May 2023 07:28:42 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ce34786f-b6ed-40b9-9985-7cbaacf7d9b5</guid><dc:creator>Sunil Choudhary</dc:creator><description>&lt;p&gt;I think you should use&amp;nbsp;encodebase64string()&amp;nbsp;function to achieve your requirement, may it is useful.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Convert document to base64 string</title><link>https://community.appian.com/thread/113001?ContentTypeID=1</link><pubDate>Fri, 19 May 2023 06:52:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:347180e9-fb3c-4cdc-bd6e-86c39bb61534</guid><dc:creator>sarathkumar13</dc:creator><description>&lt;p&gt;I tried using 1st method, we had error like file too complex from the integration response. So not sure if this is the way to do it.&amp;nbsp;&lt;br /&gt;its saying to use todocument() which is returning the document name. The external system needs the document in base64 string.&lt;br /&gt;&lt;br /&gt;the base64 string should look something like this : &amp;quot;VGVzdCBkb2N1bWVudCA3ODM0dGhxaXJ1aXJnaFdSTEdKUVJPR0hBRVJWQU5HT0xRUkhHT0xRUkdKSU9HSFFLQU5SU0dPcXczNWhnb2h3cmthdnJpb2d1cWdqYWhma3JnS0ZVR0hL&lt;strong&gt;&amp;quot;&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Will this be taken care if we use todocument inline with json??&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Convert document to base64 string</title><link>https://community.appian.com/thread/112995?ContentTypeID=1</link><pubDate>Fri, 19 May 2023 05:55:51 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:58bd1831-d4ac-4d18-a394-11322beb8a12</guid><dc:creator>Sunil Choudhary</dc:creator><description>&lt;p&gt;Hi Sarath,&lt;/p&gt;
&lt;p&gt;Maybe this can be helpful for you&amp;nbsp;&lt;a href="https://docs.appian.com/suite/help/23.1/Integration_Object.html#sending-base64-inline-with-json"&gt;https://docs.appian.com/suite/help/23.1/Integration_Object.html#sending-base64-inline-with-json&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;And also you can see conversations of the same questions may it helps.&lt;/p&gt;
&lt;p&gt;&lt;a href="/discussions/f/general/21241/document-to-base64-conversion-using"&gt;https://community.appian.com/discussions/f/general/21241/document-to-base64-conversion-using&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>