ESP-01 + IFTTT service post data to GoogleSheets
Posted: Wed Feb 23, 2022 1:21 pm
Hello everyone,
I have created an Applet that uses WebHooks and GoogleSheets to post data to a row on the google sheet.
I am trying to use GET and POST to trigger an IFTTT event along with a JSON data string carrying 3 values (as per IFTTT demo values) using AT commands (since not using Arduino or NodeMCU).
But I am facing an issue with “400 Bad Request” as soon as I send the GET…. command with MY_KEY (replaced with the actual key from the IFTTT applet) and the values.
Hardware:
1.) A ESP-01 Programmer (using as UART passthrough to communicate with ESP module over a terminal).
2.) ESP8266 module (the generic off-the-shelf modules).
The detailed Terminal log is as follows (Also “ATE1″ is used, so the Device Echo is the second line):
AT+CIPSTART=”TCP”,”maker.ifttt.com”,80
AT+CIPSTART=”TCP”,”maker.ifttt.com”,80
CONNECT
OK
AT+CIPSEND=209
AT+CIPSEND=209
OK
> POST /trigger/Pot_data/with/key/MY_KEY? HTTP/1.1\r\nHost: maker.ifttt.com\r\nContent-Type: application/json\r\nContent-Length: 43\r\n\r\n{\"value1\":\"20\",\"value2\":\"40\",\"value3\":\"90\"}\r\n
\r\n
busy s…
Recv 209 bytes
SEND OK
+IPD,1263:HTTP/1.1 400 Bad Request
Server: CloudFront
Date: Tue, 22 Feb 2022 07:14:51 GMT
Content-Type: text/html
Content-Length: 915
Connection: close
X-Cache: Error from cloudfront
Via: 1.1 f75b9bb638681eb8c307711e110c34e6.cloudfront.net (CloudFront)X-Amz-Cf-Pop: HYD50-C3X-Amz-Cf-Id: 5Hu4Qx5OGYWmnYbCZs4BMn02I3XCOp7Ji_eL7P6o2YhMn90j3yrLvg==
ERROR: The request could not be satisfied
400 ERROR
The request could not be satisfied.
Bad request.
We can’t connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.
Generated by cloudfront (CloudFront) Request ID: 5Hu4Qx5OGYWmnYbCZs4BMn02I3XCOp7Ji_eL7P6o2YhMn90j3yrLvg==
CLOSED
--------------------------------------------------------------------------------------------------------------------------------------
Can you please help me in getting a solution for this issue??
Thanks and Regards,
Yash
I have created an Applet that uses WebHooks and GoogleSheets to post data to a row on the google sheet.
I am trying to use GET and POST to trigger an IFTTT event along with a JSON data string carrying 3 values (as per IFTTT demo values) using AT commands (since not using Arduino or NodeMCU).
But I am facing an issue with “400 Bad Request” as soon as I send the GET…. command with MY_KEY (replaced with the actual key from the IFTTT applet) and the values.
Hardware:
1.) A ESP-01 Programmer (using as UART passthrough to communicate with ESP module over a terminal).
2.) ESP8266 module (the generic off-the-shelf modules).
The detailed Terminal log is as follows (Also “ATE1″ is used, so the Device Echo is the second line):
AT+CIPSTART=”TCP”,”maker.ifttt.com”,80
AT+CIPSTART=”TCP”,”maker.ifttt.com”,80
CONNECT
OK
AT+CIPSEND=209
AT+CIPSEND=209
OK
> POST /trigger/Pot_data/with/key/MY_KEY? HTTP/1.1\r\nHost: maker.ifttt.com\r\nContent-Type: application/json\r\nContent-Length: 43\r\n\r\n{\"value1\":\"20\",\"value2\":\"40\",\"value3\":\"90\"}\r\n
\r\n
busy s…
Recv 209 bytes
SEND OK
+IPD,1263:HTTP/1.1 400 Bad Request
Server: CloudFront
Date: Tue, 22 Feb 2022 07:14:51 GMT
Content-Type: text/html
Content-Length: 915
Connection: close
X-Cache: Error from cloudfront
Via: 1.1 f75b9bb638681eb8c307711e110c34e6.cloudfront.net (CloudFront)X-Amz-Cf-Pop: HYD50-C3X-Amz-Cf-Id: 5Hu4Qx5OGYWmnYbCZs4BMn02I3XCOp7Ji_eL7P6o2YhMn90j3yrLvg==
ERROR: The request could not be satisfied
400 ERROR
The request could not be satisfied.
Bad request.
We can’t connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.
Generated by cloudfront (CloudFront) Request ID: 5Hu4Qx5OGYWmnYbCZs4BMn02I3XCOp7Ji_eL7P6o2YhMn90j3yrLvg==
CLOSED
--------------------------------------------------------------------------------------------------------------------------------------
Can you please help me in getting a solution for this issue??
Thanks and Regards,
Yash