How to pass data to IFTTT WebHook? - google-sheets

I have a task to add row into Google Sheet when WebHook received. Now I'm trying to setup IFTTT but have some problem
It says that I should use URL like https://maker.ifttt.com/trigger/{event}/with/key/{my_key} and that is ok I can do it. But it needs to send some data in request and the only way my system can do it appends it to query string like https://maker.ifttt.com/trigger/{event}/with/key/{my_key}?name1=Alex&name2=Helen
But IFTTT doesn't see my data. it says that it can see data in attached JSON but I can't use JSON.
So is there any way to pass my data to IFTT in a query string or shell I forgot IFTTT and investigate how to connect directly to Google Sheet?

IFTTT Maker webhooks can only take data with keys of "value1", "value2", and "value3". Try sending it with:
https://maker.ifttt.com/trigger/{event}/with/key/{my_key}?value1=Alex&value2=Helen

Try using https://bitly.com/ which will shorten and convert the query params to a path param. That worked for me.

First thing first, Web hooks are designed to accept data using POST method only and here you are sending data using GET, which is obviously not going to work, i guess.
Second, in order to get it work, one way is to use cURL request and send your JSON in Body with POST method.

Related

How to pass dynamic value to JSON as a API request in flutter flow?

I have two page
Login/Registration Page as of now
OTP Verification Page
API has been created and in api, we are passing phone number as request and gets otp as response. However i would like your help to know how should i able to pass the phoneNumber textfield data to APIcall json request in flutterflow?
If there is anyway or any documentation will be really helpful?
I have tried with variable method, however i was not able to pass it to json.
I have also tried jsonpath method, but no luck.
Define dynamic part of API url with brackets
https://jsonplaceholder.typicode.com/posts/[postId]
https://jsonplaceholder.typicode.com/comments?postId=[postId]
then create the variable (postId) with the same name. When adding the API call, it is required to add these variables.
See API Calls 101 for details.

How to pass parameters in Twilio's outbound calls?

