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
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.6K Connect
- 1.2K Connectors
- 302 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 104 SQL DataFlows
- 633 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 760 Beast Mode
- 62 App Studio
- 42 Variables
- 699 Automate
- 181 Apps
- 457 APIs & Domo Developer
- 51 Workflows
- 10 DomoAI
- 38 Predict
- 16 Jupyter Workspaces
- 22 R & Python Tiles
- 401 Distribute
- 116 Domo Everywhere
- 277 Scheduled Reports
- 8 Software Integrations
- 130 Manage
- 127 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 12 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 111 Community Announcements
- 4.8K Archive