Object value reference from workflow task

Hello. I have a question about referencing an object value (Json format I think) from a workflow task.
For example, I get this object from the output of the following task
object returned:
{"CodeDesc":"Test Code ","User":"Test User","Email":"test@email.com"}
let say that this could be the first row in a given dataset, ok?
So, after that, I want to send an email to the "Email" address obtained from that task, for example using this:
The thing is, It's posible to make a reference to the "Email" directly from the "to" field in the sendEmail function?
In other words, It's ther a way that I can use something like {{object[2]}} in the "to" field of that task?
Thanks in advance.
Best Answer
-
You should be able to use your code function to extract the email address out of the JSON with some javascript and then send your email.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0
Answers
-
You should be able to use your code function to extract the email address out of the JSON with some javascript and then send your email.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0 -
Thanks Grant for the quick answer.
Yes, in fact, thats the way I'm doing it now. I did ask just to make sure that there isn't a easiest way to do the same.
Regards.
0 -
@claudio_sp - there is a much simpler way. You can just define the open object by editing the variable, and then everything inside the object can be referenced directly. There is no need to write any javascript/python code - no need to author a custom function.
See this instructional video:CC: @GrantSmith
2 -
Thanks @DanHendriksen - good to know!
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0 -
Hi @DanHendriksen thanks a lot!
1
Categories
- All Categories
- 2K Product Ideas
- 2K Ideas Exchange
- 1.6K Connect
- 1.3K Connectors
- 308 Workbench
- 6 Cloud Amplifier
- 10 Federated
- 3.8K Transform
- 660 Datasets
- 117 SQL DataFlows
- 2.2K Magic ETL
- 815 Beast Mode
- 3.3K Visualize
- 2.5K Charting
- 84 App Studio
- 46 Variables
- 780 Automate
- 191 Apps
- 482 APIs & Domo Developer
- 84 Workflows
- 23 Code Engine
- 41 AI and Machine Learning
- 20 AI Chat
- 1 AI Playground
- 2 AI Projects and Models
- 18 Jupyter Workspaces
- 413 Distribute
- 121 Domo Everywhere
- 281 Scheduled Reports
- 11 Software Integrations
- 145 Manage
- 141 Governance & Security
- 8 Domo Community Gallery
- 49 Product Releases
- 12 Domo University
- 5.4K Community Forums
- 41 Getting Started
- 31 Community Member Introductions
- 115 Community Announcements
- 4.8K Archive