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
1 -
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
- 1.7K Product Ideas
- 1.7K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 292 Workbench
- 4 Cloud Amplifier
- 8 Federated
- 2.8K Transform
- 95 SQL DataFlows
- 602 Datasets
- 2.1K Magic ETL
- 3.7K Visualize
- 2.4K Charting
- 695 Beast Mode
- 43 App Studio
- 39 Variables
- 658 Automate
- 170 Apps
- 441 APIs & Domo Developer
- 42 Workflows
- 5 DomoAI
- 32 Predict
- 12 Jupyter Workspaces
- 20 R & Python Tiles
- 386 Distribute
- 111 Domo Everywhere
- 269 Scheduled Reports
- 6 Software Integrations
- 113 Manage
- 110 Governance & Security
- 8 Domo University
- 30 Product Releases
- Community Forums
- 39 Getting Started
- 29 Community Member Introductions
- 98 Community Announcements
- Domo Community Gallery
- 4.8K Archive