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.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