<?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>Appian Web API needs to exposed to start a process in Appian  with documents from external system</title><link>https://community.appian.com/discussions/f/integrations/19624/appian-web-api-needs-to-exposed-to-start-a-process-in-appian-with-documents-from-external-system</link><description>Is it possible to receive one or more documents from external system via Appian Web API to start a process in Appian with received documents from external system?</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Appian Web API needs to exposed to start a process in Appian  with documents from external system</title><link>https://community.appian.com/thread/76698?ContentTypeID=1</link><pubDate>Thu, 24 Sep 2020 07:34:48 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b96325ff-2097-4c49-8abb-14888539e838</guid><dc:creator>sandeepd</dc:creator><description>&lt;p&gt;Hi &lt;a href="/members/shakilahd875"&gt;Shakilah&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;Yes, it is possible. Please refer the document and sharing code snippet as well.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.appian.com/suite/help/20.3/passing-a-web-api-document-into-a-process-model.html"&gt;https://docs.appian.com/suite/help/20.3/passing-a-web-api-document-into-a-process-model.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Use below code as it is, only change Process model Constant:-&lt;/p&gt;
&lt;p&gt;a!localVariables(&lt;/p&gt;
&lt;p&gt;/*Check whether the request body contains a document*/&lt;br /&gt; local!success: not(or(rule!APN_isEmpty(http!request.body),isnull(http!request.body)) ), &lt;/p&gt;
&lt;p&gt;if(&lt;br /&gt; local!success,&lt;/p&gt;
&lt;p&gt;/*If a document was uploaded, start the Upload Student Transcript process*/&lt;br /&gt; a!startProcess(&lt;br /&gt; processModel: cons!XYZCONSTANT,&lt;br /&gt; processParameters: {&lt;/p&gt;
&lt;p&gt;/*A document*/&lt;br /&gt; transcript: http!request.body,&lt;br /&gt; /*unid:http!request.headers.unid*/&lt;br /&gt; unid:http!request.queryParameters.docFolderName&lt;/p&gt;
&lt;p&gt;/*Metadata from parameters or headers*/&lt;br /&gt; /*studentId: http!request.queryParameters.studentId*/&lt;br /&gt; },&lt;br /&gt; onSuccess: a!httpResponse(&lt;br /&gt; statusCode: 200,&lt;br /&gt; headers: {},&lt;/p&gt;
&lt;p&gt;/*Print the document id, name, and extension of the uploaded document*/&lt;br /&gt; body: &lt;br /&gt; &lt;br /&gt; concat(&lt;br /&gt; &amp;quot;Upload Successful: &amp;quot;,&lt;br /&gt; document(http!request.body, &amp;quot;id&amp;quot;),&lt;br /&gt; &amp;quot; - &amp;quot;,&lt;br /&gt; document(http!request.body, &amp;quot;name&amp;quot;),&lt;br /&gt; &amp;quot;.&amp;quot;,&lt;br /&gt; document(http!request.body, &amp;quot;extension&amp;quot;)&lt;br /&gt; )&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; ),&lt;br /&gt; onError: a!httpResponse(&lt;br /&gt; statusCode: 500,&lt;br /&gt; headers: {},&lt;br /&gt; body: &amp;quot;500 Internal Server Error&amp;quot;&lt;br /&gt; )&lt;br /&gt; ),&lt;/p&gt;
&lt;p&gt;/*If no document was uploaded, return an error code*/&lt;br /&gt; a!httpResponse(&lt;br /&gt; statusCode: 400,&lt;br /&gt; headers: {},&lt;br /&gt; body: &amp;quot;400 Document Not Provided&amp;quot;&lt;br /&gt; )&lt;br /&gt; )&lt;br /&gt;)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;br /&gt;Sandeep&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Appian Web API needs to exposed to start a process in Appian  with documents from external system</title><link>https://community.appian.com/thread/76692?ContentTypeID=1</link><pubDate>Thu, 24 Sep 2020 06:04:47 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b9fbef70-1158-4d20-b158-bc820be97c7b</guid><dc:creator>ekanshj</dc:creator><description>&lt;p&gt;Hi &lt;a href="/members/shakilahd875"&gt;Shakilah&lt;/a&gt;&lt;br /&gt;Please refer to the Appian documentation for your requirement&lt;br /&gt;&lt;a href="https://docs.appian.com/suite/help/20.3/passing-a-web-api-document-into-a-process-model.html"&gt;https://docs.appian.com/suite/help/20.3/passing-a-web-api-document-into-a-process-model.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>