Is it possible to render an exisiting card inside a Domo Brick?
Hi All!
Does anyone know of a way to 'embed' an existing out-of-the-box card inside a domo brick? I realize there are custom visualizations via PheonixChart to create custom visuals, but I have an idea for a dynamic, table driven landing page and want to take an existing card URL (e.g <instance>.domo.com/kpis/details/<card id> and use the domo brick as a container to display cards for a given card URL.
That way, I can use governance data to grab useful cards depending on the end-user and display those cards inside a domo brick to mimic dynamic card content on a dashboard/page.
Best Answer
-
I was going to post about the iframe option, but I test it out and it renders the entire page inside the iframe which includes the Domo navigation menu across the top and sides, which I don't think is what he is looking for.
You may want to look into this video by @jaeW_at_Onyx where he builds a navigation menu that respects PDP.
**Check out my Domo Tips & Tricks Videos
**Make sure to any users posts that helped you.
**Please mark as accepted the ones who solved your issue.1
Answers
-
Have you tried using an i frame in your HTML code with a link directly to your card url in the Domo brick?
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0 -
I was going to post about the iframe option, but I test it out and it renders the entire page inside the iframe which includes the Domo navigation menu across the top and sides, which I don't think is what he is looking for.
You may want to look into this video by @jaeW_at_Onyx where he builds a navigation menu that respects PDP.
**Check out my Domo Tips & Tricks Videos
**Make sure to any users posts that helped you.
**Please mark as accepted the ones who solved your issue.1 -
@MarkSnodgrass - thank you for the insight. I watched that video the other day and the Domo Workshop video on youtube where they show off their dynamic landing page demo and thats what inspired the question :) I tried the iframe approach before posting and it did exactly as you described so that a bummer. If I don't stumble on a solution, I'll post this in the ideas exchange.
I think it would be very interesting and useful if we had a targeted card embed feature we could leverage in bricks as that could lead to really nice dynamic and useful BI content on landing pages without needing to write javascript to create custom visuals with PheonixChart when the cards people care about or own are already in the system.
If I do find a working approach, I'll come back here with an answer/guide.
Have a great day!
0 -
@MarkSnodgrass @GrantSmith - Right after I posted my last response, I found a partial solution. All I did was go into a card → share menu → embed to get the direct <iframe> code Domo generates for embedding in a brick.
The giant downside doing it this way however is that you must enable embedding on every card so Domo can generate an embed ID. If I want this to work on a landing page where I want various cards relevant to a particular user/group/dept to dynamically show up on their landing page, I'd have to find a way to programmatically trigger APIs to enable embed on every card and figure out a way to trigger said API as soon as a new card gets created as well.
So, it's not ideal but at least we know the basic idea of embedding cards in domo bricks is possible. I will still go over to the ideas exchange and pitch the idea of adding an alternative to share → embed as that is geared more towards external embedding of cards in other external applications. What is really needed is just an API/URL endpoint that lets me embed a card internally without the need of enabling embed on a card by card basis.
Cheers!
2 -
So, I found the API to render an image of a given card id :) That is good enough to at least show the cards as images in their most updated state and render them in a brick that I can make clickable. :) Here's my example code to do this.
var renderCardUrl =
/content/v1/cards/kpi/{{card_id}}/render?parts=image,summary
;var json_body = {
"queryOverrides": {
"filters": []
},
"width": 99,
"height": 46,
"scale": 1
};var img = domo.put(renderCardUrl, { body: json_body });
Note that it currently errors and doesnt return the base64 encoded png string because of this API's need for authentication. But this still may be useful for other folks out there.
Thats the only thing I'm stuck on as I don't think its a good idea to expose the dev token in bricks.
So, two questions. One does anyone have documentation on domo.put() and the parameters it takes for the I assume it's the same as standard http.request(url, headers, body) but just want to confirm.
Secondly, are there any default domo functions available in bricks that let me read credentials from the account credentials store? That would get around exposing tokens.
I could get around this via Jupyter notebooks or magic ETL scripting tiles but I'd prefer to only render card images dynamically as needed based on the end user who visits the landing page, rather than going out to every card in the instance, rendering them and then storing them for retrieval later. Thats a ton of wasted API calls.
Thanks!
1
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.6K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 102 SQL DataFlows
- 626 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 753 Beast Mode
- 61 App Studio
- 41 Variables
- 692 Automate
- 177 Apps
- 456 APIs & Domo Developer
- 49 Workflows
- 10 DomoAI
- 38 Predict
- 16 Jupyter Workspaces
- 22 R & Python Tiles
- 398 Distribute
- 115 Domo Everywhere
- 276 Scheduled Reports
- 7 Software Integrations
- 130 Manage
- 127 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 11 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 110 Community Announcements
- 4.8K Archive