Changes

m
no edit summary
Line 5: Line 5:  
More information here.
 
More information here.
 
https://medium.com/@macrodroid/introducing-the-webhook-trigger-a760e2ee140d
 
https://medium.com/@macrodroid/introducing-the-webhook-trigger-a760e2ee140d
<br>
      
===<p><b>Warning</b></p>===
 
===<p><b>Warning</b></p>===
Line 12: Line 11:     
This feature uses Firebase Cloud Messaging to notify the device via the backend server, therefore it is not functional on devices that lack Google services (such as Alexa tablets etc.)
 
This feature uses Firebase Cloud Messaging to notify the device via the backend server, therefore it is not functional on devices that lack Google services (such as Alexa tablets etc.)
</pre><br>
+
</pre>
    
==<p><b>Request configuration</b></p>==
 
==<p><b>Request configuration</b></p>==
Line 25: Line 24:  
E.G. The identifier would be 'mywebhook'
 
E.G. The identifier would be 'mywebhook'
 
https://trigger.macrodroid.com/c306bcd7-5f78-4895-bee4-677d4d/mywebhook
 
https://trigger.macrodroid.com/c306bcd7-5f78-4895-bee4-677d4d/mywebhook
</pre><br>
+
</pre>
    
=== IP address whitelist ===
 
=== IP address whitelist ===
Line 33: Line 32:  
It also supports magic text '...'
 
It also supports magic text '...'
 
</pre>
 
</pre>
* '''''[[magic text|Magic text list]] '''''
+
* ''[[magic text|Magic text list]] ''
</pre><br>
+
</pre>
 
   
=== Save body to string variable ===
 
=== Save body to string variable ===
 
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
 
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
Line 42: Line 40:  
Note that due to limits imposed by Firebase Cloud Messaging the maximum body text length is 3800 characters.
 
Note that due to limits imposed by Firebase Cloud Messaging the maximum body text length is 3800 characters.
 
</pre>
 
</pre>
* '''''[[Variables]]'''''
+
* ''[[Variables]]''
</pre><br>
+
</pre>
    
==<p><b>URL short</b></p>==
 
==<p><b>URL short</b></p>==
Line 54: Line 52:  
to this:
 
to this:
 
http://tinyurl.com/5xzj7w6j
 
http://tinyurl.com/5xzj7w6j
</pre><br>
+
</pre>
    
==<p><b>Include variables</b></p>==
 
==<p><b>Include variables</b></p>==
Line 60: Line 58:  
=== String, Integer, Decimal, Boolean ===
 
=== String, Integer, Decimal, Boolean ===
   −
* ''''' [https://macrodroidforum.com/wiki/index.php/Variables#Standard_Variable_Types Variables | String, Integer, Decimal, Boolean] '''''
+
* '' [https://macrodroidforum.com/wiki/index.php/Variables#Standard_Variable_Types Variables | String, Integer, Decimal, Boolean] ''
    
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
 
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
Line 75: Line 73:  
https://trigger.macrodroid.com/c306bcd7-5f78-4895-bee4-69600af77d4d/ID?VARNAME1=42&VARNAME2=Hello_World
 
https://trigger.macrodroid.com/c306bcd7-5f78-4895-bee4-69600af77d4d/ID?VARNAME1=42&VARNAME2=Hello_World
 
</pre>
 
</pre>
* ''''' An introduction video is available''''' '''''[https://youtu.be/0V_EcyhxrpA?si=_mjXwGVXHO3J8Ywp MacroDroid Variables]'''''
+
* '' An introduction video is available'' ''[https://youtu.be/0V_EcyhxrpA?si=_mjXwGVXHO3J8Ywp MacroDroid Variables]''
<br>
      
=== Dictionary - Array ===
 
=== Dictionary - Array ===
   −
* ''''' [https://macrodroidforum.com/wiki/index.php/Variables#Data_Structure_Variable_Types Variables | Dictionary - Array] '''''
+
* ''[https://macrodroidforum.com/wiki/index.php/Variables#Data_Structure_Variable_Types Variables | Dictionary - Array] ''
    
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
 
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
Line 94: Line 91:  
https://trigger.macrodroid.com/c306bcd7-5f78-4895-bee4-69600af77d4d/id?mydict(KEY)=VALUETEXT
 
https://trigger.macrodroid.com/c306bcd7-5f78-4895-bee4-69600af77d4d/id?mydict(KEY)=VALUETEXT
 
</pre>
 
</pre>
* ''''' An introduction video is available Using''''' '''''[https://youtu.be/u2zY5dv34CM Dictionary and Array Variables]'''''
+
* '' An introduction video is available Using'' ''[https://youtu.be/u2zY5dv34CM Dictionary and Array Variables]''
<br></pre>
+
<br>
    
==<p><b>Webhook management</b></p>==
 
==<p><b>Webhook management</b></p>==
Line 117: Line 114:  
To get a new device ID you just need to check the 'I have read and understood' box
 
To get a new device ID you just need to check the 'I have read and understood' box
 
and you can generate your new device ID.
 
and you can generate your new device ID.
</pre><br>
+
</pre>
 
  −
==<p><b>Example</b></p>==
  −
 
  −
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
  −
This macro will receive values by webhook and speak them by TTS.
  −
</pre><br>
  −
<pre style="background-color: #AC2424; color: white; border-radius: 10px; padding: 10px;">
  −
Triggers
  −
 
  −
Webhook (MyWebhook)
  −
https://trigger.macrodroid.com/c306bcd7-5f78-4895-bee4-69600af77d4d/id?VAR1=Hello
  −
</pre><br>
  −
<pre style="background-color: #1665B0; color: white; border-radius: 10px; padding: 10px;">
  −
Actions
  −
 
  −
Speak text: You received a new value {lv=VAR1}
  −
</pre><br>
  −
<pre style="background-color: green; color: white; border-radius: 10px; padding: 10px;">
  −
Constraints
  −
 
  −
 
  −
</pre><br>
  −
<pre style="background-color: teal; color: white; border-radius: 10px; padding: 10px;">
  −
Local variables
  −
 
  −
VAR1 = Hello (Type String)
  −
</pre><br>
 
editors
1,590

edits