Sending data via HTTP Request

633 views
Skip to first unread message

Nate B

unread,
Mar 14, 2022, 10:53:35 PM3/14/22
to Automate
My old phone just died and the flow that I had working on it is gone..so I'm rebuilding something that I know can work, but I can't remember how.

Simply, I'm trying to do a single variable HTTP request to an Integromat Webhook. That webhook still exists.

Passing JSON data {"Title": text} where text is a variable set in the flow.

I have a hazy recollection that most of the work was done in the "Request URL" part of the HTTP Request block because for some reason the block wasn't sending the content request type as JSON (and thus was getting rejected by Integromat). But I can't figure out how to re-format it.

When I send this request https://reqbin.com/utfbdco8, integromat receives it just fine. But I can't figure out how to get Automate to send the same request.

Any ideas?
Integromat hook.flo

Henrik "The Developer" Lindqvist

unread,
Mar 15, 2022, 8:58:01 AM3/15/22
to Automate
  • Request URL: https://hook.integromat.com/<whatever this is...>
  • Request method: POST
  • Request content type: JSON
  • Request content body= jsonEncode({"Title": text})

Nate B

unread,
Mar 15, 2022, 10:25:23 AM3/15/22
to Automate
Hi! Thank you!

Unfortunately that didn't do it. It's still being rejected. Any other ideas what might be missing from the way Automate is sending it vs how this request is formatted?

LJ LongWing

unread,
Mar 15, 2022, 10:30:49 AM3/15/22
to automa...@googlegroups.com
According to the RAW from your URL

POST /sd8dn5et283hck3nht5j6o6ybdlj7npz HTTP/1.1
Authorization: Bearer {token}
Host: hook.integromat.com
Content-Type: application/json
Content-Length: 16

{"Title":"test"}

The only thing you are missing is the Authorization Header....is sd8dn... your bearer token?  Can you try adding that to your Automate block and see if that works?

--
You received this message because you are subscribed to the Google Groups "Automate" group.
To unsubscribe from this group and stop receiving emails from it, send an email to automate-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/automate-user/428c17f3-b442-47ed-9b01-6b77220f2b60n%40googlegroups.com.

Henrik "The Developer" Lindqvist

unread,
Mar 15, 2022, 10:46:42 AM3/15/22
to Automate
Try adding:
  • Request headers= { "Authorization": "Bearer {token}" }
Then your flow has to have assigned a variable named "token" with the auth token, however you've acquired that.

Nate B

unread,
Mar 15, 2022, 11:00:41 AM3/15/22
to Automate
Sorry, guys. There is no authorization. reqbin for some reason defaults to bearer token even though I didn't put anything in there. You can even click "custom" auth and it strips that line and it still goes through. See attached screenshots for details.

I did try putting in that auth request header in automate but it didn't make a difference. Still rejected.
firefox_wWFYDUMrz6.png
firefox_AVKxC19liW.png

Nate B

unread,
Mar 15, 2022, 11:07:50 AM3/15/22
to Automate
So I've done a bit more testing. I sent both the reqbin and automate to send their quests to httpdump and recorded the results. See attached. The requests look identical to me so I'm stumped. Is there some way to get automate to give any more error feedback than "failed to connect"? when I try to catch the status code it doesn't record it because it failed to begin with?
firefox_UZrjdt8mK0.png
firefox_ipkLKN7pOM.png

Henrik "The Developer" Lindqvist

unread,
Mar 15, 2022, 11:08:27 AM3/15/22
to Automate
With or without the Request headers, the HTTP request block should send exactly what https://reqbin.com/utfbdco8 does.

What is the response, i.e. status code, when "rejected"?

Henrik "The Developer" Lindqvist

unread,
Mar 15, 2022, 11:11:01 AM3/15/22
to Automate
"Failed to connect" means there's a device connectivity issue, not an issue with the request.

Nate B

unread,
Mar 15, 2022, 11:13:33 AM3/15/22
to Automate
Okay, well that gets us somewhere then. So if my device can connect and send to something like httpdump (eg https://httpdump.io/cfowz), why would it fail in connecting integromat's url (ie https://hook.integromat.com/sd8dn5et283hck3nht5j6o6ybdlj7npz)
Message has been deleted

Nate B

unread,
Mar 15, 2022, 11:25:04 AM3/15/22
to Automate
Disabling Wifi worked (eg cellular connection only). I was able to successfully send the request to Integromat by setting Network Interface to Mobile.

So the issue still remains that you can send some http requests via wifi but others can't. Workaround works though.

Thank you Henrik and lj for your help!
Reply all
Reply to author
Forward
0 new messages