<?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>Docusign Webhook POST API - how to get body?</title><link>https://community.appian.com/discussions/f/integrations/34781/docusign-webhook-post-api---how-to-get-body</link><description>Hi All - I&amp;#39;ve created an integration with Docusign and have configured the Web API to receive a response from Docsign when the document is signed. Docusign responds and successfully kicks off the process, but I can&amp;#39;t figure out how to pull the envelopeid</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Docusign Webhook POST API - how to get body?</title><link>https://community.appian.com/thread/135178?ContentTypeID=1</link><pubDate>Sat, 11 May 2024 04:44:15 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3dd6c906-1bba-4a0a-a228-dd0a6fd0ad5d</guid><dc:creator>NewBegineer</dc:creator><description>&lt;p&gt;Hi nish,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Could you please me in understanding the webhook connection steps and for events like Envelope complete we have to hits a web API in Appian to start a process model.&lt;/p&gt;
&lt;p&gt;Iam trying since so long but I could able to complete.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Docusign Webhook POST API - how to get body?</title><link>https://community.appian.com/thread/134687?ContentTypeID=1</link><pubDate>Fri, 03 May 2024 14:21:35 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fa7abf6f-0b5f-48a8-8f51-c6b9af4bf36d</guid><dc:creator>ian.nish</dc:creator><description>&lt;p&gt;Hi Steph, how did you set up the webhook on the DocuSign side? I&amp;#39;m in the middle of creating this same thing&amp;nbsp;on a project and struggling to get the Webhook to connect. Nevermind! Got it working :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Docusign Webhook POST API - how to get body?</title><link>https://community.appian.com/thread/134275?ContentTypeID=1</link><pubDate>Thu, 25 Apr 2024 14:39:12 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5bfbb4a3-ad61-4745-8746-497dab126aae</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;fromJson turns the JSON string into an Appian dictionary in which you can navigate using dot-notation&lt;/p&gt;
&lt;p&gt;data.envelopeSummary.status&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Docusign Webhook POST API - how to get body?</title><link>https://community.appian.com/thread/134274?ContentTypeID=1</link><pubDate>Thu, 25 Apr 2024 14:33:44 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6c3e441b-ba39-400a-9526-0addbd102fe6</guid><dc:creator>StephK</dc:creator><description>&lt;p&gt;OK, thanks for all the details and suggestions.&amp;nbsp; I was able to get the entire body into the process either as the straight json, or converted using a!fromjson. Both of those options work to get the text into a variable. BUT, I&amp;#39;m still not able to figure out how to parse and extract fields. (I did accomplish the same by using regex patterns, but that&amp;#39;s not the best approach for a formatted file!).&lt;/p&gt;
&lt;p&gt;I wonder if it&amp;#39;s b/c the json is nested into sections?&amp;nbsp; how would I notate the extract as the json looks like this - I need the object / data / envelopeId:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks again for the help!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/18/pastedimage1714055589891v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Docusign Webhook POST API - how to get body?</title><link>https://community.appian.com/thread/134217?ContentTypeID=1</link><pubDate>Thu, 25 Apr 2024 05:59:01 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4193dbe8-eef8-4fa2-9c0c-c3de5d631416</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;That has the drawback that, in case the JSON is invalid, you have a failed process instance you need to take care of.&lt;/p&gt;
&lt;p&gt;I try to add input data validation code directly to the API to only start further processing if the incoming data is good.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Docusign Webhook POST API - how to get body?</title><link>https://community.appian.com/thread/134208?ContentTypeID=1</link><pubDate>Thu, 25 Apr 2024 04:31:47 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:dbfda100-f3f9-4e26-b8c0-f3dfa80f5c23</guid><dc:creator>SRINIVAS M</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In your Appian process model, create a variable of type Text or dictionary to receive the raw JSON payload. Modify your Web API to pass &lt;code&gt;http!request.body&lt;/code&gt; directly into the process variable you created..&amp;nbsp;In your process model, parse the JSON from the Text variable into a Dictionary using &lt;code&gt;a!fromJson()&lt;/code&gt; within a Script Task.and after parsing, extract &lt;code&gt;envelopeId&lt;/code&gt; and &lt;code&gt;documentId&lt;/code&gt; from the Dictionary variable in subsequent Script Tasks or Gateways.&lt;/p&gt;
&lt;p&gt;a!startProcess(&lt;br /&gt; processModel: cons!WMO_Docusign_Receive,&lt;br /&gt; processParameters: { jsonText: http!request.body },&lt;br /&gt; onSuccess: a!httpResponse( /* success response */ ),&lt;br /&gt; onError: a!httpResponse( /* error response */ )&lt;br /&gt;)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;And in your process model, you would have a parameter, let&amp;#39;s say &lt;/span&gt;&lt;code&gt;jsonText&lt;/code&gt;&lt;span&gt;, to capture the raw JSON. Then, in the first Script Task.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;local!jsonData: a!fromJson(local!jsonText),&lt;br /&gt;local!envelopeId: local!jsonData.envelopeId,&lt;br /&gt;local!documentId: local!jsonData.documentId&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;---By doing this, the process starts with the complete JSON payload, which you then parse and manipulate within the process model. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;if this solution is not working , please ignore&amp;nbsp;&lt;/em&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Docusign Webhook POST API - how to get body?</title><link>https://community.appian.com/thread/134204?ContentTypeID=1</link><pubDate>Wed, 24 Apr 2024 23:39:48 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2659fb74-c718-448e-9bed-47303eff06b7</guid><dc:creator>Mathieu Drouin</dc:creator><description>&lt;p&gt;I would actually suggest not doing a!fromJson before starting the process (in the odd event that there is something wrong with the json that was sent) that prevents the process from starting.&lt;/p&gt;
&lt;p&gt;Have one start parameter for your process (i.e. json) and parse the json using&amp;nbsp;a!fromJson in a script task.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Docusign Webhook POST API - how to get body?</title><link>https://community.appian.com/thread/134189?ContentTypeID=1</link><pubDate>Wed, 24 Apr 2024 18:23:24 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ae764baf-94a9-41b1-9cc2-0eddbc202e82</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;I understand. I think the example code is a bit ... unfortunately chosen.&lt;/p&gt;
&lt;p&gt;It just passes the decoded JSON structure to the process. Now, the process model needs to provide multiple process variables, configured as parameters, to accept the individual top level values.&lt;/p&gt;
&lt;p&gt;So, if the JSON response looks like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="json"&gt;{
  &amp;quot;alpha&amp;quot;: &amp;quot;one&amp;quot;,
  &amp;quot;beta&amp;quot;: {
    &amp;quot;one&amp;quot;: 1,
    &amp;quot;two&amp;quot;: 2
  },
  &amp;quot;gamma&amp;quot;: 12345
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;... your process needs three parameter variables alpha, beta and gamma of the types Text, Map and Integer.&lt;/p&gt;
&lt;p&gt;You could also change the code in the API to pass the whole structure into a single variable.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;processModel: cons!WMO_Docusign_Receive,
processParameters: {
  your_process_variable: a!fromJson(
    http!request.body
  )
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;... then create one process variable named &amp;quot;your_process_variable&amp;quot; of type Map and make it a parameter.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Docusign Webhook POST API - how to get body?</title><link>https://community.appian.com/thread/134188?ContentTypeID=1</link><pubDate>Wed, 24 Apr 2024 18:11:52 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0d788f4f-88c3-4987-ab24-ab56ea665d7b</guid><dc:creator>StephK</dc:creator><description>&lt;p&gt;And if I manally paste the Docusign http body into my API configuration Test screen, it does convert it properly. I just don&amp;#39;t know how to access that in the process.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Docusign Webhook POST API - how to get body?</title><link>https://community.appian.com/thread/134187?ContentTypeID=1</link><pubDate>Wed, 24 Apr 2024 18:09:57 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:373e8eb0-795b-448b-a928-c560d8482bdc</guid><dc:creator>StephK</dc:creator><description>&lt;p&gt;here&amp;#39;s the code that came with the start process Web Api.&amp;nbsp; I see the http!request body is supposed to get populated into the processParameters dictionary, but I can&amp;#39;t figure out how to access it from there.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;By &amp;quot;Start Trigger Panel&amp;quot;, I was playing with the Start options in the process, to see if I was supposed to configure the message body into something there.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;a!startProcess(&lt;br /&gt;&amp;nbsp; processModel: cons!WMO_Docusign_Receive,&lt;br /&gt;&amp;nbsp; processParameters: a!fromJson(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; http!request.body&lt;br /&gt;&amp;nbsp; ),&lt;br /&gt;&amp;nbsp; onSuccess: a!httpResponse(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; statusCode: 200,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; headers: {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a!httpHeader(name: &amp;quot;Content-Type&amp;quot;, value: &amp;quot;application/json&amp;quot;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; },&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; body: a!toJson(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fv!processInfo&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;br /&gt;&amp;nbsp; ),&lt;br /&gt;&amp;nbsp; onError: a!httpResponse(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; statusCode: 500,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; headers: {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a!httpHeader(name: &amp;quot;Content-Type&amp;quot;, value: &amp;quot;application/json&amp;quot;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; },&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; body: a!toJson(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; error: &amp;quot;There was an error starting the process&amp;quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;br /&gt;&amp;nbsp; )&lt;br /&gt;)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Docusign Webhook POST API - how to get body?</title><link>https://community.appian.com/thread/134186?ContentTypeID=1</link><pubDate>Wed, 24 Apr 2024 17:53:18 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:416ba637-1b41-4317-94db-b9ff27110e99</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;When you follow the built in Web API example &amp;quot;Start Process&amp;quot;, most of the things should already be set up. Can you share the code of the web API Appian object?&lt;/p&gt;
&lt;p&gt;Not sure what you mean with &amp;quot;Start Trigger Panel&amp;quot; ...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>