Passing data from ThingHTTP to IFTTT Webhook send email

11 ビュー (過去 30 日間)
steametics one
steametics one 2020 年 1 月 29 日
コメント済み: Christopher Stapels 2023 年 12 月 18 日
I have the following code in the "body" section of the ThingHTTP:
{"Value1":"%%channel_<my_channer_ID>_field_1%%";"Value2":"%%trigger%%";"Value3":"%%channel_id%%"}
I have tried various formats in the above json document but no luck.
Everything works - i.e. the React App fires, which calls the App ThingHTTP and finally the IFTTT webhook which sends me an email.
BUT without the data I'm trying to pass via the "ValueX" keyword pairs.
the body of the email (shown below) is correctly populated EXCEPT for the "ValueX".
I've failed to find the issue and asking for second pair of eyes...
Thanks
Mohsin
Email SUBJECT:
The event named "{{EventName}}" occurred at {{OccurredAt}} on the Maker Webhooks service
email BODY:
What: {{EventName}}<br>
When: {{OccurredAt}}<br>
Temperature: {{Value1}},<br>
Light Intensity: {{Value2}},<br>
Noise level: {{Value3}}.<br>
<br>
PLEASE TURN OFF THE LIGHTS.<br>
<br>
Thanks<br>
MMJ<br>
Email SUBJECT:
The event named "IFTTT_Trigger_TooBright" occurred at January 27, 2020 at 04:57PM on the Maker Webhooks service
email BODY:
What: IFTTT_Trigger_TooBright
When: January 27, 2020 at 04:57PM
Temperature: ,
Light Intensity: ,
Noise level: .
PLEASE TURN OFF THE LIGHTS.
Thanks
MMJ
  2 件のコメント
Kerry Chan
Kerry Chan 2023 年 12 月 18 日
移動済み: Christopher Stapels 2023 年 12 月 18 日
Hi,
I am not familiarize with MATLAB, may I know how to do it step by step?
When the light intensity is over 100, I expect ThingSpeak will send an email to me with the value detected.
I used React and ThingHTTP, but no data can be retrieved in the email.
Thanks.
Christopher Stapels
Christopher Stapels 2023 年 12 月 18 日
Please start a new post and describe your desired results, what you have tried, and what you have observed.

サインインしてコメントする。

採用された回答

Christopher Stapels
Christopher Stapels 2020 年 1 月 29 日
I reccomend you use the new alerts feature in ThingSpeak. You wont need IFTTT at all! you can pass data in the subject and the body of your email.
There is a terrific overview at the Alerts API doc page, and you can see all the links to the specific pages for the functions and the example in the release notes.
Also you can have a look at vinods answer on a previous answer.
  2 件のコメント
steametics one
steametics one 2020 年 1 月 30 日
編集済み: steametics one 2020 年 1 月 30 日
Thanks Christopher,
Well your suggestion and Vinod's answer certainly worked. Now I just have to figure out how to use the replacement keys etc...
However - does this mean that there is a problem with the interface from ThingSpeak to IFTTT Webhooks AND Email service only or generally to any IFTTT service?
I did have this woking before.
The downside is that we get very very limited number of Alerts per year.
Christopher Stapels
Christopher Stapels 2020 年 1 月 30 日
編集済み: Christopher Stapels 2021 年 5 月 25 日
Glad to hear it!
If you write a MATLAB analysis for your alert, you can use thingSpeakRead() to get values form your channel and you shouldnt need replecement keys.
I don't imagine there is a problem with IFTTT webhooks, the ones I haven't taken the time to migrate over seem to work still. But I remember it was a bit tricky on first set up, so I plan to migrate tehm all to the new alerts service once I get a chance.

サインインしてコメントする。

その他の回答 (0 件)

コミュニティ

その他の回答  ThingSpeak コミュニティ

カテゴリ

Help Center および File ExchangeAct on Data についてさらに検索

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by