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.8K Product Ideas
- 1.8K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 616 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 738 Beast Mode
- 56 App Studio
- 40 Variables
- 685 Automate
- 176 Apps
- 452 APIs & Domo Developer
- 47 Workflows
- 10 DomoAI
- 36 Predict
- 15 Jupyter Workspaces
- 21 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 124 Manage
- 121 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive