Hi I'm having issues building my Zap with SignNow. I'm trying to extract the email of the Signer from the response data, but because the Signers portion of the response data is a nested array Zapier appears to just flatten the values into the key Name.
So instead of getting a consistent Key named 'Signers' to reference I instead get key = 'Signers FIRSTNAME LASTNAME' which varies each instance of the zap and causes it to break.
I only need the email that is stored in this section to be able to lookup their account via our CRM but can't get it to run consistently because of this key naming issue. Is there some way I can parse through the raw response data of this trigger?
Screenshot of Response Array
Screenshot of Zapier Object with Flattened Key Name
Related
I want to make an app on zapier. Every process I have done clearly according to zapier request. My each process got success by zapier like API authentication and all. When I run my app on zapier I get authenticate, but at last it gives an error
" Got a result missing the "id" property ".
What should I do? I think zapier want id property in the front position of the array, but during authentication my element in array got fluctuate and I got id in below position.
There's more info about that message here: https://zapier.com/developer/documentation/v2/ZDE009/
Basically, you need to return an array of objects from your trigger, and each item in the array must have an "id" property.
in the front position of the array
the order doesn't matter, since all of the objects need one.
I need to get all the data from StoreClient (Javascript). The format of the data on the below picture, they are in Zapier Storage.
const store = StoreClient('mysecret');
const value = await store.getMany('mykey'); // or store.get('mykey')
return {result: value}
This code works well. But I need to take and process all stored keys in a loop along with all their child value. I did not find a way :(
I tried store.list_pop(key), but the lists have a different storage format. And the data is not retrieved.
I would recommend using Zapier's storage API which will allow you to retrieve all stored data through a GET request to https://store.zapier.com/api/records. I often have to do the same thing and this works for me.
Have a look at their documentation here. I typically code in Python using the requests library. But I'm sure you could achieve similar results using an ajax or fetch request in Javascript.
EDIT
If I am understanding your question correctly you are trying to 'GET' all of your data stored in Zapier's storage client. As per their API documentation:
Zapier stores your data as a dictionary object which can hold key value pairs. Those values can also be nested dictionaries or lists. Regardless of how you store the data (simple key value pairs, nested lists, nested dictionaries, or some combination of the preceding) a 'GET' request will return the entire object. As stated before I typically use Python's request library to handle HTTP requests but I was able to achieve the same result using a Javascript fetch request. I setup a dummy storage account at https://store.zapier.com/api/records?secret=dog to test and illustrate how this works. See my code below.
var url = "https://store.zapier.com/api/records?secret=dog";
const res = await fetch(url);
const body = await res.json()
return {JSON : body}
Unfortunately, due to my lack of familiarity with Javascript I had to bake the secret into the url, which I don't think is ideal, but for the purposes of this example it does the job. See my output below.
As you can see the 'GET' request returned all data stored in my Zapier storage account. I simply returned the data I retrieved from the 'GET' request but you could of course loop through the results and execute logic as needed. This does not modify any of the data stored, what I often do is pull in all of my stored date with a 'GET' request, modify it, delete the old storage, and 'POST' my modified storage information. This allows me to limit my requests to two calls rather than modifying each individual value.
I have to show the response with same order as I have received from my backend team.
But the response sequence is getting changed on extracting the values from Dictionary and array.
Please check the attached screenshot and suggest .
On extracting , I am getting 7703 but I need 5599 for showing the same position as in my website and in my application
Dictionary is not an ordered collection. You should create custom model class and use array of models.
You can use famous third party https://github.com/jsonmodel/jsonmodel
for mapping json to array of models.
Or you can sort dictionary keys (dict.allKeys) or values (dict.allValues)
I want to obtain a single value from a web service in JSON, just a file name i.e. "picture.png"; based on some parameters passed.
Can IOS (I guess NSJSONSerialization JSONObjectWithData:) handle this single value in JSON or on the server side should I have it send a dictionary key as in {"pic": "picture.gif"}
If there is no picture, I am returning "nopic" so again should I have it return "error" or {"error": "nopic"}
I gather the various JSON specifications are conflicting on this point so my interest is just practical...how best to handle this case.
Thanks for any guidance on this
I am currently creating an MVC application that is currently getting a value from a post from a webhook. I think that the problem is that the application is getting the value from the POST verb but then it is not displaying it because the Get verb is being used to display the View so both Verbs are counter acting each other.
The webhook will fire A Json payload to my application successfully because I have code in it that will send the Json payload in a variable via email to my email account.
Dim body = issue.issue.key
mail.Body = body
That is in a try catch block because in order for it to have a value it must have a value in it and the application will perform the GET first, so there is a null value in the body variable, then it does the POST to get the value but it will not display the value, refreshing will just perform the GET preventing it from being displayed. How can I perform both actions at the same time so I can display a value in a ViewBag for example.
ViewBag.response = status + key
This is the type of structure that I would like to implement to try and fix the error but I do not know how to complete all of the steps:
This is what I have got so far:
The POST is coming in from a webhook and I am reading it like this.
Dim reader As System.IO.StreamReader = New System.IO.StreamReader(HttpContext.Request.InputStream)
Dim rawSendGridJSON As String = reader.ReadToEnd()
Dim tempVar As Rootobject = JsonConvert.DeserializeObject(Of Rootobject)(rawSendGridJSON)
System.Diagnostics.Trace.TraceError(rawSendGridJSON)
I am then trying to store the post values in a table like this:
Public Function CallBack(tempTable as temporaryTable)
Dim tempVar As Rootobject = JsonConvert.DeserializeObject(Of Rootobject)(rawSendGridJSON)
tempVar = temporaryTable.tempVar
I then save the new items in the actual table in the database, then I try to display it in a view on another page. This is not working correctly and the problem lies with this line, as the post is not being correctly read in at the right time. (The value is processing correctly as I can use an email method to send the variables in an email back to the application but this application needs to be real-time efficient code).
Is there a better way to use this method and how can I invoke this process that I want to do properly so that I can display the correct information?
Update
To clarify, there are two posts that are happening, the first one is when the user enters in information and submits it. This is then stored in a database and send to JIRA via email. Once JIRA receives the information, it is sends a HTTP POST webhook JSON Payload back to my application with updated information. I then have deserialized the JSON Payload into a variable called issueKey.
The problem is that on the View page that the information is sent to will automatically display a null value first before the value is sent to it, I want the application to work so that it will actually display/store in a database the values from the Webhook JSON Payload but I cannot figure out how to display the values.
I have now set up a communication channel from SignalR to my MVC application, at the moment it is being received by the MVC and I have set up a SignalR chat Hub in my MVC application, but I don't know how to integrate them, how can this be done?
As I understand it, there are two flows at work here. The user posts data, which triggers an email to Jira. Then sometime later (usually quite fast, but not always) JIRA triggers a webhook in the web application with some updated information, and you want to display this updated information to the user somehow, or at least inform the user when the updated information comes back from JIRA.
I would implement a standard Post-Redirect-Get for the user initiated part (as per br4d's comment). I.e. a post to store the data in the database and send email to jira, which returns a redirect to a get which shows the data stored in the database.
Now for the other part I would use signalr to set up some sort of communications channel to the user. The webook could then send a signal (of sorts) through the communication channel to the users browser and either display the data, or trigger a refresh of the page (if you are updating the database with data from Jira).
It is unclear if you are doing straigt mvc, or some sort of SPA application, but it is not really important. The users browser has no way of knowing about the webhook (which is a part of the webapplication and unrelated to the users session), and you need some sort of communication between the webapplication and the browser, and for this signalr is very very good.