I believe Twilio's outbound call could be HTTP POST request. Is there a way I can pass my custom POST body (json etc) when making outbound voice call request? I'm writing a generic call center where I would like to pass the conversation workflow when making outbound calls so that the code which receives the call knows how to run the conversation. I looked at the documentation (https://www.twilio.com/docs/api/twiml/twilio_request) and looks like we can only pass standard parameters (from, to etc). Thanks for any help.
I believe the only parameter you can customize is the Url Parameter.
Your JSON is pretty much a string (you might have to url encode it and also watch for the length), but you could put it in the query string of the Url Parameter.
?json=url_encoded_json

Parsing twitter json response

I've made a twitter api request (GET trends/place API) and the result is just like this:
[{"trends":[{"name":"#BabyIsStaying","url":"http:\/\/twitter.com\/search?q=%23BabyIsStaying","promoted_content":null,"query":"%23BabyIsStaying","events":null},{"name":"#AkTakipBa\u015fl\u0131yor","url":"http:\/\/twitter.com\/search?q=%23AkTakipBa%C5%9Fl%C4%B1yor","promoted_content":null,"query":"%23AkTakipBa%C5%9Fl%C4%B1yor","events":null},{"name":"#\u00c7apulcuTakip","url":"http:\/\/twitter.com\/search?q=%23%C3%87apulcuTakip","promoted_content":null,"query":"%23%C3%87apulcuTakip","events":null},{"name":"#SadeceKar\u015f\u0131l\u0131kl\u0131Takiple\u015fme","url":"http:\/\/twitter.com\/search?q=%23SadeceKar%C5%9F%C4%B1l%C4%B1kl%C4%B1Takiple%C5%9Fme","promoted_content":null,"query":"%23SadeceKar%C5%9F%C4%B1l%C4%B1kl%C4%B1Takiple%C5%9Fme","events":null},{"name":"#soysuzek\u015fis\u00f6zl\u00fck","url":"http:\/\/twitter.com\/search?q=%23soysuzek%C5%9Fis%C3%B6zl%C3%BCk","promoted_content":null,"query":"%23soysuzek%C5%9Fis%C3%B6zl%C3%BCk","events":null},{"name":"B\u00fcy\u00fck FENERBAH\u00c7E Taraftarlar\u0131Takiple\u015fiyor","url":"http:\/\/twitter.com\/search?q=%22B%C3%BCy%C3%BCk+FENERBAH%C3%87E+Taraftarlar%C4%B1Takiple%C5%9Fiyor%22","promoted_content":null,"query":"%22B%C3%BCy%C3%BCk+FENERBAH%C3%87E+Taraftarlar%C4%B1Takiple%C5%9Fiyor%22","events":null},{"name":"Sar\u0131K\u0131rm\u0131z\u0131Aile UnfollowsuzTakiple\u015fiyor","url":"http:\/\/twitter.com\/search?q=%22Sar%C4%B1K%C4%B1rm%C4%B1z%C4%B1Aile+UnfollowsuzTakiple%C5%9Fiyor%22","promoted_content":null,"query":"%22Sar%C4%B1K%C4%B1rm%C4%B1z%C4%B1Aile+UnfollowsuzTakiple%C5%9Fiyor%22","events":null},{"name":"D\u00fcnyadaTeksinSen GALATASARAY\u0131m","url":"http:\/\/twitter.com\/search?q=%22D%C3%BCnyadaTeksinSen+GALATASARAY%C4%B1m%22","promoted_content":null,"query":"%22D%C3%BCnyadaTeksinSen+GALATASARAY%C4%B1m%22","events":null},{"name":"D\u00fcnyan\u0131n TekHarikas\u0131s\u0131n FENERBAH\u00c7EM","url":"http:\/\/twitter.com\/search?q=%22D%C3%BCnyan%C4%B1n+TekHarikas%C4%B1s%C4%B1n+FENERBAH%C3%87EM%22","promoted_content":null,"query":"%22D%C3%BCnyan%C4%B1n+TekHarikas%C4%B1s%C4%B1n+FENERBAH%C3%87EM%22","events":null},{"name":"MustafaKemalin\u0130zindeyiz \u00c7\u00fcnk\u00fcFenerbah\u00e7eliyiz","url":"http:\/\/twitter.com\/search?q=%22MustafaKemalin%C4%B0zindeyiz+%C3%87%C3%BCnk%C3%BCFenerbah%C3%A7eliyiz%22","promoted_content":null,"query":"%22MustafaKemalin%C4%B0zindeyiz+%C3%87%C3%BCnk%C3%BCFenerbah%C3%A7eliyiz%22","events":null}],"as_of":"2013-07-20T10:51:45Z","created_at":"2013-07-20T10:45:24Z","locations":[{"name":"Turkey","woeid":23424969}]}]
My question is how to turn this array string into html. No proper php experience at all.
The response you are getting is JSON.
You used to be able to get response in XML, RSS and more, but now the only response type you will receive is JSON.
PHP has multiple methods for dealing with JSON. To encode data, you would use json_encode(). However, you want to decode it, so you want to be doing the following:
var_dump(json_decode($yourData));
This will dump the data to the browser so you can see what you have to work with.
You can iterate around this data using a foreach() loop.
Remember, assuming you json_decode() your results into $yourData:
To access array properties, use: $yourData['propertyName']
To access object properties, use: $yourData->propertyName
you can feed that into json_decode() function
you will get an array that you can manage as you want.

Extracting JSON data from node?

With a request to Twitter for example:
https://api.twitter.com/1/users/show.json?screen_name=stephenfry&include_entities=true
I can extract an element like followers_count using result["followers_count"]
I've tried a similar request to LastFM but their JSON is structured differently as it's a translation of their default XML.
With their demo request:
http://ws.audioscrobbler.com/2.0/?method=artist.getinfo&artist=Cher&api_key=b25b959554ed76058ac220b7b2e0a026&format=json
How would I get the listeners value?
I've tried
result["listeners"]
result["artist.listeners"]
result["artist.stats.listeners"]
I understand I need to access a node, but have no idea how to go about it.
Can anyone help?
It's a nested hash, so you can reach it with:
result["artist"]["stats"]["listeners"]
Example:
require('open-uri')
require('json')
result = JSON.parse(open('http://ws.audioscrobbler.com/2.0/?method=artist.getinfo&artist=Cher&api_key=b25b959554ed76058ac220b7b2e0a026&format=json').read)
result["artist"]["stats"]["listeners"].to_i
The Last.fm data is a series of nested hashes, so you need to access them as such. Give the following a try, it should do the trick:
result["artist"]["listeners"]

URL length limit for google reader api

I am using "/reader/api/0/stream/items/ids" API to get the item ids for sources that I want.
I have quite a number of sources, so I repeated "s=" parameter to include in the api url.
However, google has given me an error of "URL is too long".
So the question is that How can I solve it so that I just use one time api call to get item ids for that many sources?
Thanks
It seems that /reader/api/0/stream/items/ids path supports a POST method. This means the amount of data you could pass by using POST verb is much more than by using a query string and a GET method.
So use https://www.google.com/reader/api/0/stream/items/ids URL for the post, and pass your query string as a post data. Don't forget to include an action token(T) which is required for POST requests.

Resources