Automate > IFTTTとの連携

IFTTTでトリガを掛ける

IFTTT で webhooks を用い、ここで指定された URL にアクセスすると、トリガをかけられる。

Webhooks の使い方

ここで登録すると、"code" が割り当てられる
https://maker.ifttt.com/trigger/{event}/with/key/....
.... が "code"。{event} になにか文字列(多分英数半角に限定?)を入れてアクセスすると、これを引数として使うことができる。
同様に、POST をつかって、JSON で値を渡すと、3つまで値を渡すことができる。
{"value1" : <value1>, "value2" : <value2>, "value3" : <value3>}


AutomateからIFTTTにアクセスするやつ



Because the internet is an amazing place, you can trigger your IFTTT applets with this automate flow.
To make this work, follow these steps:

STEP 1: Get your maker API.

  • IFTTTアカウントを取る
  • ifttt.comへ行く。
  • Applets pageへ行く
  • Services page で "Webhooks" を検索
  • card が見つかったらクリック
  • Webhook の documentation page で API URL をコピーする。
  • コピーしたら、"Setup API" flow を実行する
  • API URL を貼り付ける
  • {event} code を "EVENTHERE" (All uppercase, no quotes) で置き換える
  • Confirm it.

STEP 2: Make an applet.

There are loads of services on IFTTT to play with.
  • applets page で"New applet" をクリック
  • トリガとしてSelect the Webhooks service を選ぶ
  • event name の入力を要求されるので、適用な何かを入れる
  • アクションを選ぶ。

STEP 3: Make a button

  • Setup Buttons flow を走らせる
  • Click add new.
  • ウィンドウが開いたらボタンタイトルを入れる。
  • 次のダイアログでは、2番めのステップで選んだイベント名を入れる。
  • あとでボタンを消したい場合は、同じflowでボタンをクリックすると消える。

STEP 4: Profit.

  • "Flow" のショートカットを作り、好きなときに走らせよう。
  • Tap the desired button to execute the applet.

v1.1 Now you can integrate this flow into your flows by adding a flow start block. Place flow start anywhere in your flow and set the payload argument to the action name.
最終更新:2019年01月26日 09:25