Custom Variable Not Working
Status: Open · Asked by westy99 on · 0 views
Hi,
I've set 2 custom variables and I'm calling them in a workflow. One works perfectly and one doesn't. It doesn't output the variable data. Here's what the log shows.
[TABLE]
[TR]
[TD]Api Endpoint Url[/TD]
[TD]https://api.close.com/api/v1/lead/%7B%7BcloseLeadID%7D%7D[/TD]
[/TR]
[TR]
[TD]Name[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Url[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Description[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Status Id[/TD]
[TD]stat_r2WcDJ97yHcq4Nzri0SREvMaIYQeXsfHK8Dr83njmxF[/TD]
[/TR]
[TR]
[TD]Custom.cf VXojCZSxaY8cwGllQcPTui42IMxBvhuzWr4Jymenudj[/TD]
[TD]100000[/TD]
[/TR]
[TR]
[TD]Custom.cf Ryi4RwEuM9iM8Jzt6mH9wyUocvKTieVGSZdxevpwwho[/TD]
[TD]200000[/TD]
[/TR]
[TR]
[TD]Custom.cf SDNinyevU9FeijxvWiBCpYfK12JQ3Iy4pxNjPMLQ4mw[/TD]
[TD]300000[/TD]
[/TR]
[/TABLE]
I'm trying to insert data in Close CRM. The custom variable is being output as %7B%7BcloseLeadID%7D%7D. Its name is {{closeLeadID}}.
I've attached an image with a bit more data. Any ideas?
Hello @westy99,
It appears that the issue is related to the field mapping in your workflow. We’ve recorded a short video to explain the details and provide guidance—please take a moment to review it.
https://www.awesomescreenshot.com/video/40108025?key=9c4c6c4d959098826784e58e7d0867ef
Additionally, we’d appreciate it if you could share your exact use case with us. This will help us understand your requirements better and assist you more effectively.
Hi, thanks for the help. Your video page doesn't work, I get an error.
Here's my use case..
Workflow 1 -> Get lead info from Close -> Run Browse AI task to scrape site (inputting client info)
Workflow 2 -> Webhook catches Browse AI task output when it's done running -> Update Close CRM with scraped info
So I'm trying to pass the LeadID and StatusID for Close CRM between workflows. Using a custom variable works fine for StatusID but not LeadID.
The only other way I know to do it is all in one workflow, but the issue is I have to put a delay in the workflow because I don't know when the Browse AI task in complete - it could take a minute.
Thanks.
Hello @westy99,
Please try accessing this Video URL.
https://www.awesomescreenshot.com/video/40108025?key=9c4c6c4d959098826784e58e7d0867ef
Thanks, but I don't want to manually map a LeadID, it will be different every time. That's the point of the custom variable. I defined my use case above, is there a better way to handle this? I'm unable to pass the LeadID between workflows using a custom variable so I need to find another way.
Hello @westy99,
Could you please confirm if your second workflow captures any unique identifier or detail of the lead in the trigger response? This would help us search for the correct lead and perform the update accordingly.
Kindly let us know, so we can suggest the most suitable approach for your use case.
No, it doesn't capture any lead detail in the trigger response. I do have one solution I just figured out - I put the custom variable into the Pabbly Formatter and do nothing to it but find/replace the same character so the value is the same. I can then use that 'Result' variable instead of the custom variable and it works. Strange workaround.
I can't believe that's the best way to do it though.
The custom variables are currently not recognized in the fields where you map the data. As a result, the Lead ID was being passed literally as '{{closeLeadID}}' instead of the actual variable value.
The workaround you applied is correct and will help you achieve the desired outcome.