Email variable value

mintzps
Posts: 41
Joined: Tue Apr 13, 2010 6:58 pm

Email variable value

Post by mintzps »

Hi,

I am trying to use your plug-in to email the value of a variable.
The action is written as : Address is %%v:Address%

The email comes, but instead of a value, I get %%v:Address%%

What am I doing wrong?
User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Email variable value

Post by FlyingDiver »

Can you show me a screen grab of that action dialog? What field are you putting that in?
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
mintzps
Posts: 41
Joined: Tue Apr 13, 2010 6:58 pm

Re: Email variable value

Post by mintzps »

Screen Shot 2020-01-26 at 3.33.44 PM.png
Screen Shot 2020-01-26 at 3.33.44 PM.png (195.25 KiB) Viewed 4194 times
User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Email variable value

Post by FlyingDiver »

I believe it has to be the variableID for device substitution, not the variable name. That's why the example is all numbers.
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
mintzps
Posts: 41
Joined: Tue Apr 13, 2010 6:58 pm

Re: Email variable value

Post by mintzps »

What do you mean by variableIID? How is that different from the variable name? How do I find the variableID?
User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Email variable value

Post by FlyingDiver »

mintzps wrote:What do you mean by variableIID? How is that different from the variable name? How do I find the variableID?
It's the right column of the Variable list. You can get a copy of the number by right clicking on the variable in the list.
Attachments
Screen Shot 2020-01-26 at 4.31.31 PM.png
Screen Shot 2020-01-26 at 4.31.31 PM.png (228.36 KiB) Viewed 4161 times
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
User avatar
jay (support)
Site Admin
Posts: 19232
Joined: Wed Mar 19, 2008 11:52 am
Location: Austin, Texas
Contact:

Re: Email variable value

Post by jay (support) »

Using names is a bad idea because the variable name can change over time which would break your substitution (or any scripts which use the name, etc). All items in Indigo have a unique ID that never changes over the lifetime of the object.
Jay (Indigo Support)
Twitter | Facebook | LinkedIn
hamw
Posts: 1342
Joined: Mon Mar 31, 2008 7:45 pm

Re: Email variable value

Post by hamw »

I used the %%v:1366898942%% convention in a new trigger--> send Twilio SMS, and it did not properly substitute in my variable, just showing exactly %%v:1366898942%% . Any ideas? New mac mini with 15.6.1 and Indigo 2024.2

Thanks!
User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Email variable value

Post by FlyingDiver »

hamw wrote: Sun Aug 31, 2025 4:36 pm I used the %%v:1366898942%% convention in a new trigger--> send Twilio SMS, and it did not properly substitute in my variable, just showing exactly %%v:1366898942%% . Any ideas? New mac mini with 15.6.1 and Indigo 2024.2
It'sa possible that plugin doesn't support variable substitution. I would have to check. Does the dialog box say it does?
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Email variable value

Post by FlyingDiver »

The plugin does support substitution, so something else is going on.

Post a screen shot of the action dialog.
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
hamw
Posts: 1342
Joined: Mon Mar 31, 2008 7:45 pm

Re: Email variable value

Post by hamw »

Thanks for the quick reply; family plans prevented my getting back. I think I may have figured out the issue.... I am using a variable change to trigger Twilio to send the contents of the variable, in this case a triggered text telling me that I have finished adding water to the pool, and is read by Twilio as %%v:<VARIABLE ID>%% format. That works perfectly. I believe what I have done is nest another instance of %%v:<VARIABLE ID>%% inside the variable text that is referenced above. It may be that Indigo does not see the nested %%v:<VARIABLE ID>%%.

Here are some screenshots, and the output.

Once pool fill is completed, this string is pasted into a variable that fires and Twilio sends a message. Note that I nested another var ID inside the text to be picked out by Twilio.
0901 Var Sub inside Var Substitution.png
0901 Var Sub inside Var Substitution.png (45.08 KiB) Viewed 288 times
The Twilio trigger executes when a variable changes.
0901 Trigger Twilio.png
0901 Trigger Twilio.png (43.35 KiB) Viewed 288 times
Twilio reads the var substitution and sends message.
0901 Trigger Send Text.png
0901 Trigger Send Text.png (108.34 KiB) Viewed 288 times


Here is the second variable I am trying to nest within the first.
0901 Twilio Var Substitution.png
0901 Twilio Var Substitution.png (81.53 KiB) Viewed 288 times



I am guessing this can't be done, and the easy solution is to create another SMS to send the total gallons of water used as %%v:<VARIABLE ID>%%.
Last edited by hamw on Mon Sep 01, 2025 9:41 am, edited 1 time in total.
User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Email variable value

Post by FlyingDiver »

Yeah, unless the action that's actually setting the variable is doing the substitution, that won't work. I've never tested that.
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
hamw
Posts: 1342
Joined: Mon Mar 31, 2008 7:45 pm

Re: Email variable value

Post by hamw »

Much appreciated. Good to know. Problem solved with just addressing Twilio directly.
Post Reply

Return to “Better Email”