So one thing I’ve never understood too well is what I’m supposed to do when I get this dropdown? Whatever I seem to choose, it always leads to more and more options, never making the workflow valid.
Essentially, I’m connected to an API which is supposed to return a LinkedIn URL, Twitter user id and username, but all 3 are red and I’m not sure what to set in order to turn them blue.
Normally when these are red, its because the type of thing that you are setting the data to is either
The incorrect data type or
You are trying to set a singular thing to a list of things or vise versa
Check what types “twitter username” and “twitteruserid” are under the data tab on the left, then without clicking on it, hover over the red text and see what description appears. It should say something like “Evaluates to a…”
If the type of data and the expression for what it evaluates to does not match, bubble will keep these red.
Take some more screenshots of what I described above, I can walk you through this
In addition to what Anthony said, hover your mouse over “profile’s username” or “profile’s userid” and it will tell you what it evaluates to. If it says “evaluates to a text” then go back to yoru database setup where the field is “Twitter username” and see if Twitter username is set to text or a list of texts. If it is set to “text” then that is the reason you are getting the red. You will need to choose one of the items in that list in your screenshot that stars with a colon (i.e. “:”) such as first item. It could be that the api returns a list and you need to pick a particular item from that list. If the first item is not what you want, pick “:item #” to specify the nth item. Or you might need to filter the list
The only problem is that the data I’m trying to show is from an API - so it’s not going to be a data field that we can check under the data tab on the left.
And the API would return fields that are different for every search, and sometimes some of the fields may be missing, or have more than 1 entry.
What sort of screenshots do you think would help explain this if I were to share more?
On the same screen as your screenshot in your post, hover over “Twitter username” The one in white text, and take a screenshot of what tooltip appears after you hover for a few seconds
Then Hover over “username” in the red part from the API call. Thats the “FC API - ALL Contact Info’s profiles’s username” but just hover over the word “username” and take a screenshot of the little tooltip box that appears
Hey Anthony, so the first thing in terms of hovering on ‘Twitter Username’ doesn’t enable anything to happen. When I hover on that white text ‘Twitter Username,’ nothing happens.
But here is what comes up when I hover over the red text ‘Username’:
So it looks like Twitter username in white is of type text and “FC API - ALL Contact Info’s profiles’s username” is a list of text
You are trying to set a singular value of “Twitter username” to a list of values. And this is why your expression is red
As a simple example, click on the “more…” drop down and select “:first item” from the drop down. This will turn your expression blue
If the API call returns a list of usernames, and you need to save them, you either need to make “Twitter username” in white a list of texts in the data tab, OR you need to “schedule an api workflow on a list” on the list that the API returns
There’s good youtube tutorials on this, check this one out
You actually can get data back via a post request, it just depends on however the API provider is exposing its API, and how they are handling requests.
Which doesn’t make intuitive sense, because you aren’t "GET"ing anything, you are "POST"ing, but simply put yes. It is possible to get data back with a POST
Alright that makes sense then - I’ll see what I can do. Because most YT videos I’ve watched so far don’t cover any APIs that are similar to the one I’m currently using which is a shame so the videos are pretty much useless.
I’ll check out the one you sent previously though.
Thanks.
P.s. For anymore support - is it cool if I just come and drop a message here?
Hey Anthony, if I want to save the outputs received from the API, do I just make a new data type with all the fields I’d like to save - such as Twitter, LinkedIn etc?
Then in the workflows, do I create a new thing making each field equal to the repeating groups information or do I make it equal to the data being pulled from the API?
I’m attaching this screenshot above because I think it can explain it better - both options turn blue, but one is equal to the RG data and the other is equal to the ‘get data from external API.’
Thanks,
Mohamad
P.s. I’ve changed the API name - so that’s why it may look different
Hey Anthony, thanks for all the help so far - I finally managed to set up the API and every time I input something, the output is saved in a data set which is good.
But now we’re facing another issue.
The data is supposed to show up in a repeating group but for some reason we can’t get the RG to show any information even though the call is coming back with some info.
I feel it’s because of the data source being empty but in order to fill the data source I need a return value like this:
You make the repeating group the type of the API response, then in your repeating group, add a text element and make the text elements source " current cells body fullName"