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
- 295 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.8K Transform
- 97 SQL DataFlows
- 608 Datasets
- 2.1K Magic ETL
- 3.8K Visualize
- 2.4K Charting
- 709 Beast Mode
- 49 App Studio
- 39 Variables
- 667 Automate
- 170 Apps
- 446 APIs & Domo Developer
- 44 Workflows
- 7 DomoAI
- 33 Predict
- 13 Jupyter Workspaces
- 20 R & Python Tiles
- 391 Distribute
- 111 Domo Everywhere
- 274 Scheduled Reports
- 6 Software Integrations
- 115 Manage
- 112 Governance & Security
- Domo Community Gallery
- 31 Product Releases
- 9 Domo University
- 5.3K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 103 Community Announcements
- 4.8K Archive