WorkFlow Code Engine Help
Good morning,
I am following along with the below Workflow Onboarding video from Dan. He mentions having a separate video for making a new code engine package, this one titled Page Manipulation
, I was wondering if anyone had the link to that video, if it exists?https://domosoftware.sharepoint.com/sites/ProductMarketing/_layouts/15/stream.aspx?id=%2Fsites%2FProductMarketing%2FShared%20Documents%2FBy%20Product%2FWorkflows%2FCompleted%20BOM%2F23%2Dworkflows%2Donboarding%2Dv4%2Emp4&ga=1&referrer=StreamWebApp%2EWeb&referrerScenario=AddressBarCopied%2Eview
Thanks,
Greg LaRose
Best Answer
-
I recreated the codeengine function that you are asking about.
Loom example:
Exact code:______________
http://const codeengine = require("codeengine")
async function addUsersToGroup(group, person) {
try {
const url = `/api/content/v2/groups/${group}/user`;
await codeengine.sendRequest("put", url, [person]);
return true;
} catch (error) {
throw new Error(error);
}
}
module.exports.addUsersToGroup = addUsersToGroup;
_________________
Please π‘/π/π/π this post if you read it and found it helpful.Please accept the answer if it solved your problem.
** Was this post helpful? Click π‘/π/π/π below. **
** If it solved your problem. Accept it as a solution! βοΈ **
Or do you need more help? https://calendly.com/matthew-kastner/15-minute-chat
Did I help you out? Feedback is priceless and will help me more than you know.Write a review!1
Answers
-
I am not sure where Dan H.'s is, but here is a quick tutorial on how you can make your first Code Engine function. Let me know if there is a particular part of the setup you'd like help with!
Loom tutorial:
Please π‘/π/π/π this post if you read it and found it helpful.Please accept the answer if it solved your problem.
** Was this post helpful? Click π‘/π/π/π below. **
** If it solved your problem. Accept it as a solution! βοΈ **
Or do you need more help? https://calendly.com/matthew-kastner/15-minute-chat
Did I help you out? Feedback is priceless and will help me more than you know.Write a review!0 -
Hey Matt,
Thanks for the video. What I attempted to do was recreate the AddUsersToGroup, except just have AddUserToGroup. I don't understand the People input that is with the given code engine, and I wanted it to just need a Person. This runs without error, but doesn't actually do what I want it to do, it doesn't appear to do anything when I have tested it out.
const codeengine = require("codeengine");
/**- Adds a user to a group
- @param {Group} group - The group
- @param {Person} person - The person
- @returns {boolean} - true if the call was successful
*/
function addusertogroup(group, person) {
try {
const url =/api/content/v2/groups/${group}/user
;
codeengine.sendRequest("put", url, person);return true;
}catch (error) {
throw new Error(error);
}
}module.exports = {
addusertogroup
};0 -
I recreated the codeengine function that you are asking about.
Loom example:
Exact code:______________
http://const codeengine = require("codeengine")
async function addUsersToGroup(group, person) {
try {
const url = `/api/content/v2/groups/${group}/user`;
await codeengine.sendRequest("put", url, [person]);
return true;
} catch (error) {
throw new Error(error);
}
}
module.exports.addUsersToGroup = addUsersToGroup;
_________________
Please π‘/π/π/π this post if you read it and found it helpful.Please accept the answer if it solved your problem.
** Was this post helpful? Click π‘/π/π/π below. **
** If it solved your problem. Accept it as a solution! βοΈ **
Or do you need more help? https://calendly.com/matthew-kastner/15-minute-chat
Did I help you out? Feedback is priceless and will help me more than you know.Write a review!1 -
Thanks Matt, that did the trick. I appreciate your help!
1
Categories
- All Categories
- 1.7K Product Ideas
- 1.7K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 294 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.8K Transform
- 97 SQL DataFlows
- 607 Datasets
- 2.1K Magic ETL
- 3.8K Visualize
- 2.4K Charting
- 707 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