Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
👾 Join our Discord community:
🤖 Follow us on GitHub:
💡 Add ideas to our Canny:
Before building any workflow, remember to sketch out what you'd like the workflow to look like, and identify the trigger that will kick it off.
While the pre-built workflows in Crates are the quickest way to get started, a workflow built custom to your situation can offer powerful, personalized efficiency measures that fit your particular MSP and customer needs.
A subworkflow is a workflow that is also a part of another workflow. In Rewst, every automation can function as either a larger executing workflow or a smaller subworkflow.
In the example below, you have a main workflow called Create Ticket. In it, you choose which PSA the organization has. Once that has been decided, you then go to a subworkflow, which encompasses the actual creation of the ticket. Note the pink border and icon on the action, denoting that it is a subworkflow.
There are a few reasons to set up subworkflows.
Ensure a tidy workflow. Rather than having 20 steps per PSA on a single workflow, we can split it up for convenience and ease of understanding.
Subworkflows allow you to write a workflow once and reuse it multiple times. Subworkflows also accept parameters, making them adaptable for different use cases.
Smaller, self-contained workflows are easier to test and debug individually.
Access workflows in the Rewst platform by navigating to Automations > Workflows in the left side menu.
The general results page will show you the results of every workflow that has run in your organization. To see all results for a specific workflow, you can do the following:
Navigate to Automations > Workflows.
Search for the specific workflow.
Select the graph icon in the far right corner for that specific workflow.
This will take you to a new page that will show all the results of that workflow.
From the workflows page, you can view triggers associated with each workflow, without leaving that page. Hover over the workflow's triggers count in the Attributes column to see a list of every trigger linked to your workflow, and toggle each on or off to suit your needs.
Workflows, made up of and , are the main component of Rewst's automated business processes. They gather relevant data from integrated tools such as a PSA or RMM, process it using conditional logic, and execute automated actions relating to that data. Workflows are the key to unlocking automation in Rewst.
contain pre-built workflows. Workflows can also be built from scratch, or edited to match your custom needs.
We recommend you only edit the pre-built workflows that come in Crates after taking our courses in . This is a more advanced way to use Rewst.
Click on a subworkflow to navigate directly to it. You can also view subworkflows on the main workflow page, indicated by the green Subworkflow button under the Attributes column. Clicking will reveal which workflow the subworkflow is a part of.
When addressing various objects, the equivalent of a , we can pass all of the objects to a sub-workflow and get the output back of each object.
Workflow wrapper is an informal term sometimes used colloquially by the ROC to describe a situation where a primary workflow is used in a separate workflow as a subworkflow. More information on workflow wrappers can be found .
The list of workflows that appears in the center of your screen will include both the workflows you create and the workflows unpacked from Crates. As you continue to set up automation in Rewst, this list can grow quite a bit. The Updated By, Attributes, and columns each offer the option to filter your results by relevant criteria. You can also use Search in the top right corner to find a particular workflow, and the icon to the right to choose which columns you'd like to see in your workflow list.
Once you create a workflow, you'll be taken to the , a canvas for assembling your workflows. See our documentation for how to use the workflow builder .
Cluck University has moved! Read on for more info.
We leveled up Cluck University, making learning in Rewst smarter and more flexible than ever.
Now, you can register for courses, track your progress, and explore educational content — all from inside the Rewst app.
What’s new in Cluck U:
Learn your way – Dive into self-paced courses or join live events on core topics.
Fresh content – Courses have been revamped based on your feedback.
Smarter search – Find exactly what you need with new search and filter options.
Ready to jump in?
At the top of the workflow builder, you'll find several settings buttons.
Recall that every workflow is kicked off by a trigger. Which trigger you choose will depend on the goals of your workflow. There's no right or wrong order to build your workflow as long as it contains all the correct parts at the time of publication. You could start with adding actions to your canvas first, then set up your trigger.
If your trigger is form, you'll need to create and set up that form first before pulling it into your workflow.
Name your trigger with something simple but descriptive.
Toggle Enabled to on.
Set your trigger criteria, if required for your workflow.
Think about which organizations you want the trigger to run for.
Selected Organization (Org Name) will be toggled on by default. Toggle to off if desired.
If you want the automation to work for your main org as well as all child organizations, toggle All current and future managed organizations to on.
If you want the automation to apply only for certain organizations, select them manually in the Organizations selector field.
Click Submit to save the trigger.
Click Create.
Give your workflow a Name, and add any tags you would like via the Tags drop-down selector.
Click Submit. This will launch the workflow builder.
Search for your desired action in the left side menu.
Click on it, drag it, and drop it onto the canvas.
Repeat this process to add all needed actions to your workflow.
Click on the placed task, which will open a configuration dialog featuring two sections:
A set of basic details fields at the top:
Name: A user-editable field for the task's identifier.
Reference: The integration pack and task description.
Output: Specifies where the task's output gets stored in the task logs.
Task ID: The unique ID for referencing this task.
Description: A user-fillable text box for additional task information.
Publish Result As: A friendly name you assign for the task's results that you can use as an a context variable for calling it's content in future tasks.
Four distinct tabs beneath the basic details:
Parameters: Unique to each task, this tab houses options for defining the task's behavior during execution, including settings for endpoints, filters, conditions, and query parameters.
Mocking: This tab provides the option to simulate the task's function with a user-defined result, useful for testing and debugging.
Time Savings: In this tab, specify your estimate of the time a human would need to complete the task. This is used for creating Time Entries in PSA platforms.
Security: This tab allows for meticulous redaction of sensitive information within workflow tasks. This is especially vital when using generic HTTP actions for services without official integrations, where API tokens or other sensitive data in headers could be exposed in results.
These queries can be entered manually in the editor, or chosen from the field's drop-down selector.
Click Test to see if your workflow executes as desired.
Click Publish to save your changes and push them to the desired effect.
One of the key metrics you can use to understand the value added by your automations is time saved. You can configure this in Rewst by identifying how long it takes to manually work through your process before automating it and adding it into your workflow.
Click on the workflow that you want to configure.
Enter the amount of seconds it takes for the process in Time Saved (seconds).
Click Submit.
Adding notes is disabled for synced clone workflows.
Click and drag it to the desired location on the canvas.
To delete notes, right-click the note and click Delete Note.
Select multiple workflow tasks and notes simultaneously by drawing a selection box around them.
Hold shift and drag your mouse, or hold the middle-mouse button and drag your mouse.
Once you’ve selected multiple tasks or notes, move them by dragging the selection box to the desired location.
With multiple tasks or notes selected, you can perform the following actions:
Delete Items: Press the delete key, or right-click the canvas and select Delete Selected Tasks.
Duplicate Items: Press ctrl+d, or right-click the canvas and select Duplicate Selected Tasks.
Commonly used actions can be favorited to easily find and add actions to workflows. When favorited, actions can be found in the favorites section and added on the workflow canvas by right-clicking.
Find the action you want to favorite.
To add a favorited action to your workflow:
Right-click on the workflow canvas.
Add an action from the favorites section.
Run the command {{ WORKFLOW.name }}
.
Similarly, if you're searching for the name as it relates to completion handlers, run the command
{{ COMPLETED_WORKFLOW.WORKFLOW.name }}
.
Task transitions are the bridges that connect different tasks, ensuring that workflows move forward as designed. They're represented by the small rectangles found directly beneath each task. Depending on the criteria set, one task might branch out to multiple subsequent tasks. When you interact with these rectangles by clicking on them, a configuration menu appears. Note that this is a different menu from what is seen when you click on the task itself.
Edit Transition: Buttons beside the Edit Transition title give you options to either clone the current transition or remove it if it's no longer needed.
Custom Label: An editable field allowing you to give a meaningful name to the transition, aiding clarity as your workflow grows.
Move Left/Right: These are controls that allow you to rearrange the sequence in which transitions are evaluated and executed. Transitions are evaluated from left to right, so order them carefully.
Condition: This criteria governs the task's progression based on the options defined below. Depending on the outcome of this task, this rule determines which path to follow next. Left to right, these are:
Success: if the task succeeds
Failure: if the task fails
Always: regardless of the outcome of the task
Custom Condition: set custom, with Jinja
In the advanced options in the workflow body, you can opt to either follow the first left to right transition condition that returns true, or to follow all transitions from the action.
To understand this topic, you'll first need to learn the difference between an input and an output.
An input is information that will be put into Rewst automations. This could be the contents of a form, or information sent via integration, for example. Knowing what your input is will help you determine what to use when crafting your automations.
An output is the expected result of the automation.
Workflow inputs are commonly known as input variables. The role of input variables is to provide data that can be used by tasks within the workflow, or into a subworkflow.
Input variables can be broken down into two parts:
A key
The specific data or values that vary
This is an example of a variable where [first_name] is the key and Ashley is the value:
[first_name] : "Ashley"
Input variables can only be modified or added on the source workflow, not clones of workflows unpacked from Crates.
You can add new variables, or modify existing ones, by navigating to your Workflow > Configure Workflow Settings > Input Configuration.
Click + next to Input Configuration to see a number of new fields.
Name: This can be a unique entry relevant to what the aim of the input is going to be. This should not contain spaces.
Label: This text field is used to set a friendly name. It's the field name visible at the time of input.
Type: Short for data type, this field defines what format the data will be in. The most common types are Text (general string), Integer (whole number), and String (a combo of characters).
Default Value: You can specify a value that will be used if no other input is specified manually.
Description: You can give a better description of what the field is used for.
Input variables get their values in a Rewst workflow through the workflow's initial trigger event. Any data type that is valid in JSON can be used as an input variable.
In the example below, creating a user in Microsoft 365 using three variables:
First Name
Last Name
Domain
For now, these are all specified directly on the workflow rather than being submitted via a form.
Create an action by dragging it from the integration list on the left menu.
Click on this action to reveal a number of input fields on the right-hand side.
In the image below, see how to use the variables by using CTX, which stands for context, and then the name of the variable. This will autocomplete to make it easier to reference.
Despite the data being static at this point, the process is the same regardless of where the data is coming from.
Similarly to the above, you can configure an output of a workflow. These are generally used in two situations:
The other time this would be used is if you have a sub-workflow. A sub-workflow is no different from a standard workflow, except for the fact it lives within another workflow. If you were passing data back from the sub-workflow into the main workflow, this would be done via an output variable.
One of Rewst's ultimate purposes is to integrate various platforms into a workflow and use data from each to do something else.
In this example, you'll get a list of users where the userPrincipalName matches X, then create a ticket using information from that request.
If you ran this action as-is, you would get the list of users, but wouldn't be able to use that data anywhere.
A data alias allows you to create a variable, similar to an input variable, but with data direct from an action API request. In our example below, we are creating a variable with the key called user_details
and populating it with the data of the user using Jinja.
Take your create_ticket action from your respective PSA from the actions menu of the workflow builder. In this example, we'll use Datto PSA.
Using your newly created data alias, add the inputs onto that create_ticket
input.
This would create a ticket with the title User Exists RewstDocs@rewst.io
.
These operations can be found inside each task's Advanced tab.
Transition modes in Rewst are responsible for determining how transitions attached to a workflow action are followed. There are two primary modes:
Follow All: This is the default mode. If your task has multiple conditions attached, the Follow All mode attempts to follow all of the specified transitions. In the workflow visualization, this mode is represented by the standard color blue.
Follow First: In this mode, conditions are evaluated from left to right and as soon as the first condition is satisfied, the remaining conditions are disregarded. To differentiate these transitions in the workflow visualization, they are color-coded orange.
The Run as Org option allows the workflow action to run in the context of another organization.
The purpose of Run as Org
is to temporarily pass the execution of a workflow task into the context of another organization. This is something you may see done when you have a task— be it an individual action or a subworkflow— that needs to be executed as if it were for a different org than the one the workflow is running for.
For example, if you wanted to have something run once for the parent organization that needed to also reference items for a child organization, a Run as Org option would solve this issue. Start by listing all organizations. Then, using Run as Org
on a subworkflow, do things within that subworkflow for one or many of your managed organizations.
Or, when a form has an organization picker on it, where the organization ID is passed into the workflow from the form, Run as Org
is used to have the actions in the workflow run as if they were for the selected organization, instead of the organization for which the form was loaded.
With Items is the equivalent to a foreach
statement in other languages.
With this, you can pass a number of objects into a certain action and collect the results from each and then do something.
In the example below, you're going to list every user that is enabled in the child organization, and create or update a contact for each one.
List all enabled users, then output this to a data alias called
The data alias has the following Jinja:
You then have a subworkflow that creates or updates a contact. As per the best practice, use a subworkflow with your With Items.
In the Advanced tab, set the With Items field with this data alias.
The action now has the additional icon indicating that it has a With Items
set on it.
During testing, or for example if creating tickets from an alert, you may sometimes want to limit the amount of alerts you get during this phase. Test the workflow on a subset of your total users initially to make sure it works as expected.
To achieve this, you could create an input variable on the workflow called max_tickets_to_create_per_action
and set it to the maximum number of times you want that With Items to run.
If set to 1, it will only run on a single object within CTX.all_users.
The below code is what you would use in the With Items field in the Advanced tab.
Iterating through CTX.all_users on the action means you can't use {{ CTX.all_users.X }} as the property for the input.
Instead, you must use {{ item() }}
Say you want to get the first name of each user as an input. On your With Items
action you would execute:
If you're running a workflow task using With Items, this allows you to set how many of these processes run at the same time. It's recommended that no more than 10 concurrent actions be performed at a time to guarantee performance.
This allows you to adjust the number of seconds to wait for a task to complete. The default value is 10 minutes.
When automating certain processes, it's important to use dynamic options that adjust based on the input. Using the same list of options every time can lead to errors by applying choices that don't fit the situation. When an automation gets information from a form, it's important that the data on the form be dynamic, and adjust based on previous inputs or selections on that same form.
An option generator workflow will always be connected to a form, and allows you to provide tailored, dynamic options for specific fields in that form. For example, in an automation that updates a user's group memberships, the list of groups is tailored to the input. You wouldn't want to add an individual to a group that they're already a member of, nor would you want to remove them from a group that they're not a member of. To add a user to a group, you would generate a list of groups that are not already part of the user's group memberships. To remove a user from a group, you would generate the user's current list of group memberships.
Before you begin, decide which options need to be displayed based on the user’s selection. For this example, the list of groups will change depending on whether the action is to add or remove a user.
Click the Workflow Type drop-down selector.
Select Option Generator.
Click Submit. This will launch the workflow builder.
Remember, workflow generated options allow forms to be highly dynamic. When a form field is connected to an option workflow, it will return a list of options based on the input.
When the workflow runs, it should result in a context variable {{ CTX.options }}
that contains a list of items with key-value pairs that will be referenced in the form editor.
The values here will be used in the Label Field an Value Field for a form field.
The Label is what gets shown to the user who fills out the form as an available choice.
The Value field will be set to the value of the Field Name when that form is submitted. Workflows will reference this as {{ CTX.<field_name> }}
Using the Default Selected Field will evaluate an attribute of the options
list for truthiness. Items which evaluate true
will be selected by default when this field populates.
Let's look at a few use cases for using completion handlers:
Taking additional steps after the onboarding workflow is complete
Add additional functionality to an existing synced workflow without having to unsync it from the template.
Alerting for failed workflow executions, like kicking off the listener based on a failed status
Navigate to Automations > Workflows.
Note the two options in the Completion Handlers section. You'll need to choose which one you want to use:
Run this workflow when...
This will run the workflow when another workflow completes
When this workflow completes...
This will result in something being done when the workflow completes
Define your trigger conditions. This step will differ depending on which of the two options you chose in step 3.
For When this workflow completes...
Under Trigger On Statuses, specify the conditions for the trigger, such as succeeded, failed, timed out, or canceled. You can select multiple statuses from the drop-down list.
For Run this workflow when...
Under Trigger On Statuses, specify the conditions for the trigger, such as succeeded, failed, timed out, or canceled. You can select multiple statuses from the drop-down list.
Select your relevant integration or integrations from the drop-down selector.
Open each selected integration's accordion menu to choose your Configuration Selection Mode for that integration.
Make sure Enabled is toggled to on.
Click Submit to save your settings.
Contexts from the previously run workflow can be accessed with the COMPLETED_WORKFLOW
variable. You can access most info via the context including ORG and CTX such as:
{{ COMPLETED_WORKFLOW.ORG.VARIABLES.cw_manage_company_id }}
{{ COMPLETED_WORKFLOW.CTX.user.username }}
Completion handlers will always run in the context of the parent organization. If you are taking actions on a suborganization in the workflow, then you must utilize the run-as-organization functionality and overrides set at the completion handler level.
The organization ID that was used in the previous workflow context can be referenced with the following Jinja:
{{ COMPLETED_WORKFLOW.ORG.ATTRIBUTES.id }}
In the noop, set all of the variables that will be used in your completion handler in the On Success transition as data aliases.
It’s important that the names of the data aliases you create in the On Success transition of the noop match both:
the names of the variables that will be used in your completion handler
the names of the variables that will be used in the live parent workflow that your completion handler is triggered by
Add static values that represent a good test case for ensuring that your completion handler functions the way you expect.
In the example below, we’ve created a workflow with a single noop. In the On Success transition, we’ve added several data aliases that represent user data that could be used to test a workflow listener, which could be used after a user is onboarded or offboarded.
Once you’ve created the noop and added the correct data, attach this workflow to your workflow completion handler as another parent workflow that will trigger the completion handler. This will enable testing.
Click Test to run the workflow. This will feed the variables that you’ve set with your completion handler and trigger it to run, allowing you to confirm if the variables are used as expected. If you need to run your test workflow for organizations other than your parent MSP organization, add a trigger to the workflow which will allow you to select which organization the test workflow runs for.
Alternatively, re-run from the workflow result page of the workflow that kicks off the completion handler. This would still run the workflow in total, but would be a simpler way to achieve it with fewer clicks.
Let's look at a few use cases for using workflow wrappers:
Handle pre and post-onboarding tasks
Run a Crated workflow against a group of items, in a way it was not originally designed to do
We've moved! All Cluck University content in this site will be archived on Friday, April 11th, 2025. Sign up for all self-paced and live courses in the new
If you have questions, reach out to us at or in the #cluck-u Discord channel.
Click the Cluck U button in the platform or sign in with your Rewst credentials at .
Remember, the actions accordion menu contains your base actions that apply for all integrations. The actions accordion holds actions form the foundation of your interaction with the platform. The actions accordion contains any existing workflows in the workflow list for the related child organization. The other accordions contain actions that apply to that particular brand of integration.
Edit Workflow Title : Click to open up a dialogue where you can change the name of your workflow.
View results for workflow : This opens up a new tab in your browser with the entire recorded execution history of that workflow.
History : Click to open a menu on the right side of your screen displaying the record of when the workflow was created and edited. You also have the option to revert back to a previous version of your workflow, or view previous versions to compare changes.
Notes : Click to open the Notes menu, where you can view a record of all notes made on the workflow, and view instructions for how to add new notes. For more information on notes, see the section of this document.
Execution History : This reveals the same information as History, but provides an easy way to view the data without leaving your workflow builder.
Data Aliases : Click to view a list of all set . Click on the data alias to take you directly to that action.
Add Trigger : Click to open up the Add Trigger form, where you can set up your 's configuration, parameters, criteria, and activated organizations.
Configure Workflow Settings : Click to open the menu that contains the settings for workflow type, workflow timeout, time saved, and variable, .
Workflow Completion Handlers : Click to open a submenu where you can set . Click the button a second time to collapse the menu.
Workflow Options : Click to open a submenu where you can export, clone, or delete your workflow, as well as edit the workflow's attributes.
Display Validation Errors : By default, this is set to off. When toggled on, Rewst will provide an error on required fields that aren't filled out, and add a message about the field being required beneath the field in red text. The text will be invisible until the user clicks on the field and then click out of it without entering a value.
Test : Click to run a test of your workflow as it appears on your workflow builder canvas, and view the results of that test. Note that this also publishes and saves the workflow.
Publish : Click to publish changes on your workflow without first running a test, which will push the updated version live for use. This also offers a dual screen code viewer, to compare your old workflow to your new one.
Click to add a new trigger.
Search for your desired trigger in the Trigger Type drop down menu. Depending on your trigger, new Trigger Parameters will appear as a new section in the setup menu with additional selections to be made to set parameters for the trigger. For example, if your trigger is a , you would be asked to select the name of an existing form to use as the trigger.
If needed, add an .
Note the Redact on Hover setting for inputs that are set to Password. This can be toggled on or off via the .
Advanced: In this tab, you'll set the rules for your task's path and behavior within the workflow. Options include Integration Overrides, Transition Mode, Task Transition Criteria Sensitivity, Run as Org, With Items, Items Concurrency, and Task Timeout. See more about this on the page.
In the Redacted Input Parameters and Redacted Output Parameters fields, customize redaction with .
Remember to add between your tasks.
Click on Configure Workflow Variables to edit the workflow.
Rewst now also offers our note taking feature, to automate your documentation. Choose to document manually, or with RoboRewsty.
Notes are a great way to jot down your thinking behind workflow aspects, and an essential step to building workflows for any team that has multiple employees editing workflows. They save in the workflow itself, and can be viewed via the notes button by anyone who has permissions to edit that workflow. These boxes provide a title and a markdown editor.
Right-click the canvas and select Add Note. Alternatively, press and hold the control key, then drag your mouse to create a note.
Hover over the upper-right icon and click Edit Note to edit a note's content in the right side menu.
Click the star icon next to the action.
Information for the Advanced tab of tasks and actions in a workflow can be found in our documentation for the .
: Clicking the + button lets you define an easy-to-use variable that stores the results of the task transition.
For information on how these work, see our documentation for .
When variables are created within the workflow, they become , and can be used directly in action inputs.
Click to the right of the field to open up a Monaco editor, the same type that VSCode uses. Learn more about the .
In an workflow, the output is what is passed through to the form. For example, if you have a workflow that lists users in a variable called {{ CTX.users }}
- you would configure an output variable of options mapped to this variable, as per the below image. This then, in the form, would list the users in a dropdown field. This is how dynamic data works in form - more about that in .
First, take the action of List Users from the Microsoft Graph integration in the action menu of the workflow builder. There are no inputs required here, and it will list every user on the tenant that it is integrated with, or that the is set for.
This is where come into play.
Click the On Success transition on the action. This gives you the option to create a .
This document assumes that you've mastered earlier workflow building concepts from Cluck University and our introduction to the workflow builder . If you haven't yet completed that reading, come back to this page later.
For more on integration overrides and how to use them, see our documentation .
Add an integration override by clicking . This will expose a new submenu for Configuration Selection Mode.
This setting is used to indicate how many parent tasks need to be satisfied. For example, 0
would indicate all tasks. If the workflow has two tasks with arrows pointing to a third task, that sensitivity is the number of tasks above it which need to be complete before it runs. This is particularly important when building workflows that contain .
.
Click in the top menu bar of your workflow's workflow builder canvas.
Click next to Output Configuration to create an output variable. Name the variable options
. Every option generator workflow must have an called options
, which will contain the context variable that holds the data that you want to display.
Set up a for the workflow.
See the documentation for how to use our form builder to achieve this step .
Completion handlers are workflows that execute after another workflow has been completed. They provide a mechanism to extend or modify existing workflows without altering their core structure. These workflows have a that can be used to reference previous contexts from the workflow that was completed. Configure completion handlers to either trigger another workflow after the existing one finishes, or execute the current workflow when another workflow is completed.
Locate the existing workflow that you want to address. Click Workflow Completion Handlers.
Click to choose the workflow to trigger.
Click to choose the workflow to trigger.
Completion data is hard to fake for testing because it's represented as COMPLETED_WORKFLOW.
instead of CTX.COMPLETED_WORKFLOW.
Rather than running an entire workflow multiple times to test just this one element, create a that sets the test data, and use it to trigger your completion handler.
Workflow wrapper is an informal term used colloquially by the ROC to describe a situation where a primary workflow is used in a separate workflow as a . Whereas a completion handler only runs when a workflow completes, a workflow wrapper can run before or after completion.
Interact and Innovate with Rewst Actions
Rewst actions provide you the tools to effectively manage and customize your environment. From setting up organizations and users to associating with multi-tenanted objects, these actions form the foundation of your interaction with the platform. This guide explores each of the available actions in detail, providing you a clear path to maximize the potential of your Rewst functionality.
Jinja2 templating offers powerful capabilities to shape and manipulate data to fit your needs. Sometimes, these actions are common enough to repeat regularly. Data transformation actions provide the ability to modify, combine, and reshape the data you are working with in your workflows. These actions are particularly useful when dealing with complex data structures, such as nested lists and objects. They empower you to transform data according to your needs without additional coding.
Core actions in Rewst are your gateway to the platform's vast array of intrinsic functionalities. These actions, usable right out of the box, offer features ranging from ad-hoc HTTP requests to document parsing.
Core actions are used in the same way as regular actions within workflows. They are selected from the list of available actions, configured based on their parameters, and then added to the workflow at the appropriate place.
A data alias is a shortcut that extracts specific pieces of information from a JSON response and stores them in an easy-to-use variable. Instead of navigating the entire JSON structure every time, a data alias pulls out exactly what you need—like a user’s name or email—and makes it accessible throughout your workflow. Think of data aliases as custom labels you assign to specific data.
Recall that the context is where all data generated, captured, or used in a workflow is stored. Think of it as a shared memory for a specific workflow. Data aliases are stored in the context, making them available for reuse at any step in your workflow without re-fetching the data.
For example, imagine that you've set up your Microsoft Graph integration. You send a request via API call to get info about a user. The response comes back to you in JSON format, which can be lengthy and time consuming to search through. A data alias would let you get all of the information, or pinpoint specific information like the user's name or email address, and store it in a simpler variable in the context for use.
Together, variables, data aliases, and the context make your workflows in Rewst more efficient, organized, and adaptable. These tools help you reuse workflows, reduce manual work, and customize data handling to fit any automation need.
When adding a new data alias, you'll need the following:
Key: The name you assign to specific data.
Value: The actual data it corresponds to. The code editor button allows for the use of Jinja customization for intricate data or expressions.
If you set an alias such as my_task_result -> {{ RESULT }}
, later tasks can refer to this data using {{ CTX.my_task_result }}
.
You can also use a data alias to extract specific information and manipulate data. Expanding on our example from above, take the input from the Microsoft Graph get user action and extract the user's name and user principal name for ease of use.
Drag the Get User action onto the workflow builder canvas.
Add your user into the User ID field.
Set your context variable name under Publish Result As. The workflow action results will be stored as the value.
Use the following Jinja to create a new dictionary object and set the displayName
and userPrincipalName
keys.
Run the workflow. Then, click View Results
Click Load Context.
Expand the context to see our data alias filtered_user_details
now only showing the displayName
and userPrincipalName
.
Navigate to Automations > Workflows.
Search for your desired workflow.
Click > to the far right of that workflow to open its workflow builder canvas.
Click through to any of the related action type pages to learn more.
Rewst actions: These actions are for interacting with your Rewst environment. You can perform tasks such as creating organizations and users, associating with multi-tenanted objects, and setting organization variables.
Transform actions: These actions help you shape and modify your data for efficient workflow execution, replacing the need for complex Jinja statements.
Workflows actions: These actions allow you to call other workflows within your environment. They enable you to feed information from the parent workflow as inputs and return the results upon completion.
This collection of issues related to actions have been reported to Rewst by our customers. If you experience an issue with actions that is not in this list, contact us in your dedicated Discord support channel.
Click on any of the issues below to expand and see its solution or information.
You are reviewing a list of users, and want to determine if all of the users are enabled. The previous list has been mapped using the map transform action to the attribute enabled
, providing a list of boolean True/False values to check against.
This transform action will look at a list of boolean values and return true if all of the elements in the list are true.
This transform will output a boolean value.
Example output from Example 1:
You are reviewing a list of users and you need to determine if any of the users are enabled. The previous list has been mapped using the map transform action to the attribute enabled
, providing a list of boolean True/False values to check against.
This transform action will look at a list of boolean values and return true if any of the elements are true.
This transform will output a boolean value.
Example output from Example 1:
Seamlessly integrate "With Items" task results into your original list.
You're dealing with nested data structures and need to extract results from tasks ran With Items into your original list. You want a unified, easy-to-manipulate list that includes all necessary data.
The Append With Items Results
transform enables effective incorporation of "With Items" task results into your original list. It bridges the gap between the collected results and the original list, making your data manipulation tasks simpler and more efficient.
The below scenario will attempt to illustrate how the Process With Items Results
transform can be utilized to simplify With Items
results collection.
Assume we have a base list called base_list
:
And we ran a With Items
task against this list to collect additional data from these items that's stored in a new list called collected_list
that includes result.result
attributes like this
We want to extract the result.result
list from each item in the collected_list
and append it to each corresponding item in the base_list
as a new attribute named hobbies
.
After processing, your results will look like this:
Remember to carefully specify your Collected List
, Base List
, and Attribute Name
to ensure a successful transformation.
Effortlessly create high-quality documentation for your workflow actions without getting caught up in details.
RoboRewsty integrates with the workflow builder canvas. It takes your workflows' JSON objects, and sends them to a private OpenAI Azure instance. The result is a quickly presented, well structured documentation breakdown of all selected tasks in your workflow.
RoboRewsty does not replace the existing note feature in the workflow builder. You can either add notes manually, or use RoboRewsty to help you do some of the heavy lifting.
Create a new note.
Drag your note to encompass all actions in the workflow that you wish to document. This can be a subset of the workflow, or the entire workflow.
View the notes generated in your Notes menu. Sections will include:
What's Occurring: Task Overview: Each documentation response begins with a clear and concise overview, providing users with a high-level understanding of the task's purpose and context.
Expected Outcome: Task's Expected Result: Information about the expected outcome or result of the task or group of tasks is presented. This section helps users anticipate the outcomes when the workflow executes the associated tasks.
Special Considerations: Any Crucial Factors: Special considerations or crucial factors related to the tasks are included. These details ensure that users have all the necessary information to understand the workflow path successfully.
An accordion list of all included tasks
RoboRewsty is also available to help when you publish a workflow. Click on the RoboRewst icon to generate a detailed change log, then Submit.
Query: Employs to specify the operation type:
To further understand CSS selectors, you can refer to this .
For additional understanding on XPath expressions, refer to this .
Add your data alias name. Click to open the Jinja editor and set up your data alias.
Data aliases are added via transitions. See more about how to use .
Click to add your data alias.
Paste the key into the key field. Click to open the Jinja editor and set up your data alias.
Click to remove a data alias.
Click and to move multiple data aliases up and down in the data alias list.
Click to open the Data Aliases menu. This will display a complete list of all data aliases for that workflow.
Actions are the operations available for creating and automating, which live inside of a . You grab these actions from the left side menu of the workflow builder, and drag them onto the workflow canvas. When you run a workflow, Rewst is completing a series of actions specified within that workflow. Once an action has been dragged onto the canvas, we refer to that dragged action as a task, to differentiate between a dragged and undragged action.
Once you've set up an , Rewst offers you a number of actions related to that integration to build your workflows. They're accessible from the accordion menus in the left side menu of the workflow builder, and sorted based on their respective sources, including integrations by brand, Core, Rewst, Transform, and Workflow. Expand any accordion to see the related actions it contains.
Each action serves a unique purpose and comes with a brief description to aid in understanding its functionality. Click on any action to begin dragging and dropping it onto your workflow builder canvas. For more on our workflow builder and how workflows are essential to Rewst, see our workflow documentation .
Core actions: These are the essential platform components like webhooks, email dispatching, and .
Integrations actions: When you set up an integration in Rewst, it comes with a predefined set of actions, which will appear in your workflow builder action menu. These actions allow you to work with various parts of the integrated product as per its API. Rewst's integrations pull in the most useful and most commonly used actions, but not all available actions. Each integration's action accordion menu will also contain an action to allow you to pull in additional actions. This action is titled [Integration Name] API Request
. See our for more information on available actions.
Brave browsers will block the click event on Rewst actions. This is due to the way that Brave handles the click event. To fix this, you can either , or use a different browser.
This process may not be necessary if you have already , but it's something to consider if you run into any issues.
Change this to the relevant number. For example, change to a 1 so that only one of the previous actions must complete before that action runs.
Click in the top toolbar of the workflow builder.
Hover over the Notes note name field to reveal the hidden options for notes.
Click . This will launch RoboRewsty. A waiting message will display while it runs on your workflow. This may take a moment, if your request holds a large number of tasks.
Add or subtract from DateTime
All transform
Any transform
Append with items results
Compare dates
Convert DateTime to timezone
Convert list to object
Defang
Diff lists
Flatten list
Generate friendly password
Get business days between dates
Get DateTime
Get days between dates
Get list length
Get string length
Is JSON
Map to an attribute within a list
Merge lists
Parse CSV
Parse text to JSON
Refang
Remove duplicates from list
Select attribute
Set list field value
Set variable
Split text
Transform list objects
Trim variable
DateTime to add or subtract from
Use https://strftime.org/ for various options
Days to add or subtract
Integer value for how many days to add or subtract.
Hours to add or subtract
Integer value for how many hours to add or subtract.
Microseconds to add or subtract
Integer value for how many microseconds to add or subtract.
Minutes to add or subtract
Integer value for how many minutes to add or subtract.
Months to add or subtract
Integer value for how many months to add or subtract.
Seconds to add or subtract
Integer value for how many seconds to add or subtract.
Years to add or subtract
Integer value for how many years to add or subtract.
List
List of boolean values to check against.
List
List of boolean values to check against.
Base List
This is the main list to which you want your collected results to be appended.
Collected List
This is the list of results from your completed With Items
task, from which the nested result.result
attribute will be extracted.
Attribute Name
This is the name you'd like to set for the new attribute to be appended to the Base List
.
Identify the differences between two input lists.
You need to compare two lists and highlight the unique entries or entries exclusive to the first list, A transformation action that simplifies this complex comparison process is required.
The Diff Lists
transform is your solution for list comparison tasks. It uses two methods - Anti-Join
and Symmetric Difference
- to focus on unique or exclusive entries, thereby streamlining your data comparison process.
Here are the parameters you have available to you within the action, and their descriptions:
Difference Method
Choose the method to compute the differences between the lists. Options are anti_join
and symmetric_difference
(described below).
First List
Enter the first list to be compared.
First List's Key
Identify the key attribute for matching items in the first list.
Second List
Enter the second list to be compared.
Second List's Key
Identify the key attribute for matching items in the second list.
For this transform, we will want to feed the action two separate lists, that we will then identify the fields in which we want to identify differences. Let's use these two lists as example:
List 1:
List 2:
We have two options for the Difference Method
you can pick to have the action perform, these method have slight differences that are quite helpful in various situations:
Anti-join: for scenarios where you want to find entries that are exclusive to the first list.
Symmetric difference: for comparing two sets of data and identifying unique records in each.
Take a look at examples of both below:
The results of the two different diff methods can be seen as follows:
Anti join: only Mary's object from list_1
is returned in the output, as she didn't have a correlating id
in list_2
.
Symmetric difference: both Mary's object from list_1
and the object in list_2
that didn't have a correlating id in list_1
were returned in the returned list.
With a grasp on the Diff Lists
transform, you're ready to analyze and compare your lists for unique entries or entries exclusive to the first list. Understanding the differences between Anti-Join
and Symmetric Difference
methods will aid you in making effective data comparisons.
You are working with an API that returns a time in UTC, you would like to localize this value to your timezone or a specific timezone.
Convert a DateTime to a different timezone.
DateTime to convert
Use https://strftime.org/ for various options
Timezone to convert
Use https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for various options not listed
Result of Example:
You have a email with a URL in it similar to something like: https://rewst.io/aprilfools/surprise.html You would like to defang it and make it not directly usable.
Given a URL, this action will 'defang' the url by adding characters to prevent it from being directly usable.
URL
URL to defang
Colon
If true defang colons.
Dots
If true defang all dots.
The expected result of this transform is a defanged url.
Result from Example 1:
Transforms a list into an object with extracted key-value pairs.
This transform action allows you to convert a list of objects into a single object, creating each object's property using user-defined key-value pairs extracted from the list, and simplifying the handling of complicated list structures.
The Convert List to Object
transform provides a powerful way to reshape your data to meet specific requirements. The ability to define keys and values, including the ability to access nested data, makes it versatile for a range of scenarios. Let's go through a couple of use-case examples to demonstrate how this transform can be applied to your data.
In both of these examples, your new output object would look as follows:
List to Transform
The list of objects you want to transform into a single object. Each item in the list should be a object with key-value pairs.
Field to use as Key
The field name from the items in your list that you want to use as keys in your new object.
Field to use as Value
The field name from the items in your list that you want to use as values in your new object.
DateTime format to return
Use https://strftime.org/ for various options
Timezone to return
The timezone you would like to have the date returned in.
Start Date
The start date; This day is inclusive in the returned count.
End Date
The end date; This day is exclusive in the returned count.
Holidays
A list of holidays
Country
Country Specific Holidays to remove from the set.
Boolean values represent simple yes/no conditions, like on/off or true/false. They define rules and logic in workflows by evaluating conditions.
Boolean values are fundamental in automation workflows, controlling decision-making and process flow. Understanding Boolean logic helps ensure that workflows are efficient, reliable, and easy to maintain.
Boolean values: Represent true
or false
, similar to 1
(on) and 0
(off).
Logical operators: and
, or
, not
determine conditions in workflows.
Comparison operations: Evaluate conditions (e.g., user_role == "admin"
).
Custom conditions in workflows: Enable transitions based on Boolean evaluations.
Boolean logic controls workflow decisions using these key operators:
and
– Requires both conditions to be true.
Example: user_logged_in and is_admin
or
– Requires at least one condition to be true.
Example: is_manager or is_admin
not
– Inverts a Boolean value.
Example: not user_logged_in
(returns true
if user_logged_in
is false
).
True and false = false – Both conditions must be true for and
to return true
.
True or false = true – Only one condition needs to be true for or
to return true
.
Not false = true – Flips the Boolean value to its opposite.
To ensure efficiency and maintainability, follow these best practices.
Group logic with parentheses: Ensures conditions execute in the correct order.
Example: (is_admin and is_active) or is_super_admin
Use in
for cleaner conditions:
Before: if role == "admin" or role == "super_admin"
After: if role in ["admin", "super_admin"]
Use ternary operators for concise logic:
Syntax: variable = value_if_true if condition else value_if_false
Example: status = "Active" if is_active else "Inactive"
Leverage short-circuit evaluation:
Skips unnecessary checks by placing the most likely condition first.
Example: if user_logged_in and is_admin:
(Skips is_admin
check if user_logged_in
is false
.)
The Symmetric Difference
method is used when you want to identify entries that are unique to each list, i.e., items that exist in the one list and not in the other.
The Anti Join
difference method is used when you want to determine the items in the first list that don't have a corresponding match in the second list.
You have a list of user's that has been returned from an API, you would like to determine the count of user's in the list.
Measures the length of a List. It will return the number of elements of that list.
List to Measure
The array/list to get the length of.
Result of Example:
You are working with an API and the return comes back as a JSON string instead of being a JSON object. You would like to verify that the string is valid JSON before attempting to convert it to JSON.
This transform will check whether or not a string provided via the 'String to Check' input is a valid JSON string.
String to Check
The string to validate.
This transform will output a boolean value (True/False) based on whether or not the string is a valid JSON string.
Return from Example 1:
Return from Example 2:
You are resetting a user's password and would like to generate a friendly password.
This action generates an easy password with adjective, name, number, symbol and random caps.
There are no parameters for this transform.
This transform has no parameters, so no usage examples can be given.
Example 1:
Example 2:
Example 3:
You would like to get the count of days between dates.
Get the number of days between two dates.
Start Date
The start date; This day is inclusive in the returned count.
End Date
The end date; This day is exclusive in the returned count.
Result of Example:
You are working with a list of users, however the users are nested in a list.
You would like to flatten the list of lists so it ends up as a list of objects.
Flatten a nested List.
Array variable to flatten
The array you would like to flatten
Result of Example:
Blend two input lists into one using a shared identifier.
You're faced with two separate lists of data that need to be combined based on a common attribute. You require a merging method that mimics SQL JOINs.
The Merge Lists
transform equips you with the functionality to effectively merge two lists into one. By aligning items based on a shared key attribute and allowing for three types of merging strategies (inner
, left
, and outer
), it enhances your data analysis and manipulation capabilities.
Here are the parameters you have available to you within the action, and their descriptions:
Merge Method
Choose the strategy to merge the lists. Options are inner
, left
, or outer
join.
First List
Enter the first list for the merging process.
First List's Key
Identify the key attribute for matching items in the first list.
Second List
Enter the second list to be merged with the first one.
Second List's Key
Identify the key attribute for matching items in the second list.
For this transform, we will want to provide the action two lists and their corresponding key's to be used for mapping the comparisons. Let's use the below for our examples:
List 1:
List 2:
This transform offers three different methods for merging your lists: Inner
, Left
, and Outer
joins. These three methods mimic the functionality of SQL JOINs and each has its own use cases:
Inner join: useful when you're dealing with two datasets and only want to focus on data that is common between them.
Left join: useful when the first list is your primary dataset and you wish to append any additional, relevant data from the second list to it.
Outer join: useful when you aim for a comprehensive view, combining all data from both lists, and filling in gaps where possible.
Here are some examples of these methods in action to help you better understand their operation:
The outputs of the three different merge method examples above can be seen as follows:
Inner join: only John's object is returned in the output, as his id
is present in both lists.
Left join: all objects from list_1
are returned, with matching objects from list_2
added on. This is why John's object includes the age from list_2
, but Mary's object remains the same, as there was no matching id
in list_2
.
Outer join: all objects from both lists are returned, with matching objects merged together. Therefore, we get John's object with the age
from list_2
, Mary's object from list_1
, and the object with id
3 from list_2
which didn't have a matching id
in list_1
.
Now that you're equipped with the knowledge of Merge Lists
transform, you're prepared to blend data from two different lists into a coherent whole. Keep in mind your merging strategy (inner
, left
, or outer
) as it directly impacts your resulting list.
When designing workflows, keep these three guiding principles in mind.
Simplicity: Create workflows that are user-friendly and easy to understand.
Modularity: Break down workflows into smaller, reusable components.
Maintainability: Build workflows that are straightforward to update and maintain.
A good workflow should meet all of these requirements.
Consistency: Standardized practices lead to a consistent experience across different workflows.
Quality assurance: Adhering to standards makes quality checks more efficient.
Reusability: Modular design enables the reuse of components, speeding up development.
Scalability: Design your workflows to handle increased complexity as your needs grow.
Efficiency: Avoid redundancy by following a standardized approach.
Knowledge Transfer: Standards foster collaboration and knowledge sharing within your team.
Flexibility: Rewst's standards allow easy integration of new features without major rework.
Use pre-defined templates to speed up development and ensure adherence to best practices.
Develop and test your workflows in a sandbox or development environment. Make necessary changes, test, and sync to your live environment. Always test a workflow before publishing.
Document workflows manually or with RoboRewsty to keep track of the intent of each action and subworkflow.
When publishing a workflow, document the changes made in that update to help with version control of your workflow.
Properly naming and categorizing your workflows is essential for clarity and navigation, especially as the number of workflows you use in Rewst grows over time.
Adhering to a consistent naming convention helps in understanding the purpose and function of each automation.
Proper example: List Disabled User Accounts
Improper example: Steve's Workflow
Stay consistent with your styling when naming variables. Choose a naming convention, for example snake_case or camelCase, and apply it uniformly.
Employ descriptive and straightforward wording using snake_case
for clarity.
Prefix integration-specific variables appropriately, like psa_
for PSA-related variables.
Separating the data aliases makes debugging easier, allowing you to test your code with real data.
Use conditions like {{ SUCCEEDED and CTX.list_of_things|d }}
to control the flow based on task success or failure.
Transitions are evaluated from left to right, so order them carefully.
Follow All/Follow First:
Follow All: The task will follow every path that meets the criteria.
Follow First: The task will follow the first criteria that it matches and then stop. Use this when you expect only one condition to be met or when, as soon as a condition is met, you do not want the process to use other workflow branches.
Limiting the API field response to only the data you need helps in building clean workflows that are easy to understand, without overloading your tools.
If unsure about the fields you need, consider running the query without any filtering initially. This approach lets you explore the available fields and understand what information is at your disposal.
Once you've identified the necessary fields, be sure to limit the response to include only those. For instance, if you're listing users in Microsoft Graph and only require the UPN (User Principal Name) and User's ID, you should select the userPrincipalName
and id
fields.
There is a character limit on a field in an upcoming API call, you would like to check the length of the input prior to making the call.
Measures the length of a String. It will return the number of characters in that string.
String to Measure
The string to get the length of.
Result of Example:
You are working with a list of users however, the dataset contains multiple objects with the same GUID, you would like to remove the duplicates from the list.
Returns a list of unique items from the given list/iterable.
Attribute
Filter objects with unique values for this attribute; Only required for lists of objects.
Case Sensitive
Treat upper and lowercase strings as distinct.
List
List to remove duplicates from.
The expected output for this transform is a new list of the unique items from the previous list.
Result of Example 1:
Result of Example 2:
You have an email with a defanged URL inside of it similar to something like: hXXps[:]//rewst[.]io/aprilfools/surprise.html
You would like to refang it and make the URL directly usable.
Given a defanged URL, this action will refang the url by removing the added characters that prevent it from being directly usable.
URL
URL to refang
The expected result of this transform is a standard url.
Result from Example 1:
While reviewing a list of users returned from Microsoft Graph, you need to get a list of the users who have a accountEnabled
attribute value set to true
.
This action filters a sequence of objects by applying a test to the specified attribute of each object, and only selecting the objects where the test succeeds.
The expected output for this transform is a list of objects that tested true.
Example from Example 1:
Example from Example 2:
You can also use within Rewst to organize your automations effectively.
Separate complex creation or modification into Set Variable
tasks rather than creating them on the actual task doing the API call. This helps with easier troubleshooting should you encounter errors, such as determining if the API is experiencing issues versus if there is a Jinja error in your variable assignment.
For more on transitions, see our documentation .
URL:
Attribute
The attribute of an object in the list that you would like to select if the condition is true. If nested, please use dot notation.
Comparison Operator
List
This is the list to run select attribute against.
Value to Compare Against
The value to compare the attribute against, this is required for most tests but tests such as true, false, defined, undefined do not require it. If a value is supplied and not needed it will be ignored.
You are building a workflow that checks if the tickets closed date is greater than the expected close date and would like to know if action is needed based on a true/false value.
This transform will take two dates and an operator, it will then perform a comparison based on the operator and return a boolean value.
First Date
This should be a valid datetime string representation.
Second Date
This should be a valid datetime string representation.
Comparison Operator
The operator to use in the comparison.
Day First
Whether to interpret the first value in an ambiguous 3-integer date (e.g. 01/05/09) as the day (True) or month (False). If yearfirst is set to True, this distinguishes between YDM and YMD. If set to None, this value is retrieved from the current parserinfo object (which itself defaults to False).
Fuzzy Parsing
Whether to allow fuzzy parsing, allowing for string like "Today is January 1, 2047 at 8:21:00AM"
Ignore Timezone
If set True, time zones in parsed strings are ignored and a timezone naive datetime object is returned.
Year First
Whether to interpret the first value in an ambiguous 3-integer date (e.g. 01/05/09) as the year. If True, the first number is taken to be the year, otherwise the last number is taken to be the year. If set to None, this value is retrieved from the current parserinfo object (which itself defaults to False).
The expected output for this transform is a boolean value based on the comparison of the two dates.
Result Output for Example 1:
Test used for selecting matches. For information on the tests see .
Redefine your list structure by reshaping attribute values.
You have a list where the current structure isn't effectively supporting your data analysis and transition decision making needs. You want to remap fields, flatten nested items, or count instances within your list to provide more meaningful insights.
The transform list objects
action offers versatile functionality to modify the structure of your list. Whether it's remapping fields for better clarity, flattening for easier data extraction, or counting to reveal data trends, this transform is a strong tool for data restructuring.
List to Transform
The list that you would like to restructure.
Input Field
The item in the list you would like to transform.
Transformation Method
The transformation method to be applied on the input field. (options described below)
Output Field
The new field where the transformed value will be stored.
Append Action Type
The type of appending action if the method is set to append
.
Append Value
The value to be added if the Append Action Type
is Append Value
.
Append Field
The field to be joined if the Append Action Type
is Append Field
.
Delimiter for Append
The delimiter to be used in the Append
method
Field for Concatenation
The field to be used in the concatenation operation if the method is Concatenate
.
Let's break this down into specific use-case examples, to show how each of these methods can be used within the Restructure Lists
Transform.
Assume that we have a list of objects called my_list
that looks like this:
Here is the breakdown of the different transformation methods, and when you'd want to use them:
Retain Original Value: The input field remains unchanged in the output. Ideal when you need to preserve the original data.
Append to Existing Value: The output field shows the original input field value appended with specified values or fields. Perfect when you need to combine data from multiple sources.
Count the Number of Elements: The output field displays the correct count of items in the input list. Use this when you need to know the size of your list.
Concatenate Nested Property in List: The output field shows a string which is a concatenation of the specified field values in the input list.
Flatten List of Strings: If your input list contains sub-lists, this method will return a flattened list with no sub-lists.
Let's use the list we declared to define a set of fields we want to restructure for this action, using the different transformation methods, and show how we can match these to their Jinja2 equivalent.
After all these actions are performed, your newly transformed list would output looking like this:
String Contents
String to convert.
You are trying to create a list of users from a Microsoft Graph return and want to create a flat list of all the display names for the users.
Map to an attribute for each dictionary object in a list.
Attribute
The attribute to map to, dot notation can be used. For example, result.result
List
The list you would like to perform the map on.
This transform is expected to return a new list that is mapped to the selected attribute.
Example of result for Example 1:
The available actions in this submenu will be different for each of your child organizations. Each time you create a new workflow, the list will grow.
Unpacking a Crate will also add the workflows in that Crate to the Workflows actions accordion menu. You'll gain many of the common automations our team has pre-built workflows for, and can use them to build your own custom workflows.
The Workflows actions accordion menu contains any existing workflows in the workflow list for the related child organization. This actions menu is what powers Rewst's functionality, by letting you reuse existing workflows as individual tasks in a more broadly scoped integration.
Note that most workflows actions will use . If present, these will appear in the Parameters tab of the task.
You have a string that has been grabbed from an API return, however due to bad formatting the string starts or ends with extra spaces that need removed.
Trim whitespace characters from a variable.
Variable Contents
Variable to trim
Result of Example:
In the above return the "
characters were kept to show the spaces being removed. These would not be present in the actual return. Only the original string without whitespaces would be returned.
Rewst's form functionality is designed to empower users with the tools to build interactive, responsive, and customizable forms.
Forms collect data in one simple step, reducing manual data entry and saving you time. They can also function as triggers in Rewst when building workflows, allowing for seamless transitions and increased efficiency.
Expand the reach of your forms by embedding them into various web pages, providing increased accessibility to users. Tailor forms to specific scenarios through cloning and modification, ensuring the right fit for every situation.
Access all forms, be they manually created by you or obtained as part of unpacking Crates, by navigating to Automations > Forms in the left side menu.
Want to learn more? Search for the How to build forms course in Cluck University.
You have a string that you would like to split each word/character by a delimiter to create a list.
Splits text on a delimiter into a list of strings.
Max Splits
The maximum number of splits. If not specified or -1, then there is no limit on the number of splits (all possible splits are made)
Seperator
Character or sequence of characters to split on (default is ), such as ' , ',':', etc.
Text to split
The string to be split.
Result of Example:
You would like to set a variable for use later in the workflow
Set a variable as an action.
This transform will allow you to set a variable using an action vs. setting a data alias in a transition.
The name of the variable will be set via the Publish Result As
field.
Variable Contents
The value of the variable you are setting.
Result from Example:
You have received a return with a string in CSV format and you would like to convert this to a list of JSON objects.
Parse CSV Data into JSON. The first line will be keys, and subsequent lines will be values.
Delimiter
Character or sequence of characters to used as a delimiter in the CSV (default is ), such as '|';':', etc.
String Contents
Input the CSV formatted string you would like to convert to JSON.
Result of Example:
Modify a specific field's value within your list objects.
You have a list of objects where certain field values need adjusting. You need a solution that not only allows straightforward field value modifications, but also supports conditional changes and nested element modifications.
The Set List Field Value
action enables the customization of a field's value within a list of objects. Whether it's for conditional value adjustment based on specific criteria or working with nested elements, this action offers the flexibility you need.
List to Transform
The list of objects you want to modify the contents of.
Field to Update
Specify the field to be added or modified in each object.
New Value
Specify the value for the new or modified field.
New Value Mode
How you want to provide the field's new value. copy_from_field
or set_value
(described below)
Parent Fields
If the field should be nested within another list, specify the parent list's name here.
Condition Field
If you want to update the field conditionally, specify the field to base the condition on.
Condition Value
If a Condition Field
is specified, provide the value that should be matched to trigger the update.
Let's break this down into specific use-case examples, to show how each of these methods can be used within the Set Field Value
Transform.
Assume that we have a list of objects called my_list
that looks like this:
Using the New Value Mode
you can define how you want to provide the data for the outputting field. You can do one of two things:
Copy From Field: allows you to copy the value from an existing field
Set Value: provide the literal value you'd like the field to be set to.
Here are some examples of how we can use this action to update or add to our list:
After all these examples are performed in the transformation, your newly updated list would reflect these changes in their outputted results as such:
With the knowledge of the Set Field Value
action, you're now equipped to make modifications to the field values in your lists of objects. Remember, the aim is not just to change values but to improve the readability and utility of your data.
There may be times when you want to take an existing form and make slight modifications to apply it to another use case. For example, you may be using the Client: New Employee workflow to onboard new users, and want to have two different forms:
One for when you hire internal users at your organization
One for adding users for your customers
Navigate to Automations > Forms.
Click ⋮ and select the Clone option on the form you want to clone.
Rename your form to something unique and define a few other fields:
New Name: the new name of the cloned form, make sure this is something unique and describes the use case for the form.
Organization: the organization that the form will reside under.
This doesn’t necessarily mean that you want to select the customer that the form will be for. The best practice is to have the form live at the top-level organization. The customers are tied to the relevant form by a trigger in the workflow. More information can be found in the Intro to Triggers article.
Click the Clone button to see your cloned form.
Shallow cloning is a feature of the Rewst platform that allows you to create a copy of an existing workflow or form. This is useful if you have a workflow that is very similar to another workflow, but which requires a few small changes.
Standard cloning copies the entire resource pack— workflow, forms, templates, triggers, etc— and when cloning into your own org, you end up with multiple duplicates of the same resource. Shallow cloning copies that single selected resource, but re-uses all of the dependencies that it has. If you have a sub-workflow that's part of a main workflow, and you shallow clone that sub-workflow, you will end up with a copy of the sub-workflow. This lets you make changes to the sub-workflow without affecting the original workflow.
There is no difference between the steps to clone or shallow clone a resource. Rewst will automatically detect if you are cloning something into your own org. If so, the platform will shallow clone it instead. Note that this removes the Synchronize button on the dialog, and instead shows a text to explain.
Learn how to build and customize your Rewst Forms
In the Create New Form dialog, give your form a descriptive name. Remember, as you build more in Rewst, your list of forms will grow significantly. Following proper naming conventions will save you time in finding your right form later on.
The Form Builder is similar to Rewst's Workflow Builder in that it has a list of options on the left, called form fields, which can be dragged and dropped onto the canvas in the center of your screen.
Each of these options will relate to your inputs, or the information that goes into the form. With the exception of the Text/Markdown field which is only used for presenting data to the end user, all other fields are used as data input and contain a field name, field label and field description. The field name is the variable name used within the workflow once the form has been submitted. The field label and field description are used to format the appearance of the form.
Using the correct fields ensures your workflows receive clean, organized data.
Dynamic options automatically fetch data from integrations, thereby eliminating the need for manual data entry and keeping form options up-to-date with the latest data. For example, if you're managing hiring information within your PSA, dynamic options can automatically pull this data into the form, ensuring that users always have the most current information.
There are two types of dynamic options: integration reference and workflow generated.
A reference option is a dynamic field pulled directly from predefined actions. It works well for straightforward data retrieval, but may require conversion to a workflow-generated option for data manipulation, as this doesn't give any filtering options and will pull directly from the API endpoint.
Selecting the Microsoft Graph integration to list all users.
In this image, what is shown to the user is what is set as the label for the list contents. Ultimately, it can be whatever you want it to be, using Jinja to manipulate that output correctly. The ID is the value or unique ID of what the workflow is referencing for its future actions.
Default options can be selected for a form field linked to a workflow by following these steps.
Add a boolean property to each option result.
Define the boolean property for the Default Selected Field value.
Sample data returned by a workflow:
Fields to be filled out in the form:
Value Field: id
Label Field: label
Default Selected Field: current_default
Workflow inputs in Rewst offer a flexible way to define specific inputs to a workflow via a form. This functionality allows you to handle various client cases and attributes dynamically. By understanding these concepts and utilizing the provided examples, you can create versatile and dynamic forms tailored to your specific needs.
Below are some key aspects of workflow inputs:
For example, by employing {{ ORG.VARIABLES.primary_identity_provider }}
, which is set per client as either on_prem
or azure_ad
, you can use the same form for both client cases. The form will be pulled from the relevant system.
Instead of creating separate workflows for various attributes such as department, userPrincipalName, or ID, you can use a single workflow with a hard-coded element. This approach takes your input and returns the desired property.
For example, the attribute department
can be hard-coded to allow a single workflow to handle different returned properties.
Here's a Jinja code snippet for achieving this:
Recall that you can access all forms in your form list in Rewst. Understanding how to test a form can sometimes be confusing due to its intrinsic link to a workflow. To get the Form URL for testing directly from a workflow:
Click View Form URLs.
Select the desired organization's form from the list.
The onboarding form includes a number of fields to be filled out when onboarding new users. The default behavior of all the dropdown fields is to pull the list of options from the API. This is because the dropdown fields have Dynamic Options toggled on.
While this may work in many cases, there are scenarios where it makes sense to limit the number of options based on the customer segment you're working with. An example of this might be that you need to limit which email domains each customer sees. You may also want to limit which locations customers can choose from. In any case, you can set specific values for the default_form
organization variables to use in your forms.
You can add default values for any of the form organization variables below:
Navigate to Configuration > Organization Variables.
Click Add at the top right.
Enter in the following for the new organization variable:
Name: form_default_email_domain
Value: ["email domain"]
Category: General
Organization: Choose Your Organization
Any value you add to a variable must exist in the list that the form value is pulling from. An example of this would be that any email domain added as a default must exist in the list that is pulled from the Microsoft API.
Next, the variable can be added to the form field.
Navigate to Automations > Forms.
Open the User Onboarding Form.
Click to open the settings for the Email Domain Name field.
Enter true
in the schema.enumSourceWorkflow.input.force_default setting.
Enter email_domain
in the schema.enumSourceWorkflow.input.choose_variable setting.
Click Save.
Make sure to set the org variable values for any company organization using the form. For example, say there are three company organizations that need to use the same form with a list of three domains to choose from. Each organization needs to have the variable added with the domain values set. If you only set the variable and values in Company 1, the other two Companies won't see any options to choose from.
There is often a need to embed a form in an iframe to give users the ability to complete a form and trigger automation. The form can be embedded into other web pages that use iFrame links.
To get the dynamic form URL, make sure your form is already set up as a trigger for a workflow.
Follow these steps to get the embeddable link:
Navigate to Automations > Workflows.
Click on the Workflow that includes the form trigger.
Click Edit Trigger in the top menu.
Click on Copy Embeddable iFrame code.
This copies the embeddable Iframe code. Paste the code into your compatible webpage editor.
In Rewst, every automation starts with a single click. Forms are powerful tools used to collect the information your workflows need to start. They streamline the data collection process by gathering key details from users such as names, dates, or options. Forms can be manually created, or added as part of .
We’re constantly adding new features to Rewst. If you have a suggestion for what we could add to our forms functionality, add a request or upvote other existing suggestion posts
The part of Rewst you use to create and edit forms is called the Form Builder. To access it, navigate to Automations > Forms, and click .
The Text/Markdown field lets you present text, optionally formatted with Markdown. You can also render Jinja in these fields, which can be useful for presenting organization variables, or rendering a Markdown table with data from elsewhere in the form.
These are used most commonly when the list of options is being generated via an options generator . Dropdown selection is limited to a single option. For multiple options for selection, see the multi-select form field option.
Multi-select is similar to the dropdown field, but lets you select as many options as you like, up to a maximum number of options which can be specified on the field.
The Checkbox field provides a toggle with a true/false value for the form. You can also change the label positioning.
The Radio Buttons field offers a selectable single option. It can also be dynamically populated in the same way as a dropdown or multi-select field, but doesn't allow for the additional options of auto-populate, allow custom input, always skip cache and always override option. For this reason, radio buttons are rarely used with dynamic options.
The Text Input field accepts a single line text string. You can also perform regex validation and error reporting, or populate the field with a default value.
The Number Input field accepts numbers, as long as they meet the Python definition of numbers: whole numbers or floats. Set a default value, as well as minimum and maximum values.
The Multi-Line Input field accepts large amounts of text. No validation is available for this field.
Note that the time zone or this field is based on your browser locale. Rewst converts the time into UTC when passed into the workflow without the time zone data. As an example, if you're in EST and you select 6pm, the workflow will receive this as 1pm UTC, due to the 5 hour offset. Adjust your submission for this time difference when you are submitting a form for a customer in a different time zone from yourself, and need to specify a time.
.csv .xls .xlsx .json.
If you want more flexibility around the output of the data your user is seeing, you may need to opt for a workflow generated option instead, which allows for data manipulation using .
This setup requires the workflow type be an option generator. See our for more details on this functionality. The below documentation is high-level only.
If you have a form used across multiple clients, each with distinct environments like Microsoft 365 or On-Prem, you can use an o to dictate the source of the data.
Locate the on the workflow.
To view the form org variables table, .
form_default_supervisor
Used so that if the form forces a default, this is the value supplied in the if statement
string
form_default_orgunit
Used so that if the form forces a default, this is the value supplied in the if statement. Example is [{"id": "fb53fb9f-208f-451c-9391-6092eb7c4e1b","label":"OU=Disabled Users,OU=Pedro Users,OU=Pedro Ltd,DC=ad2,DC=pedroaviary,DC=com"}]
list
form_default_location
Used so that if the form forces a default, this is the value supplied in the if statement
string
form_default_email_domain
Used so that if the form forces a default via workflow input, this is the value supplied in the if statement
string
form_default_selection_email_domain
Will return the domain specified as the default selection for the workflow [Rewst Master v2] M365: List Email Domains-Actual
string
form_default_licence_sku
Used so that if the form forces a default, this is the value supplied in the if statement
list
form_default_aad_groups
Used so that if the form forces a default, this is the value supplied in the if statement. Example is [{"id": "68c2878a-6739-438c-bf5a-d8c2bea39573","label": "AAD Group One"},{"id": "936eb764-36c4-4ac6-b264-c532caeb217c","label": "Group Me Up Buttercup - Group"}]
list
form_default_distribution_aad_groups
Used so that if the form forces a default, this is the value supplied in the if statement. Example is [{"id": "68c2878a-6739-438c-bf5a-d8c2bea39573","label": "Dist Group Two"},{"id": "936eb764-36c4-4ac6-b264-c532caeb217c","label": "Group Me Up Buttercup - Distribution"}]
list
form_default_onprem_groups
Used so that if the form forces a default, this is the value supplied in the if statement. Example is [{"id": "68c2878a-6739-438c-bf5a-d8c2bea39573","label": "Local AD Group One"},{"id": "936eb764-36c4-4ac6-b264-c532caeb217c","label": "Another Local AD Group"}]
list
form_default_security_aad_groups
Used so that if the form forces a default, this is the value supplied in the if statement. Example is [{"id": "68c2878a-6739-438c-bf5a-d8c2bea39573","label": "Security Group One"},{"id": "936eb764-36c4-4ac6-b264-c532caeb217c","label": "Security Group Two"}]
list
form_default_department
Used so that if the form forces a default, this is the value supplied in the if statement. Example is [{"department": "HR"},{"department": "Finance"}]
list
form_default_phone_number
Used in the workflow itself that if the org var is specified, it'll use it if none on the form
string
If a form field of a form unpacked from a Crate isn't populating with information, you have two options.
Identify the issue by digging into the form.
Open a support ticket with Rewst's support team and have them troubleshoot the issue for you.
Either option will require you to collect information from the form by completing the following steps. As an example, we're using the [Rewst Master v3] User Onboarding Minimalistic form.
Navigate to Automations > Forms.
Open the form in question.
Scroll down in the right side menu. Click on any field that's further down in the field list.
Click on the field. This will open its information in the right side menu.
Scroll down to see if the field is a dynamic field. If it is, Dynamic Options will be toggled on.
Confirm if the field has Workflow Generated toggled on. If so, look at the options generator in the Workflow field beneath it.
Click on failed execution rows to see more information.
Click on any of the failed actions in the list at the bottom of the page to examine its Workflow Execution log.
If troubleshooting the issue yourself, find the errors in the workflow execution and correct them.
If creating a ticket for Rewst support, copy the URL of your browser while viewing this information, and paste it into your support ticket.
You'll often have forms that you want to use across a multitude of clients, but sometimes fields may not be relevant to them all. Rewst has conditional fields that can be used to determine whether you show another field.
In our example, we will look at the Supervisor field when creating a new user. In the image below, no Supervisor is set, and therefore the following field is another drop-down for further information.
You can then see that if we add content to that supervisor drop-down, which is a list of users pulled dynamically from Microsoft365, a new field appears.
This boolean field is then checked on, which gives access to another relevant field.
Rather than giving fields to a user that bear no relevance, you only give them fields they must fill in.
These conditional fields are set by clicking the field on the form and clicking Set Conditional Field, which presents you with the below.
To access users in Rewst, navigate to Settings > Users in the left side menu of your Rewst platform.
Adding users into Rewst allows them access to build workflows, view forms, or update configuration items, like integrations or organization variables. When adding a user, there are 4 different roles, each with their own clearly defined permission options:
Adding a user to Rewst won’t send out an invite to the user, but whitelists them and gives a specified level of access. Once added, they can access Rewst via the main link, or via form links that you provide, depending on their permissions.
Currently, each user can only be associated with one Rewst organization. When adding a user to your organization, they'll have access to all of your top-level and customer organizations. Adding a customer will only give them access to their company information.
To give a user at your organization access, first double check that the selected organization in the org selector is set to your organization.
From there, you can follow these steps:
Navigate to Settings > Users.
Click the + icon to add the user.
Enter the Email of the user.
Select their role from the list in the Roles drop down the menu.
Check the Send Email checkbox on or off, to suit your needs.
Make sure you have the correct organization selected for your customer before following the same steps as for adding a user to a parent organization.
Admin or member Rewst permissions are required to remove a user. If needed, re-add a removed user by inviting them again. Removing a user won’t remove any workflows they’ve built or delete any activity in the platform, such as results of workflows or edits they made to forms.
Navigate to Settings > Users.
Click the trashcan to the far right of the user's record to remove the user.
Confirm that you want to Delete in the confirmation dialog that appears.
If you have many users to add from your organization or one of your customers, set up the Add Users To Rewst Via Group Crate for your environment. Search for it in Crate Marketplace.
The Permissions menu contains several different submenus for managing permissions in Rewst.
Admin
Member
Forms
Read only
Let's take a look at how these are defined.
The admin role is for the super user who will have access permissions to everything in their organization. They can do the following at the top level organization:
Add and remove users
Add user roles
View, edit, and build workflows
Check results
Add, edit, and configure forms
Manage integrations and organization variables
Create a test user that can create, read, update, and delete
This is similar to user impersonation without requiring a real user
Create custom roles based on the following default permissions:
rewst.view
rewst.edit
rewst.admin_access
rewst.form.view
rewst.app_platform.view
Additional create, read, update, delete granular permissions
An admin will be able to see all of the customer organizations and manage information there. At the customer level, an admin will be able to access the same information for the customer organization.
The member role can do the following in the member's organization:
Add and remove users
View, edit, and build workflows
Check results
Add, edit, and configure forms
Manage integrations and organization variables
The primary use case for this permission level is to provide customers or internal employees with a way to fill out forms. A user with the forms role will only have access to form URLs that are provided to them by an admin or member. This means they will not have access to the platform itself and only have the ability to view and fill out different forms for the organization or customer they're added to. Anyone added at a customer level will only have access to forms for that customer, while a user added at the parent organization level would have access to forms from any child organization and the parent organization itself.
The read only role's primary use case is to grant lower-level technicians access to Rewst, enabling them to view workflow results. Additionally, it serves as a mechanism to limit access to certain features and configurations. Users with the read only role can access Rewst and review data and information but are restricted from creating or updating anything within the platform.
The custom roles feature lets you add and define additional roles however you wish.
Add a custom role by clicking + in the Roles menu.
The custom roles feature is only available to Rewst users with admin or staff permissions.
For more information on unpacking Crates, see our Crate documentation .
Open the options generator by clicking .
Click View results for workflow.
View the list of all times the workflow has run. Errors will be denoted by Failed.
A user in Rewst is an individual. That individual will be allowed to interact with Rewst in some way, as dictated by their . Users should not be confused with .
Filter your list of users by any of the column header criteria. Click at the top right of the user management screen to open a submenu with options to Add or remove columns via checkbox selection.
Clicking the in the Actions column for any user opens up editing capabilities for that user. If you have permissions which allow you to make roll changes, adjust their role using the Roles drop-down selector.
Submit.
Change the organization by clicking the selector arrow in the drop down organization menu at the top left of your screen. Type in the search bar to find the specific organization to narrow down your search.
See our for the purpose and use of the Rewst Support Access submenu.
Roles settings can be accessed in the Rewst platform by navigating to Settings > Permissions > Roles. Rewst has several different role choices available when :
A group or entity within the Rewst platform that may have its own variables, forms, workflows, and users, organizations enable multi-tenanted management and customization of the platform according to specific customer needs. You may see us refer to an organization as an org for short.
Rewst uses a two-tier system to manage organizations, with your MSP as the parent org and your customers as child orgs. To make automations work for your managed clients/customers, set them up as child orgs.
Organization variables, referred to as org variables for short, serve as the foundational elements for setting and managing configurations across different organizational levels within Rewst. They ensure consistency and control within workflows, and facilitate efficient management across the organizational hierarchy.
Inheritance: Values set at the parent organization leven cascade down, providing a default setup for all client organizations.
Overrides: Suborganizations can establish their own variables, prioritizing local settings over inherited defaults.
Access variables seamlessly in any workflow with the following syntax:
Employ descriptive and straightforward wording using snake_case
for clarity.
Prefix integration-specific variables appropriately, like psa_
for PSA-related variables.
The use as default feature allows managing organizations to set a universal default value for an org variable. This default is applied to suborganizations unless they specify their own value.
Set a default: When you set a variable as default at the MSP level, it becomes the fallback for suborganizations without a specified value.
Workflow execution context:
The default value is only used if the workflow is initiated from the managing organization.
To apply the default value to Client A, the workflow must start from the MSP, even if it operates within Client A’s context.
Triggers and context:
Implementing triggers in the workflow ensures that the execution context is recognized. This facilitates the use of MSP-level defaults in sub-organization workflows.
Navigate to Automations > Workflows in your Rewst platform.
Click the Create button to create a new workflow.
Add the following action type, depending on the brand of PSA you use:
ConnectWise PSA: Create Service Ticket
Datto PSA: Create Ticket v2
Halo PSA: Add or Update Tickets
Click the ⋮ in your action to open up its settings.
Click in any field with a blue arrow.
Note that this method will only work for the three indicated PSA brands: ConnectWise, Datto, and Halo.
Certain ORG Variables are essential for onboarding processes and are utilized by the Get and Set ORG Variables Workflow to ensure smooth integration and setup for new users or systems.
Default PSA
default_psa
Identifies the PSA that you use
cw_manage
kaseya_bms
datto_psa
halo_psa
freshdesk
servicenow
mail_only
etc
Default RMM
default_rmm
Identifies the RMM that you use
cw_automatecw_control
datto_rmm
immybot
ninja_rmm
n_able
kaseya_vsa
kaseya_vsa_x
etc
Primary Identity Provider
primary_identity_provider
Specify where users are created for the organization, either on premise or in Azure
on_prem
azure_ad
jumpcloud
Default Ticket Location
psa_default_board_id
The default PSA board (or other organizing feature) that Rewst will use to create tickets on when running automations
(depends on psa)
Default Ticket Status
psa_default_ticket_status
The default ticket status that Rewst will use when updating tickets. This is the status that Rewst will use when actively working on a ticket. It usually set to "In Progress" or a similar status.
name or id of ticket status
Ticket Status while Waiting for Input
psa_ticket_status_waiting_input
The default ticket status that Rewst will use when tickets are waiting for user input. This applies in cases where the automation will pause and prompt a technician to do an additional step outside of the automation before then returning to the ticket to confirm that action has taken place. This will then kickoff the automation to continue from the position it left off.
name or id of ticket status
Ticket Status when Workflow Complete
psa_ticket_status_completed_task
The default ticket status that Rewst will use when we finish an automation. Consider this the "quality check" status to make sure everything ran properly.
name or id of ticket status
No Time in Tickets
psa_no_ticket_time
Set this when you don't want automation to put time_worked in tickets. The "Yes" option will add notes in the ticket we create when running an automation. The "No" option will let us impersonate a technician to apply time under there name for automations that run. We do this because we can't apply time via the API for most PSAs.
1
or 0
(boolean )
Default Tech ID
psa_default_tech_id
Tech Id to user when updating ticket time
id of tech to use for time entries
Default Work Role
psa_default_tech_workrole
Tech Work Type to user when updating ticket time
id of tech work type to use for time entries
Default Work Type
psa_default_tech_worktype
Tech Work Role to user when updating ticket time
id of tech work role to use for time entries
New User Ticket Type
psa_new_user_ticket_type
Ticket Type to use on the New User Board when creating a ticket
int
for type_id in CWM
New User Ticket Subtype
psa_new_user_ticket_subtype
Ticket SubType to use on the New User Board when creating a ticket
int
for subtype_id in CWM
New User Ticket Item
psa_new_user_ticket_item
Ticket Item to use on the New User Board when creating a ticket
int
for item_id in CWM
Time Entry Ticket Status
time_entry_ticket_status
Set tickets to this status to enable time entry
str
Status Name or int
ID to use
New User Approval Email
new_user_approval_email
When email approval is needed for new user adds, use this address
email address
Require Approval For New User
require_approval_for_new_users
Controls the new user approval requirement.
(1
or 0
) or (true
or false
)
Require Authorization for License Purchases
m365_require_authorization_for_new_licenses
Pause workflows for Inquiry
when new license purchases are needed
1
or 0
(boolean )
Require Approval For Offboarding Users
require_approval_for_offboarding_users
Controls the new user approval requirement.
bool
Offboard User Approval Email
offboarding_user_approval_email
When email approval is needed for offobarding users, use this address
email address
New User Password Save Location
new_user_password_save_locations
Where to store the password during new user creation. Default to PSA if not defined
List of psa``itglue``hudu``custom-pwpush
other systems
New User Password Save Location Custom URL
new_user_password_save_location_custom_url
In the event that we are storing a password in a custom PWPush, put the URL here
User Start Date Action
user_start_date_action
How to handle start_date
in user onboarding
default document_only
: only show in ticket
Override Email Domains
override_email_domains
List of email domains to show rather than querying from M365
List of domains
New User Automation Task Time
automation_task_new_user_time
Default time for the "New User" workflow, to add to the ticket at completion
int
in minutes
Offboard User Automation Task Time
automation_task_offboard_user_time
Default time for the "Offboard User" workflow, to add to the ticket at completion
int
in minutes
VIP Contact Type
psa_vip_contact_type
Contact Type to set for VIP users
name or id of Contact Type
Adds a field on forms for specific approver email
new_user_manual_approver_field
Allows the field in New User to show up and add a specific e-mail approver
1
or 0
(boolean )
New Ticket for License Purchases
license_purchases_in_new_ticket
When prompting in tickets for license purchases, do so in a new ticket
1
or 0
(boolean )
Board ID for License Tickets
psa_license_purchase_board_id
The PSA Board ID to use when license purchases are in a separate ticket
int
board_id for CWM
Active Customer Statuses
psa_active_customer_status
Statuses in PSA for active customer organizations
List of status
types from PSA
Default Priority
psa_default_ticket_priority
The default ticket priority that Rewst will use when creating tickets
name or id of ticket status
Default Agreement Name
psa_default_agreement_name
If you set a default agreement in your PSA on ticket creation, enter the name of it here.
str
name of agreement
Send From Address
psa_send_from_address
When sending mail, we can set the "replyTo" address to this, to allow for proper ticket responses
str
email addr
Store Password in Ticket
psa_store_password_in_ticket
When documenting the password, this will never store it in the ticket if set to false
bool
Microsoft Licensing Distributor
ms_licensing_distributor
Microsoft License Distributor (where to purchase CSP licenses)
pax8
microsoft_csp
ingram_micro sherweb synnex manual_only
Mandatory Licensing Groups
m365_mandatory_license_groups
If you use license groups with Microsoft 365 you can specify those groups here. This allows you to create a group of licenses that the user will be added to if selected.
list
of group_names
Username Format
username_format
The format of the users username
flast
firstl
firstmlast
Preferred Domain Controller
preferred_domain_controller
Choose this DC instead of letting automation decide
ComputerName in RMM
Preferred ADConnect Server
rmm_preferred_adconnect_server
If your ADConnect is on a specific server, specify it here
str
hostname of server
On-Prem Exchange Server
onprem_exchange_server
Server name to use if you have on-prem Exchange
ComputerName in RMM
On-Prem Hybrid Exchange
onprem_hybrid_exchange
Set to true to identify this client as using Hybrid Exchange setup (Usage of Enable-RemoteMailbox)
Preferred Phone Number Format
phone_number_format
Format to use for phone numbers (stringifies ints with formatting)
NXX NXX XXXX
NXXNXXXXXX
NXX-NXX-XXXX
NXX.NXX.XXXX
No PSA - Mail to Address
no_psa_mail_address
If there is no PSA, we will mail information to this address
str
email addr
On-Prem No AD Sync (not in form)
onprem_no_adsync
If there is no ADSync configured between on-prem and M365 (needs to be added manually)
bool
M365 Usage Location (not in form)
m365_usage_location
Country Code such as "US" or GB"
str
All Internal Notes
psa_all_notes_internal
When adding notes, check if they should all be internal or allowed some external
bool
Crate - Sync Contacts - Report Only
crate_sync_contacts_report_only
If a user is missing, this will create a ticket for them with the relevant user information
bool
No Azure AD
no_azure_ad
ORG Does not use AzureAD
bool
IT Glue Custom Actions
itglue_custom_actions
If the client uses ITG, this will trigger a subworkflow for actions in the user onboarding workflow
bool
PSA Custom Note
psa_custom_note
If the client wants a custom note on a ticket, we can use this variable to branch off on update tickets
string
PSA Custom Actions
psa_custom_actions
Used to allow a sub-workflow execution at the end of the new employee workflow (set to 1 to enable)
bool
PSA Default Ticket Source
psa_default_ticket_source
Used in the Datto creation of the ticket during new user workflow and defines the source of the ticket
int
Hudu excluded forms
hudu_form_excluded_forms
For adding Rewst forms to Hudu, variable can be defined to set forms to ignore
ITGlue excluded forms
itg_form_excluded_forms
For adding Rewst forms to ITGlue, variable can be defined to set forms to ignore
HUDU Create Contact In Asset
hudu_create_contact_in_asset
Used to create a contact in Hudu and the password and relate them togehter
int
Licensing Choose Subscription
licencing_choose_subscription
Used to decide whether the "Show Subs" option appears in New User Onboarding form
bool
Form Default: Supervisor
form_default_supervisor
Used so that if the form forces a default, this is the value supplied in the if statement
string
Microsoft Onboarding Form Default: Organization Unit Field
onboarding_form_default_orgunit
Used in the Microsoft Onboarding form at the Organization Unit Field which allows users to set a default OU, this is the value supplied in the if statement.
Example Value: [{"id":"63111ab9-136e-4072-32a5-24221a331ded","default":true,"label":"OU=REWSTUsers,OU=Users,OU=RewstTest,DC=rewsttest,DC=local"}]
Form Default: OU (OrgUnit)
form_default_orgunit
Used so that if the form forces a default, this is the value supplied in the if statement. Example is [{"id": "fb53fb9f-208f-451c-9391-6092eb7c4e1b","label":"OU=Disabled Users,OU=Pedro Users,OU=Pedro Ltd,DC=ad2,DC=pedroaviary,DC=com"}]
list
Form Default: Location
form_default_location
Used so that if the form forces a default, this is the value supplied in the if statement
string
Form Default: Email Domain
form_default_email_domain
Used so that if the form forces a default, this is the value supplied in the if statement
string
Form Default: License SKU
form_default_license_sku
Used so that if the form forces a default, this is the value supplied in the if statement
list
Form Default: Department
form_default_department
Used so that if the form forces a default, this is the value supplied in the if statement. Example is [{"id": "68c2878a-6739-438c-bf5a-d8c2bea39573","label": "Dist Group Two"},{"id": "936eb764-36c4-4ac6-b264-c532caeb217c","label": "Group Me Up Buttercup - Distribution"}]
list
Form Default: On-Prem Groups
form_default_onprem_groups
Used so that if the form forces a default, this is the value supplied in the if statement. Example is [{"id": "68c2878a-6739-438c-bf5a-d8c2bea39573","label": "Dist Group Two"},{"id": "936eb764-36c4-4ac6-b264-c532caeb217c","label": "Group Me Up Buttercup - Distribution"}]
list
Form Default: AAD Groups
form_default_aad_groups
Used so that if the form forces a default, this is the value supplied in the if statement. Example is [{"department": "Jesse"},{"department": "dam"}]
list
Form Default: AAD Security Groups
form_default_security_aad_groups
Used so that if the form forces a default, this is the value supplied in the if statement. Example is [{"department": "Jesse"},{"department": "dam"}]
list
Form Default: AAD Distribution Groups
form_default_distribution_aad_groups
Used so that if the form forces a default, this is the value supplied in the if statement. Example is [{"department": "Jesse"},{"department": "dam"}]
list
Form Default: Default Phone Number
form_default_phone_number
Used in the workflow itself that if the org var is specified, it'll use it if none on the form
string
Form Default: new_user_azure_ad_attributes_to_copy
new_user_azure_ad_attributes_to_copy
Used to specify which properties of the user being copied to apply to the new user Example is ["location","city","street_address","desk_phone","company","usage_location","department","user_title","mobile_phone","postcode","state"]
list
Form Option: Send password via SMS
send_sms_to_user
Sending passwords via SMS carries associated risks. Please be sure that your risk tolerance is considered before enabling this option.
int
CW Control Session Group Override
cw_control_session_group_override
This org variable setting will allow you to use a different session group than All Machines. The session group name needs to match whatever session group you would like to use and is case sensitive. Example: All Machines by Company
string
Manual License Confirmation No Pod Notification
cwm_nopod
This organization variable is used in the manual license purchase workflow, by default the workflow attempts to prompt for approval via a Manage pod. If pods are not configured in your environment then this org variable should be used to override the default behavior which will provide the prompt via a ticket note.
true
(string)
New Employee Output Exclusion Variables
onboard_output_ignore_vars
This organization variable is used to override the default output configuration exclusions for the output_context variable. Example value: ["execution_id","organization","originating_execution_id","rewst","sentry_trace","trigger_instance","max_retries","sendMail_from_user_object"]
list
PSA Alert Type Variable (Halo)
psa_alert_ticket_type
This organization variable is used to specify the ticket type for Halo PSA customers in workflows such as the DUO bypass user workflow and Exchange mailbox nearing quota workflow. The type id should be specified (example: 32)
int
PAX8 Unmapped Company Alert Exclusions
pax8_unmapped_alert_ignore_list
This organization variable is used to specify a list of Rewst OrgID's to ignore when creating alerts for the alert_on_unmapped_orgs setting in the "Pax8 Extra License Removal" workflow of the "Alert on Unused M365 Licenses" crate
list
Halo Site Name Override
halo_ticket_site_name
This org variable is used to define a site name in the Halo ticket creation sub workflow, if not defined then 'Main' will be used. This is only required if you would like to use something other than 'Main'
string
Onboard Excluded Org Variables
onboard_excluded_org_variables
This org variable overrides the variables automatically excluded when you create a user using new employee onboarding.
string
N/A
pax_8_removal_ignored_subs
Add product's to ignore based on the Microsoft product displayname
Value is expected to be a json formatted list such as ["O365DOMAIN_STANDARDW_PRIVACY"]
In Rewst, setting specific trigger criteria for PSA Ticket triggers can be crucial to ensuring that workflows are initiated only under certain conditions. This page provides a step-by-step approach to customizing these triggers.
In the Rewst platform:
Navigate to Workflows > Create.
Enter a workflow name, like My First Webhook Trigger
.
Click Submit to proceed to a blank workflow creation screen.
Click Add Trigger at the top of your workflow builder.
Name your trigger.
Toggle Enable on.
Choose the trigger type relevant to your particular PSA ticket system:
ConnectWise PSA: Ticket Record Saved.
Datto PSA: Ticket Webhook
Halo PSA: New Ticket Record.
Click on the graph button under the Trigger Criteria section.
The trigger is now active and will capture data when a new ticket is submitted. This screen is listening for your ticket records to be saved, and will show you live results as they come in.
To see the trigger in action follow the below steps
In your PSA system, create and classify a new ticket with desired criteria.
Submit the ticket.
You should see the ticket record appear in Rewst.
Find and click the values in the ticket you want as trigger criteria. They will have their corresponding path entered into the Trigger Criteria on the right.
After selecting all desired criteria, click Save
then Close
.
Your trigger criteria are now set and visible.
Copy these criteria values.
Paste them into other workflows you are configuring.
This process allows for precise control over when your workflows are triggered, enhancing the automation's effectiveness. Experiment with different criteria to tailor your workflows to specific needs.
A trigger criteria is a set of conditions that determine whether a workflow should start. A condition can be a simple comparison of two values, a complex set of conditions, or even a Jinja-based query. Trigger criteria can resolve into the following possible statuses:
VALID - A valid trigger criteria means the triggered event satisfies all possible conditions and will start the workflow. A criteria is satisfied when all specified conditions are satisfied by logical means against the trigger context.
FILTERED - A filtered trigger criteria will not start the workflow and could be due to multiple reasons. The most common reason is one of the conditions is not satisfied by logical means by design and the system will filter out the event. Another reason could be due to a malformed condition that could not be parsed by the system. And finally, any malformed request initiating the trigger itself will also be filtered out.
UNDEFINED - A trigger criteria is undefined if the notification system is unable to determine the status of the trigger criteria. Please create a bug ticket if you encounter this status.
Adds new trigger criteria.
Opens the trigger criteria test dialog.
This field is used to access the trigger context. A trigger context is a dictionary of key-value pairs that contain the data of the event that triggered the workflow. The accessor field is used to access the value of the key in the trigger context.
Opens a Monaco editor dialog to edit the field accessor.
The operator is used to compare the value of the trigger context with the value of the field.
Value of the field to compare with the value of the trigger context.
Removes trigger criteria.
The test dialog aims to assist you in developing your trigger criteria, with incoming trigger events displayed on the left and the corresponding trigger criteria form on the right.
Start/Stop receiving trigger events. This does not disable the trigger itself. It only stops the UI from displaying additional trigger events from showing.
Click the value of the trigger context to generate trigger criteria. This will automatically map the field accessor and the selected value of the trigger context.
While having the Insights dialog open, you can press the F8
key to save the trigger.
Note that you can have multiple triggers per workflow, for example a webhook and a trigger that runs when a ticket gets saved in the PSA.
Update the relevant fields in the form as needed, to set up your trigger.
Name
Whatever you would like to name your trigger, with a descriptive word or phrase for what it does.
Enabled
Toggle this on or off.
Organizations
Select all the organization that exist within Rewst that may need to use this workflow. If you add a new client, they will have to be added in that workflow trigger.
Integration Override
Integration overrides allow you to specify which integration configurations should be used. When a workflow is triggered by and running within the context of a child organization, by default they only have access to their own integrations and configurations. To give the workflow access to integrations and credentials owned by the parent organization, that default behavior must be explicitly overridden. In the above example image, the trigger allows your clients to use your PSA, RRM and licensing integration.
Trigger Type
Form
If your trigger type is a form submission, you would select the form that links to the workflow.
The above is a snippet from a form where a dropdown field has been selected and the output will be based on the workflow output. When running the form, if the client is added on the trigger and the trigger is set on the form, the workflow will run, and the options will fill into the form field.
There are six key triggers to understand when getting started with Rewst. These triggers cover a range of automation scenarios, from scheduled executions to real-time event responses. In Rewst, we denote these from other triggers by calling them core triggers. Type core
into the Trigger Type field to isolate most of these trigger types from the total list.
The cron job trigger initiates a workflow on a predefined schedule. This allows you to automate recurring tasks without manual intervention.
For example, you can configure a workflow to run every Monday at 3:00 PM to generate weekly reports or clean up outdated records.
This trigger is most useful for:
Scheduled maintenance workflows: clearing stale data, running audits
Recurring notifications: sending reminders, generating reports
Automated check-ins: verifying system statuses, updating dashboards
A workflow can be triggered when a user submits a form. Forms collect structured information, ensuring the workflow has the necessary data to proceed.
For example, you can submit an employee onboarding form to trigger a workflow that creates user accounts, assigns permissions, and sends welcome emails.
This trigger is most useful for:
Request-based workflows: access requests, service requests
Intake processes: user registrations, issue reporting
Approval workflows: leave requests, expense approvals
A webhook trigger starts a workflow when external data is received in real time. Webhooks eliminate the need for manual checks, making them efficient for event-driven automation.
The webhook URL serves as a listening endpoint. When an external system (e.g., a CRM, ticketing system, or another Rewst workflow) sends data to the webhook URL, the workflow is triggered immediately. This enables seamless integration between Rewst and external applications without requiring a direct API connection.
For example, a webhook could trigger a workflow whenever a new customer signs up in a CRM, automatically assigning them an account manager and setting up follow-up tasks.
This trigger is most useful for:
Event-driven automation: responding to new leads, updating records on status changes
Real-time notifications: escalating high-priority tickets, alerting teams to critical updates
External system integrations: syncing data between platforms, processing incoming requests
The always pass trigger allows a workflow to start without conditions. It is commonly used in workflows that do not depend on external events or schedules.
For example, you might use this trigger when testing workflows, executing a workflow from another workflow without needing a specific event, or populating dynamic options in a Rewst form.
This trigger is most useful for:
Manual workflow execution: running a workflow on demand
Subworkflows or completion handlers: workflows triggered by other workflows
Testing automation: verifying workflow functionality
Option generators: dynamically populating form fields in Rewst
Time intervals can be set to trigger a workflow repeatedly over specified periods. This trigger is suitable for workflows that need to repeat on a regular basis.
Examples:
Every 5 minutes
Every hour
Daily
Weekly
This trigger is similar to the webhook trigger but is specific to PSA systems. When a ticket record is saved in an integrated PSA, the workflow starts automatically. This includes both newly created tickets and updates to existing tickets.
For example, if a ticket is updated to Escalated, a workflow can trigger an alert to the appropriate team or assign a senior technician.
This trigger is most useful for:
Automating ticket management: escalating high-priority tickets, auto-assigning technicians
SLA enforcement: sending reminders for unresolved tickets, auto-responding to specific cases
Status-based automation: triggering follow-up workflows when a ticket is created or reaches a certain stage
While these six triggers cover the most common use cases, Rewst offers additional triggers tailored to different automation needs. Explore the available triggers in the trigger type list to find the best fit for your specific processes.
The below directions will walk you through how to use tags for workflows, as an example. These same directions will work for how to add tags to forms, scripts, and templates, all found under Automations in the left side menu of Rewst. Once a tag is created, it can be applied to any automation type.
Navigate to Automations > Workflows in Rewst.
Click the three dots to the right of your relevant workflow.
Select Edit Tags.
Open the Tags drop down in the Edit Workflow Attributes dialog to choose an existing tag from the list. Alternatively, begin typing in the drop down field and select the box to Create tag. This action will also add that new tag to your drop down list for all future tag selections.
Submit when finished tagging. If successful, you’ll see a green Workflow saved! confirmation pop up at the top of your screen. Now, tags for that workflow will appear in the tag column of your workflows page.
Bulk editing workflow tags will overwrite all previous tags currently set for those selected workflows.
Check the checkbox to the left of each desired workflow in your workflows page.
Click Submit when finished tagging. If successful, you’ll see a green Workflow saved! confirmation pop up at the top of your screen. Now, tags for that workflow will appear in the tag column of your workflows page.
Your returned list will filter results to only display workflows tagged with your chosen tag.
For quick visual reference of categories, tags can be color coded.
Navigate to Settings > Tags in the left side menu.
Here you can edit individual existing tags via the pencil icon, delete existing tags via the trashcan icon, or add new tags via the + sign to the top right of the Manage Tags screen.
Say you want better visual indicators for your long list of automations, not just text. For example, you could choose to make all Powershell workflows red.
Tags can also be used to mark associations between pieces of a larger workflow. Consider a parent workflow which contains several child workflows and a form. Each piece of that parent workflow could be tagged with one tag. Then, you’d select that tag to isolate everything for just that one workflow, regardless of the pieces you used to create it.
In the Rewst platform:
Navigate to Workflows > Create.
Enter a workflow name, like My First Webhook Trigger
.
Click Submit to proceed to a blank workflow creation screen.
Click Publish to save your workflow. No other actions are needed, as you'll just be working with triggers.
Click Add Trigger at the top of your workflow builder.
Name your trigger.
Toggle Enable on.
The following parameters are available for editing:
Allowed Methods
Used to define which HTTP request method is accepted by the trigger. Attempting to send a request with a method not in this list will result in an error
Include Raw Body
Whether to include the raw string sent in the request body in the results as raw_body
Response Body
Content to return in response body. {{ REQUEST }} may be used to access request data.
Response Headers
HTTP headers to include in response. {{ REQUEST }} may be used to access request data.
TIP: Set your content type here if returning a specific format of data, such as text\html
Response Status
HTTP status to return in response. {{ REQUEST }} may be used to access request data.
Secret Key
Required to Wait For Results. This value must be included in the header as x-rewst-secret when making calls to this webhook. You will receive a 401 if this field is filled out and the secret key is not provided when making the request. Secrets can be defined in the Organization Variables section of the UI
Wait for Results
If true, calls to the trigger endpoint will redirect to a results endpoint that will return the output of the workflow.
When a webhook receives a request, it will include data received in the following schema:
Data can then be pulled from this as context variables. For example, to access the value for test
sent to the webhook as:
The value can be accessed at {{ CTX.body.test }}
.
Similarly, if a URL parameter is sent as ?test=Hello
, this can be accessed at {{ CTX.params.test }}
Webhook URLs are formatted consistently using the trigger ID and organization ID. The format is as follows: https://engine.rewst.io/webhooks/custom/trigger/{{ Trigger ID }}/{{ Organization ID }}
Using this information, you can craft webhook links on the fly for organizations a webhook trigger is enabled for. This may be useful for invoking certain workflows using links in a PSA ticket note or email, for example
In any Jinja editor in the Rewst platform, see what's available by using the |
character within {{ }}
.
Take a deep dive into the world of Jinja.
Jinja is a versatile templating language for creating dynamic content. It supports loops, conditional statements, and variable manipulation, making it ideal for complex data processing in workflows.
Variable Manipulation: Create and modify context variables.
Dynamic Content Creation: Use loops and conditionals to tailor content.
Filter Utilization: Apply built-in filters for efficient data processing.
Output Values ({{ }}
): Display variables or expressions. For instance, {{ CTX.user_id }}
in Rewst 102 shows user-specific data.
Code Blocks ({% %}
): Used for control structures like if
, else
, for
loops.
Comments ({# #}
): Enable non-executable notes for clarity.
Format: JSON (JavaScript Object Notation) structures data in key-value pairs.
Example:
Jinja supports conditional statements like if,
else
and elif
. These statements allow you to create dynamic workflows based on specific conditions, ensuring the workflow adapts to varying scenarios.
Example:
For loops in Jinja enable you to iterate through JSON lists, executing actions for each item. The pointer, such as thing
, points to items within the list, facilitating dynamic data processing.
Example:
Basics: Transform data with pre-defined functions to streamline common tasks, enhancing efficiency in data processing.
Examples:
Truncate text: {{ text|truncate(20) }}
Capitalize names: {{ user_name|capitalize }}
Lowercase & Replace text: {{ user_email|lower|replace("@", "at") }}
Functionality: Efficiently creates new lists from existing ones, based on specific criteria. You can combine filters and conditions to produce concise, targeted lists.
Application: Tailors data selection in workflows, enhancing efficiency and precision.
Three-step structure
List comprehension combines filters and conditions to create concise and targeted lists. This structure ([item for item in list if condition]
) allows you to filter data efficiently.
Output: Define what you want to extract or manipulate (e.g., user.id
).
Construction: Specify the list to iterate over (e.g., CTX.my_user_list
).
Conditions: Apply conditions to filter data (e.g., if user.enabled == true
).
Example:
This example demonstrates filtering active users from CTX.my_user_list
.
Purpose: Allows you to filter data based on specific criteria.
For example, using filters like lower
to standardize data before comparison.
Benefit: Ensures more accurate and relevant data processing, critical for complex workflows.
Purpose: This method allows you to apply specific mathematical functions to each element in a list, thereby modifying the output based on your needs.
Benefit: Offers a succinct method to apply mathematical transformations across a list, yielding a new list with modified values.
Example:
If list_of_numbers = [1, 2, 3, 4]
, then the squared_numbers
list after applying the above list comprehension will be [1, 4, 9, 16]
.
This concise approach efficiently applies the squaring function to each item in the original list and collects the results in a new list.
Purpose: Vital for organizing and managing data within workflows.
Usage: Variables store task results, facilitate dynamic content generation, and enhance the readability and maintainability of Jinja templates.
Creation and modification: Use context (CTX
) variables in Data Aliases on your Task's Transitions to capture specific elements from the JSON data produced by your workflow's tasks. This is pivotal for storing and manipulating workflow data.
Scope and accessibility: These types of variables can be created and modified by workflow tasks but are not global; their scope is confined to the workflow.
We recommend using the to add the majority of your customers quickly, and using the to streamline the mapping process for each new customer you add in the future. You can also add organizations manually, or through the .
Select the Display name you want the ID for, then click the to the left to get the ID.
Add a single action to the canvas. Name it BEGIN
. Click Publish to save your workflow. No other actions are needed, as you'll just be working with triggers.
Note: Ensure that webhooks are enabled as per .
Under the hood, we make use of simple Python operators to compare the values of the trigger context and the field value. For more information, please refer to the
Triggers initiate in Rewst. Every workflow must have a trigger to define when and how it starts. Essentially, triggers put the automate in automation. Choosing the right trigger ensures that your workflows execute at the right time, with the right data, to drive efficiency and consistency in your operations.
A trigger is also used on any input that requires a workflow. If a form uses the Dynamic button, then you must also create a trigger on the workflow associated with that form.
For more on how to see which triggers appear on a specific workflow, view our documentation .
Add a trigger to a workflow by clicking the Add Trigger button in the workflow builder, which will open up a new dialog with a form.
There are a number of types to choose from, such as a webhook, form submission, ticket saved, M365 alerts. See for more information on common trigger types.
To modify an existing trigger, click Edit Trigger. If there are multiple triggers for the workflow, select the appropriate trigger from the dropdown menu.
Once the trigger has been created on a workflow, it can then be used on a form. This must be an options generator workflow, .
Schedules are configured using cron syntax. Consult for help configuring this syntax.
For more information on option generators, refer to .
When you're comfortable with the basics of triggers, learn more about .
Tags let you earmark the automations that you care about most, for quick searching and access. Tags can be added by users with the of member, staff, and admin.
Select the Bulk Select Tags icon that appears to the right of the Search field.
Follow steps as usual to edit or create new tags for your selected workflows. Note that if your multiple selections will result in overriding existing tags, the dialog will display a warning message.
Open the Tags drop down menu under the header of your workflows page. Check off one or more tags from the list.
Add a single action to the canvas. Name it BEGIN
Choose the trigger type Core - Webhook.
{{ CTX.firstname | capitalize }}
Result: Capitalizes the first character of the input variable. If firstname is "john", it'll become "John"
{{ CTX.firstname | lower }}
Result: Lowers the entire variable. If firstname is "jEnnIfer", it'll become "jennifer"
{{ CTX.firstname | upper }}
Result: Capitalizes the entire variable. If firstname is "jeremy", it'll become "JEREMY"
Understanding data types is fundamental for effective programming in Jinja templating. This article provides a comprehensive overview of the main data types in Jinja, exploring integers, floats, strings, lists, tuples, dictionaries, sets, booleans, and NoneType. By grasping the characteristics and use cases of these data types, developers can harness the full potential of Jinja templates.
Integers in Jinja are whole numbers without decimal points. Examples include 1, 2, and 3.
Floats encompass numbers with decimal points, such as 1.1, 2.2, and 3.14.
Strings represent words or sentences enclosed in quotes, like "Hello World".
Lists are ordered collections of data, allowing a mix of different types within the same list.
Tuples consist of two or more linked values, enclosed in parentheses and separated by commas. Tuples cannot be changed after creation.
Dictionaries store data in key-value pairs, similar to JSON. They can be modified and appended to after creation.
Sets are collections of unique values, eliminating duplicates. Converting a list into a set removes duplicate items.
Booleans represent truth values and can be either true or false.
NoneType represents null or None values, indicating the absence of a value. To check for NoneType, the keyword none
is used.
Understanding the various data types in Jinja is crucial for data manipulation and template rendering. By mastering these data types, developers can create versatile templates capable of handling diverse types of information. Whether it's integers for numerical operations, strings for text manipulation, or dictionaries for structured data, knowing when and how to use each data type empowers developers to craft powerful and dynamic Jinja templates. Incorporate these concepts into your templates to enhance their functionality and flexibility, creating more efficient and robust applications.
In the context of Jinja templating, conditional statements and logical operators are vital tools for creating dynamic and responsive templates. This article provides an in-depth exploration of if
, elif
, and else
statements, as well as the logical operators and
, or
, and not
within the framework of Jinja.
if
, elif
, and else
Statements in JinjaIn Jinja templating, if
, elif
, and else
statements function similarly to their counterparts in traditional programming languages. They enable you to control the flow of your templates based on specific conditions.
if
is a foundational conditional statement in Jinja. When the specified condition is true, the associated template code block within the if
statement is executed.
elif
stands for "else if" and is utilized to check additional conditions after the initial if
statement. elif
is evaluated only if the preceding if
statement is false.
else
is a fallback option. It executes a template code block when none of the preceding conditions (if
and elif
, if present) are true.
if
and else
Statements in Jinjaif
, elif
, and else
Ladders in JinjaWhile using multiple elif
statements can be an option, it's generally not the best practice for handling numerous conditions in Jinja templates. Instead, consider using a dictionary switch for improved readability and efficiency when dealing with extensive branching logic.
and
, or
, and not
in JinjaLogical operators in Jinja allow you to combine multiple conditions or negate a condition.
and
requires all specified conditions to be true for the entire expression to be true.
or
requires at least one of the specified conditions to be true for the entire expression to be true.
not
negates a condition, making it true if the original condition is false and vice versa.
In Jinja templating, mastering conditional statements and logical operators is fundamental for creating dynamic and adaptive templates. By understanding how if
, elif
, else
, and
, or
, and not
operate within the Jinja context, developers can craft templates that respond intelligently to various conditions, enhancing the flexibility and functionality of their templates. Always use these constructs thoughtfully to create efficient and effective Jinja templates.
In Jinja, macros are a way to encapsulate reusable pieces of code, similar to functions in other programming languages. However, there are some important distinctions to note when working with macros in Jinja.
Unlike global functions in many programming languages, macros in Jinja are not global by default. They exist within the specific Jinja context in which they are instantiated. This means that you cannot define a macro at the top of your workflow and then use it throughout the entire workflow. Instead, you must re-instantiate the macro in each location where you intend to use it. Alternatively, you can use a template to achieve global access to macros.
To create a macro in Jinja, you must define it using the following syntax:
In this syntax, macro_name
is the name you assign to your macro. To execute a macro, you simply call it by name and pass in any values it requires. For example, consider the following code snippet that defines a rm_null
macro to remove null values from a list:
For users familiar with Python and its default values in functions, Jinja macros also support default values. You can specify a default value for a variable within a macro. If a value is not provided when calling the macro, it will default to the specified value. In the following code example, the check_last_day
macro utilizes a default value for current_date
:
In this case, if current_date
is not explicitly provided when calling check_last_day()
, it defaults to the current date. However, if you do provide an alternate date, it will override the default value and modify the behavior of the macro.
Understanding macros in Jinja is essential for creating reusable code components within your templates. Keep in mind that macros are not global by default, and you must re-instantiate them within the appropriate Jinja context. Additionally, macros support default values, allowing for flexible and customizable behavior.
abs
Return the absolute value of the argument.
all
Return :py:data:True
if none of the elements of the (async) iterable are false.
any
Return :py:data:False if none of the elements of the (async) iterable are true.
as_timezone
Return a string representation of a datetime in a particular format.
dt
: The inputted datetime object. If a string is passed, it will be parsed into a datetime
timezone
: The timezone to convert the datetime to. This can be a timezone name from the IANA db (e.g. 'America/New_York') There is a corresponding action in the 'transforms' pack that uses this filter - convert_datetime_to_timezone
filter_objective
: Convert a datetime object to a different timezone.
attr
Get an attribute of an object. foo
base64
Encode a string in base64.
urlsafe
: Whether to return a URL-safe base64 format. '-' is used instead of '+', and '_' instead of '/'.
basename
A filter to get the last name of a windows style file path.
batch
A filter that batches items. It works pretty much like slice but the other way round. It returns a list of lists with the given number of items. If you provide a second parameter this is used to fill up missing items.
capitalize
Capitalize a value. The first character will be uppercase, all others lowercase.
center
Centers the value in a field of a given width.
combine
{{ {'a':1, 'b':2} | combine({'b':3}) }}
The resulting hash would be: {'a':1, 'b': 3}
Parameters:
recursive
:
False
: Only the top level keys are merged (default)
True
: Recursively merge dictionaries including nested dictionaries
list_merge
:
replace
: Replace lists with the new value by overwriting (default)
append
: Append the new value to the older one
append_rp
: Append newer values to the older one, but overwrite duplicates
keep
: Keep the older value, discard the new value
prepend
: Add new values in front of the older one
prepend_rp
: Add newer values in front of the older one, but discard duplicates
Other examples:
{{ {'a':1, 'b': {'c':2} } | combine({'b': {'d': 3} }, recursive=False) }}
The resulting hash would be: {'a': 1, 'b': {'d':3}}
{{ {'a':1, 'b':2} | combine({'b':3} list_merge='keep') }}
The resulting hash would be: {'a':1, 'b':2}
convert_from_epoch
Convert an epoch timestamp to a datetime object
convert_from_epoch(1549892280)
datetime.datetime(2019, 2, 11, 13, 38)
count
Return the number of items in a container.
csv
Dump a list of rows (as dicts, or lists) to CSV format
fieldnames
: Controls which keys in each dict to include in CSV output. If rows are expressed as lists of strings instead of dicts, fieldnames will be emitted as the first row (i.e. column headers).
writeheader
: Whether to write the fieldnames as the first row in the CSV file
delimiter
: Delimiter separating values in the CSV file
quotechar
: Character used to enclose values in the CSV file
escapechar
: Character used to escape embedded quotechars within values
doublequote
: If True, two consecutive quotes are interpreted as one
skipinitialspace
: Whether to ignore whitespace immediately following delimiters, or to treat them as part of the value
lineterminator
: The character sequence which terminates rows
quoting
: Controls when quotes should be generated
d
If the value is undefined it will return the passed default value, otherwise the value of the variable.
This will output the value of my_variable if the variable was defined, otherwise 'my_variable is not defined'. If you want to use default with variables that evaluate to false you have to set the second parameter to true.
versionchanged:: 2.11
It's now possible to configure the :class:~jinja2.Environment with :class:~jinja2.ChainableUndefined to make the default filter work on nested elements and attributes that may contain undefined values in the chain without getting an :exc:~jinja2.UndefinedError.
datedelta
Add or subtract a number of years, months, weeks, or days from a datetime
value
: The inputted datetime object. If a string is passed, it will be parsed into a datetime
years
: Number of years to add or subtract from the datetime
months
: Number of months to add or subtract from the datetime
weeks
: Number of weeks to add or subtract from the datetime
days
: Number of days to add or subtract from the datetime
hours
: Number of hours to add or subtract from the datetime
minutes
: Number of minutes to add or subtract from the datetime
seconds
: Number of seconds to add or subtract from the datetime
microseconds
: Number of microseconds to add or subtract from the datetime
day
: The day of the month to set the datetime to. If the day is not valid for the month, the last day of the month is used.
weekday
: The day of the week to return. The value can be an integer (0-6) or a string (e.g. 'monday', 'tuesday', etc.) If the input string is not all lowercase, it will be converted to lowercase. When used in conjuctgin with the day parameter, the day parameter will be used to determine the week of the month. For example, if day=1 and weekday='monday', the first monday of the month will be returned. The math logic is a bit odd and can be reviewed in the tests. All 1st days of the week are in the 1-7 range, 2nd days of the week are in the 8-14 range, 3rd days of the week are in the 15-21 range, 4th days of the week are in the 22-28 range, 5th days of the week are in the 29-31 range. See doctests for more examples.
datedelta('2020-01-01', days=1)
datetime.datetime(2020, 1, 2, 0, 0)
default
If the value is undefined it will return the passed default value, otherwise the value of the variable.
This will output the value of my_variable if the variable was defined, otherwise 'my_variable is not defined'. If you want to use default with variables that evaluate to false you have to set the second parameter to true.
versionchanged:: 2.11
It's now possible to configure the :class:~jinja2.Environment with :class:~jinja2.ChainableUndefined to make the default filter work on nested elements and attributes that may contain undefined values in the chain without getting an :exc:~jinja2.UndefinedError.
dict
This filter transforms lists into dictionaries.
dictsort
Sort a dict and yield (key, value) pairs. Python dicts may not be in the order you want to display them in, so sort them first.
dirname
To get the directory from a path.
e
Replace the characters &, <, >, ', and " in the string with HTML-safe sequences. Use this if you need to display text that might contain such characters in HTML.
If the object has an html method, it is called and the return value is assumed to already be safe for HTML.
s
: An object to be converted to a string and escaped. :return: A :class:Markup string with the escaped text.
enumerate
An async iterator of running count and element in an (async) iterable The count begins at start for the first element of iterable, and is incremented by 1 for each further element. The iterable may be a regular or async iterable.
escape
Replace the characters &, <, >, ', and " in the string with HTML-safe sequences. Use this if you need to display text that might contain such characters in HTML.
If the object has an html method, it is called and the return value is assumed to already be safe for HTML.
s
: An object to be converted to a string and escaped. :return: A :class:Markup string with the escaped text.
filesizeformat
Format the value like a 'human-readable' file size (i.e. 13 kB, 4.1 MB, 102 Bytes, etc). Per default decimal prefixes are used (Mega, Giga, etc.), if the second parameter is set to True the binary prefixes are used (Mebi, Gibi).
first
Return the first item of a sequence.
flatten
Flatten a list of lists.
lst
: The inputted list to flatten. If the input is not a list, it will raise an error.
float
Convert the value into a floating point number. If the conversion doesn't work it will return 0.0. You can override this default using the first parameter.
forceescape
Enforce HTML escaping. This will probably double escape variables.
format
format_datetime
Return a string representation of a datetime in a particular format.
output_format
: The strftime datetime format specification to output datetime string in.
from_json_string
Deserialize from a JSON-serialized string
from_yaml_string
Deserialize from a YAML-serialized string
groupby
Group a sequence of objects by an attribute using Python's :func:itertools.groupby. The attribute can use dot notation for nested access, like "address.city". Unlike Python's groupby, the values are sorted first so only one group is returned for each unique value.
For example, a list of User objects with a city attribute can be rendered in groups. In this example, grouper refers to the city value of the group.
groupby yields namedtuples of (grouper, list), which can be used instead of the tuple unpacking above. grouper is the value of the attribute, and list is the items with that value.
You can specify a default value to use if an object in the list does not have the given attribute.
Like the :func:~jinja-filters.sort filter, sorting and grouping is case-insensitive by default. The key for each group will have the case of the first item in that group of values. For example, if a list of users has cities ["CA", "NY", "ca"], the "CA" group will have two values. This can be disabled by passing case_sensitive=True.
versionchanged:: 3.1
Added the case_sensitive parameter. Sorting and grouping is case-insensitive by default, matching other filters that do comparisons.
versionchanged:: 3.0
Added the default parameter.
versionchanged:: 2.6
The attribute supports dot notation for nested access.
hmac
Return the bytes digest of the HMAC.
Usage:
or
returns
algorithm
: one of the following supported hashing algorithms.
md5
sha1
shake_128
blake2s
sha3_256
sha512
sha3_512
shake_256
sha256
sha3_224
blake2b
sha224
sha384
sha3_384
key
: The shared secret used to calculate the HMAC digest and authenticate the message. The security and strength of the HMAC depend on the secrecy and complexity of the key.
hex
Returns hex representations of bytes objects and UTF-8 strings.
Usage:
{{ 'my_msg' | hex }}
returns
6d795f6d7367
indent
Return a copy of the string with each line indented by 4 spaces. The first line and blank lines are not indented by default.
width
: Number of spaces, or a string, to indent by.
first
: Don't skip indenting the first line.
blank
: Don't skip indenting empty lines.
versionchanged:: 3.0
width can be a string.
versionchanged:: 2.10
Blank lines are not indented by default.
int
Convert the value into an integer. If the conversion doesn't work it will return 0. You can override this default using the first parameter. You can also override the default base (10) in the second parameter, which handles input with prefixes such as 0b, 0o and 0x for bases 2, 8 and 16 respectively. The base is ignored for decimal numbers and non-string values.
is_json
Determines whether or not a string can be converted to a JSON object.
is_type
Checks the type of the object the filter is being applied to, parameter supplied is for the type to check for.
This returns a boolean value.
Example: {{ {}|is_type("dict") }}
Available options are:
str
string
int
integer
float
number
list
dict
dictionary
set
tuple
bool
boolean
items
Return an iterator over the (key, value) items of a mapping.
join
Return a string which is the concatenation of the strings in the sequence. The separator between elements is an empty string per default, you can define it with the optional parameter.
It is also possible to join certain attributes of an object.
versionadded:: 2.6
The attribute parameter was added.
json
Parse a JSON-serialized string
json_dump
Serialize value to JSON
json_escape
Add escape sequences to problematic characters in the string
This filter simply passes the value to json.dumps
as a convenient way of escaping characters in it, then strips the enclosing double-quotes.
json_parse
Deserialize from a JSON-serialized string
json_stringify
Serialize value to JSON
jsonpath_query
last
Return the last item of a sequence. Note: Does not work with generators. You may want to explicitly convert it to a list.
length
Return the number of items in a container.
list
Create a :py:class:list from an (async) iterable. This is equivalent to [element async for element in iterable].
load_datetime
Parse a datetime string with a known format specification.
date_format
: The strftime datetime format specification to use in parsing. If not specified, datetime string is assumed to be in Python-flavored ISO8601 format.
lower
Convert a value to lowercase.
map
Applies a filter on a sequence of objects or looks up an attribute. This is useful when dealing with lists of objects but you are really only interested in a certain value of it.
The basic usage is mapping on an attribute. Imagine you have a list of users but you are only interested in a list of usernames:
You can specify a default value to use if an object in the list does not have the given attribute.
Alternatively you can let it invoke a filter by passing the name of the filter and the arguments afterwards. A good example would be applying a text conversion filter on a sequence:
Similar to a generator comprehension such as:
versionchanged:: 2.11.0
added the default parameter.
versionadded:: 2.7
max
Return the largest item from an (async) iterable or from two or more values :raises ValueError: if iterable is empty and default is not set The key argument specifies a one-argument ordering function like that used for :py:meth:list.sort. It may be a regular or async callable and defaults to the identity function. The default argument specifies an object to return if the provided iterable is empty. If the iterable is empty and default is not provided, a :py:exc:ValueError is raised.
min
Return the smallest item from an (async) iterable or from two or more values :raises ValueError: if iterable is empty and default is not set The key argument specifies a one-argument ordering function like that used for :py:meth:list.sort. It may be a regular or async callable and defaults to the identity function. The default argument specifies an object to return if the provided iterable is empty. If the iterable is empty and default is not provided, a :py:exc:ValueError is raised.
parse_csv
Parse a CSV string into a list of dicts, with column headers as keys
A list of list of strings (i.e. a collection of rows, each row containing column values) may be passed instead of a CSV.
fieldnames
: Names of each column to be used as keys in each row dict. If the first row of the CSV file is not the header, this parameter may be used to specify column names.
restkey
: If a row is missing values for columns, the list of missing column names will be placed under this key in the row dict.
restval
: If a row has more values than declared columns, the extra values will be placed under this key in the row dict.
delimiter
: Delimiter separating values in the CSV file
quotechar
: Character used to enclose values in the CSV file
escapechar
: Character used to escape embedded quotechars within values
doublequote
: If True, two consecutive quotes are interpreted as one
skipinitialspace
: Whether to ignore whitespace immediately following delimiters, or to treat them as part of the value
lineterminator
: The character sequence which terminates rows
parse_datetime
Parse a datetime string without knowing its format specification.
This method of parsing is more lenient than load_datetime
dayfirst
: Whether to interpret the first value in an ambiguous 3-integer date (e.g. 01/05/09) as the day (True) or month (False). If yearfirst is set to True, this distinguishes between YDM and YMD. If set to None, this value is retrieved from the current :class:parserinfo object (which itself defaults to False).
yearfirst
: Whether to interpret the first value in an ambiguous 3-integer date (e.g. 01/05/09) as the year. If True, the first number is taken to be the year, otherwise the last number is taken to be the year. If this is set to None, the value is retrieved from the current :class:parserinfo object (which itself defaults to False).
fuzzy
: Whether to allow fuzzy parsing, allowing for string like "Today is January 1, 2047 at 8:21:00AM".
ignoretz
: If set True, time zones in parsed strings are ignored and a naive :class:datetime object is returned.
pprint
Pretty print a variable. Useful for debugging.
random
Return a random item from the sequence.
reduce
Reduce an (async) iterable by cumulative application of an (async) function. :raises TypeError: if iterable is empty and initial is not given Applies the function from the beginning of iterable, as if executing await function(current, anext(iterable)) until iterable is exhausted. Note that the output of function should be valid as its first input. The optional initial is prepended to all items of iterable when applying function. If the combination of initial and iterable contains exactly one item, it is returned without calling function.
regex_findall
To occurrences of regex matches in a string, use the regex_findall filter.
regex_match
This function is used to determine if a string matches a particular pattern. It takes three parameters:
* value
: This is the string to be matched.
* pattern
: This is the regular expression pattern to match against.
* ignorecase
: This is a boolean value to decide whether to ignore the case of the characters while matching.
It first checks whether value
is a string or not. If it's not, it converts value
to a string. Then it uses the _get_regex_flags
function (which is not defined in the provided code) to set the regular expression flags based on the ignorecase
parameter. The function re.match()
is then used to check if the pattern matches the beginning of the value
. The result is converted to a boolean and returned.
regex_replace
To replace text in a string with regex, use the regex_replace filter.
regex_search
To search in a string with a regular expression and detect matches within a string, use the regex_search filter. It will return a boolean (true/false) if the defined regex exists within the string.
regex_substring
This function is used to find all the substrings in a string that match a particular pattern and return the substring at a specific index. It takes four parameters:
* value
: This is the string to be searched.
* pattern
: This is the regular expression pattern to match against.
* result_index
: This is the index of the substring to return after all the matches are found.
* ignorecase
: This is a boolean value to decide whether to ignore the case of the characters while matching.
Similar to the regex_match
function, it checks whether value
is a string or not. If it's not, it converts value
to a string. Then it uses the _get_regex_flags
function to set the regular expression flags based on the ignorecase
parameter. The function re.findall()
is then used to find all the substrings in value
that match the pattern
. The substring at the result_index
position is then returned. Note that if result_index
is out of range (larger than the number of matches), the function will throw an IndexError
.
reject
Filters a sequence of objects by applying a test to each object, and rejecting the objects with the test succeeding.
If no test is specified, each object will be evaluated as a boolean.
versionadded:: 2.7
rejectattr
Filters a sequence of objects by applying a test to the specified attribute of each object, and rejecting the objects with the test succeeding.
If no test is specified, the attribute's value will be evaluated as a boolean.
Similar to a generator comprehension such as:
versionadded:: 2.7
replace
Return a copy of the value with all occurrences of a substring replaced with a new one. The first argument is the substring that should be replaced, the second is the replacement string. If the optional third argument count is given, only the first count occurrences are replaced.
reverse
Reverse the object or return an iterator that iterates over it the other way round.
round
Round the number to a given precision. The first parameter specifies the precision (default is 0), the second the rounding method:
* 'common'
rounds either up or down
* 'ceil'
always rounds up
* 'floor'
always rounds down
If you don't specify a method 'common'
is used.
Note that even if rounded to 0 precision, a float is returned. If you need a real integer, pipe it through int
.
safe
Mark the value as safe which means that in an environment with automatic escaping enabled this variable will not be escaped.
select
Filters a sequence of objects by applying a test to each object, and only selecting the objects with the test succeeding.
If no test is specified, each object will be evaluated as a boolean.
Similar to a generator comprehension such as:
versionadded:: 2.7
selectattr
Filters a sequence of objects by applying a test to the specified attribute of each object, and only selecting the objects with the test succeeding.
If no test is specified, the attribute's value will be evaluated as a boolean.
Similar to a generator comprehension such as:
versionadded:: 2.7
set
Create a :py:class:set from an (async) iterable This is equivalent to {element async for element in iterable}.
slice
Slice an iterator and return a list of lists containing those items. Useful if you want to create a div containing three ul tags that represent columns: .. sourcecode:: html+jinja If you pass it a second argument it's used to fill missing values on the last iteration.
sort
Sort an iterable using Python's :func:sorted.:param reverse: Sort descending instead of ascending. :param case_sensitive: When sorting strings, sort upper and lower case separately. :param attribute: When sorting objects or dicts, an attribute or key to sort by. Can use dot notation like "address.city". Can be a list of attributes like "age,name". The sort is stable, it does not change the relative order of elements that compare equal. This makes it is possible to chain sorts on different attributes and ordering. <div data-gb-custom-block data-tag="for" data-0=')
string
Convert an object to a string if it isn't already. This preserves a :class:Markup string rather than converting it back to a basic string, so it will still be marked as safe and won't be escaped again.
value = escape("<User 1>") value Markup('<User 1>') escape(str(value)) Markup('<User 1>') escape(soft_str(value)) Markup('<User 1>')
striptags
Strip SGML/XML tags and replace adjacent whitespace by one space.
sum
Returns the sum of a sequence of numbers plus the value of parameter 'start' (which defaults to 0). When the sequence is empty it returns start. It is also possible to sum up only certain attributes: .. versionchanged:: 2.6 The attribute parameter was added to allow summing up over attributes. Also the start parameter was moved on to the right.
time_delta
Add a duration of time to a datetime Use negative values to subtract durations of time instead.
title
Return a titlecased version of the value. I.e. words will start with uppercase letters, all remaining characters are lowercase.
to_ascii
Transliterate a Unicode object into an ASCII string errors specifies what to do with characters that have not been found in replacement tables. The default is 'ignore' which ignores the character. 'strict' raises an UnidecodeError. 'replace' substitutes the character with replace_str (default is '?'). 'preserve' keeps the original character. Note that if 'preserve' is used the returned string might not be ASCII!
to_human_time_from_seconds
Given a time value in seconds, this function returns a fuzzy version like 3m5s. :param seconds: Time specified in seconds. :type seconds: int or long or float :rtype: str
to_json_string
Serialize value to JSON
to_yaml_string
Serialize to YAML :param indent: Number of spaces to use for indentation :param sort_keys: Whether to sort mapping keys, or leave as-is
tojson
Serialize an object to a string of JSON, and mark it safe to render in HTML. This filter is only for use in HTML documents.
The returned string is safe to render in HTML documents and <script>
tags. The exception is in HTML attributes that are double-quoted. Use single quotes.
trim
Strip leading and trailing characters, by default whitespace.
truncate
Return a truncated copy of the string. The length is specified with the first parameter which defaults to 255. If the second parameter is true the filter will cut the text at length. Otherwise it will discard the last word. If the text was in fact truncated it will append an ellipsis sign ("..."). If you want a different ellipsis sign than "..." you can specify it using the third parameter. Strings that only exceed the length by the tolerance margin given in the fourth parameter will not be truncated. The default leeway on newer Jinja versions is 5 and was 0 before but can be reconfigured globally.
tuple
Create a :py:class:tuple from an (async) iterable
unidecode
Transliterate a Unicode object into an ASCII string errors specifies what to do with characters that have not been found in replacement tables. The default is 'ignore' which ignores the character. 'strict' raises an UnidecodeError. 'replace' substitutes the character with replace_str (default is '?'). 'preserve' keeps the original character. Note that if 'preserve' is used the returned string might not be ASCII!
unique
Returns a list of unique items from the given iterable. The unique items are yielded in the same order as their first occurrence in the iterable passed to the filter. :param case_sensitive: Treat upper and lower case strings as distinct. :param attribute: Filter objects with unique values for this attribute.
upper
Convert a value to uppercase.
urlencode
Quote data for use in a URL path or query using UTF-8. Basic wrapper around :func:urllib.parse.quote when given a string, or :func:urllib.parse.urlencode for a dict or iterable. :param value: Data to quote. A string will be quoted directly. A dict or iterable of (key, value) pairs will be joined as a query string. When given a string, "/" is not quoted. HTTP servers treat "/" and "%2F" equivalently in paths.
urlize
Convert URLs in text into clickable links.
This may not recognize links in some situations. Usually, a more comprehensive formatter, such as a Markdown library, is a better choice.
Works on http://
, https://
, www.
, mailto:
, and email addresses. Links with trailing punctuation (periods, commas, closing parentheses) and leading punctuation (opening parentheses) are recognized excluding the punctuation. Email addresses that include header fields are not recognized (for example, mailto:address@example.com?cc=copy@example.com).
:param value: Original text containing URLs to link. :param trim_url_limit: Shorten displayed URL values to this length. :param nofollow: Add the rel=nofollow attribute to links. :param target: Add the target attribute to links. :param rel: Add the rel attribute to links. :param extra_schemes: Recognize URLs that start with these schemes in addition to the default behavior. Defaults to env.policies["urlize.extra_schemes"], which defaults to no extra schemes.
.. versionchanged:: 3.0 The extra_schemes parameter was added.
.. versionchanged:: 3.0 Generate https://
links for URLs without a scheme.
.. versionchanged:: 3.0 The parsing rules were updated. Recognize email addresses with or without the mailto: scheme. Validate IP addresses. Ignore parentheses and brackets in more cases.
.. versionchanged:: 2.8 The target parameter was added.
use_none
Convert a None value to a magic string preserving the None value when passed to actions
version_bump_major
This function increments the major version component of a version number (value
) following semantic versioning rules. It returns the updated version number.
version_bump_minor
This function increments the minor version component of a version number (value
) following semantic versioning rules. It returns the updated version number.
version_bump_patch
This function increments the patch version component of a version number (value
) following semantic versioning rules. It returns the updated version number.
version_compare
This function compares two version numbers (value
and pattern
) using the semantic versioning rules provided by the semver library. It returns an integer value indicating the result of the comparison:
* Returns 0 if value
and pattern
are equal.
* Returns 1 if value
is greater than pattern
.
* Returns -1 if value
is less than pattern
.
version_equal
This function compares two version numbers (value
and pattern
) and returns a boolean value
indicating whether value is equal to pattern. It uses the version_compare
function internally and checks if the comparison result is 0.
version_less_than
This function compares two version numbers (value
and pattern
) and returns a boolean value
indicating whether value is less than pattern. It uses the version_compare
function internally and checks if the comparison result is -1.
version_match
This function checks if a version number (value
) matches a version range (pattern
) using the semantic versioning rules provided by the semver
library. It returns a boolean value indicating whether the version number matches the range.
version_more_than
This function compares two version numbers (value
and pattern
) and returns a boolean value
indicating whether value is greater than pattern
. It uses the version_compare
function internally and checks if the comparison result is 1.
version_strip_patch
This function removes the patch version component from a version number (value
). It returns a string representing the version number without the patch component.
wordcount
Count the words in that string.
wordwrap
Wrap a string to the given width. Existing newlines are treated as paragraphs to be wrapped separately. :param s: Original text to wrap. :param width: Maximum length of wrapped lines. :param break_long_words: If a word is longer than width, break it across lines. :param break_on_hyphens: If a word contains hyphens, it may be split across lines. :param wrapstring: String to join each wrapped line. Defaults to :attr:Environment.newline_sequence. .. versionchanged:: 2.11 Existing newlines are treated as paragraphs wrapped separately. .. versionchanged:: 2.11 Added the break_on_hyphens parameter. .. version changed:: 2.7 Added the wrapstring parameter.
wrap_text
Take a text string and wrap it to a specified width. The resulting string will be the original text except with newlines inserted so that no line is wider than the specified width. The default width is 70 characters. Raises: TypeError: If text is not a string TypeError: If width is not an integer wrap_text('Vero aliquam debitis. Reiciendis commodi dol', width=20) 'Vero aliquam\ndebitis. Reiciendis\ncommodi dol'
xmlattr
Create an SGML/XML attribute string based on the items in a dict. All values that are neither none nor undefined are automatically escaped: .. sourcecode:: html+jinja Results in something like this: .. sourcecode:: html As you can see it automatically prepends a space in front of the item if the filter returned something unless the second parameter is false.
yaml_dump
Serialize to YAML :param indent: Number of spaces to use for indentation :param sort_keys: Whether to sort mapping keys, or leave as-is
yaml_parse
Deserialize from a YAML-serialized string
zip
Return a list of tuples where the i-th element comes from the i-th list arg. If a list is exhausted before the others, the value of pad will be used in the tuple.
Variable expressions are encapsulated by double curly braces ({{
and }}
) and will output the value of the variable or expression as they are evaluated.
{{ CTX.my_var }}
These are used for decision-making functions such as set
s, if
statements and for each
es. They are encapsulated by curly+percent signs ({%
%}
)
These statements typically do not output anything.
Comments do nothing. In the Rewst Monaco editor, you can use the hotkey CTRL-/
to comment blocks of code.
{# COMMENT #}
By default, when Jinja begins a statement block, it preserves any whitespace characters (spaces, carriage returns, etc) before or after the block. In many cases, you will want to remove any spaces you did not explicitly intend to have, so the addition of the -
character in the open and closing braces will remove the whitespace before or after the statement, respectively.
Below are some resources, external to Rewst, that can be used to assist during the use of Jinja.
Want more practice?
Creating Comma-Separated Values (CSV) files is a common requirement in various applications. Jinja templating offers a simple and efficient way to generate CSV files dynamically. This article demonstrates how to create a CSV file from data using Jinja templates and how to set headers dynamically, providing a versatile solution for your data processing needs.
To create a CSV file using Jinja, follow these steps:
Prepare Your Data: First, organize your data into a list of dictionaries. Each dictionary represents a row in the CSV, with keys representing column headers and corresponding values.
Generate CSV Headers Dynamically: Use Jinja filters to dynamically set the CSV headers. In the provided example, the fieldnames
parameter is populated with the keys from the first dictionary in the csv_data
list.
Here, csv_data[0].keys() | list
generates a list of keys from the first dictionary in csv_data
, ensuring dynamic header generation.
The above Jinja code will generate a CSV output similar to the following:
Flexibility: Dynamic header generation allows you to adapt your CSV format based on the structure of your data.
Simplicity: Jinja's concise syntax simplifies the process of transforming data into CSV format.
Automation: As your data changes, Jinja can adapt the CSV headers automatically, streamlining your workflow.
Generating CSV files dynamically with Jinja templating is a powerful technique that simplifies the process of handling data. By following the steps outlined in this article, you can create versatile CSV files tailored to your specific data structures. Embrace the flexibility and efficiency of Jinja templating to enhance your data processing capabilities and create well-organized CSV files effortlessly.
In Jinja templating, manipulating strings is a common requirement. This article explores three essential string operations: splitting strings, replacing characters, and combining strings. Understanding these techniques is crucial for developers working with Jinja templates, allowing for efficient data processing and presentation.
The .split()
method in Jinja is employed to divide a string into multiple substrings based on a specified character or a set of characters. By providing a delimiter, you can split the string at occurrences of that character.
In this example, the string "this_is_a_string"
is split at each underscore (_
), resulting in the output: ["this", "is", "a", "string"]
.
The .replace()
method or the | regex_replace()
filter is utilized to replace specific characters in a string with another set of characters.
In both cases, the underscore (_
) in the string "this_is_a_string"
is replaced with a space, resulting in the output: "this is a string"
.
Combining strings in Jinja is achieved similarly to Python. Strings can be concatenated using the +
operator.
In this example, the strings "hello"
and "world"
are concatenated to form the output: "helloworld"
.
Mastering string manipulation techniques in Jinja templating is essential for creating dynamic and well-formatted templates. By understanding how to split strings, replace characters, and concatenate strings, developers can process data effectively, leading to enhanced user experiences and streamlined workflows. Incorporate these techniques into your Jinja templates to optimize your data processing capabilities and improve the readability of your templates.
In the realm of Jinja templating, Try/Catch blocks serve as indispensable tools for handling errors gracefully. This article delves into the concept of Try/Catch blocks in Jinja, explaining their significance and providing practical examples of their usage.
Try/Catch blocks in Jinja function similarly to error-handling mechanisms in other programming languages. They allow developers to anticipate potential errors and handle them in a controlled manner. By encapsulating code within a Try block, developers can monitor for errors and respond appropriately when issues arise.
The Try section contains the code that might throw an error. If an error occurs within this section, the Catch section is activated, providing an opportunity to handle the error gracefully.
In this example, the Try block attempts to display the variable data
. If data
exists, it will be displayed without any issues. However, if data
doesn't exist or encounters an error, the Catch block will execute, displaying the message "data doesn't exist."
Specific Error Handling: Consider specifying the types of errors to catch within the Catch block. This allows for tailored responses to different types of errors.
Informative Error Messages: Craft clear and informative error messages within the Catch block. This aids in debugging and provides valuable insights into the nature of the error.
Graceful Degradation: Use Try/Catch blocks to enable your workflow to fail gracefully. By capturing errors, you can prevent complete failures and provide users with useful information about the problem.
Try/Catch blocks are fundamental constructs in Jinja templating, empowering developers to create robust and fault-tolerant templates. By implementing these blocks effectively, errors can be handled gracefully, ensuring a smoother user experience and facilitating easier debugging. When used judiciously, Try/Catch blocks enhance the reliability and resilience of Jinja templates, making them an essential tool in any developer's toolkit.
Date and time manipulations are a crucial aspect of template engines like Jinja, especially when working with dynamic content and automation. In this article, we will explore various date-time comparisons and operations using Jinja's built-in functions.
Often, you need to display the current date and time in a specific format. Jinja provides the now
filter for this purpose. Here's how you can format the current date and time in UTC:
This will output the current UTC date and time in the format 'YYYY-MM-DDTHH:MM:SSZ'.
Jinja allows you to perform date calculations easily. For example, to get the date and time from two days ago in the same format as above:
This code subtracts two days from the current UTC date and time and formats the result accordingly.
format_datetime
The format_datetime
filter allows you to format a datetime object to a specified string format. In this example, we determine the day of the week for a specific date:
Here, we convert '2022-07-04T11:38:00' to a datetime object and then extract the day of the week as an integer, which is used as an index to fetch the corresponding day name.
Sometimes, you may have a date in string format and need to convert it into a datetime object. The load_datetime
filter serves this purpose. Here's an example of loading a date from the format '06-09-2022':
This code converts the string '06-09-2022' to a datetime object.
time_delta
Jinja provides the time_delta
filter to add or subtract units from a datetime object. In this case, we subtract 30 days from a loaded datetime object and format the result:
The code first converts '06-09-2022' to a datetime object, then subtracts 30 days, and finally formats the result in the 'Month Day, Year' format.
In Jinja, block scope refers to the scope in which a variable exists and is accessible. This guide will explain how block scope works in Jinja and provide examples to illustrate its behavior.
Block scope in Jinja is best understood by looking at an example. Consider the following code snippet:
In many programming languages, you might expect the result to be 9, but in Jinja, the output will be 0. This is because, in Jinja, anything defined within a for
loop stays within that loop. When you use the {% set %}
feature within a loop, you're actually creating a new variable with the same name, and this variable is destroyed when the loop ends.
There is an exception to this block scope rule, which is when you are appending to a list that already exists. This works because you are modifying the actual variable that was created before the loop is called, rather than creating a new variable with the same name within the loop. Here's an example:
In this case, the code will result in a list containing the numbers 1 to 9.
To maintain a persistent scope in Jinja and have variables that persist across multiple blocks or loops, you can create a namespace. Think of this namespace as a data structure that holds your variables. Here's an example:
In this code, we create a namespace named var
with an initial value of 0. Inside the loop, we can access and modify var.value
, and the changes persist outside the loop. This code will result in the expected value of 9.
Understanding block scope in Jinja is crucial for effectively working with variables within templates. Remember that variables defined within a block, such as a for
loop, are limited to that block's scope. To maintain persistent scope or modify variables across blocks, consider using namespaces as demonstrated in this documentation.
Jinja doesn't offer traditional switch statements like some other programming languages. However, fear not! You can achieve similar functionality using dictionary switches. This article will guide you through the concept of dictionary switches in Jinja and how they can be used effectively.
A dictionary switch in Jinja is a clever way to mimic the functionality of a switch statement using dictionaries. Essentially, you create a dictionary where the keys represent different cases, and the values are the actions or values associated with those cases. Let's explore how to create and use dictionary switches in Jinja.
In its simplest form, a dictionary switch can be used to map a key to a specific value or action. Here's an example:
In this code, we define a dictionary mydict
where each key corresponds to a case, and the associated value represents the desired outcome. When we set var1
to "datto" and access mydict[var1]
, it returns the value associated with "datto," which is "datto_psa."
You can also leverage dictionary switches when working with macros. Macros are reusable code snippets in Jinja, and you can dynamically select which macro to execute based on a key. Here's an example:
In this code, we create a macro split_str
that splits a string at underscores and returns the first part. The dictionary switch mydict
assigns different macros to each case. When we set var1
to "datto" and access mydict[var1]
, it executes the split_str
macro with the parameter "datto_psa" and returns "datto."
What if you want to pass dynamic parameters to the selected macro? You can achieve this by storing the macros as values in the dictionary. Here's an example:
In this code, we create two macros, split_str
and rep_str
, each of which takes additional parameters for flexibility. We then store these macros in the mydict
dictionary, allowing us to select and execute the desired macro dynamically. This approach enables you to perform operations on strings with different parameters.
While Jinja may not have built-in switch statements, dictionary switches offer a versatile and efficient alternative. You can map keys to values, select macros dynamically, and pass parameters to achieve the desired functionality. Incorporating dictionary switches into your Jinja templates empowers you to handle complex logic and create more adaptable and reusable code.
Dictionary unpacking is a powerful technique in Jinja templating that enables the merging of dictionaries seamlessly. This article explores the concept of dictionary unpacking, providing clear explanations and practical examples to help users harness this feature effectively.
Dictionary unpacking involves combining the contents of two dictionaries into a new dictionary. The **
syntax is used while looping through dictionaries, allowing all the items within the dictionaries to be extracted and added to a new dictionary effortlessly.
In scenarios where you want to merge dictionaries based on a specific attribute, the following code demonstrates how to achieve this:
In this example, the dictionaries dict1
and dict2
are merged based on the matching "name"
attribute, resulting in a new merged dictionary.
If you simply want to stack dictionaries one on top of the other without merging them, you can use the +
operator:
In this case, the dictionaries dict1
and dict2
are stacked on top of each other, preserving their individual structures.
For a straightforward merging of dictionaries without any conditional logic, the following code demonstrates how to achieve a direct merge:
Here, zip()
is used to pair corresponding elements from dict1
and dict2
, and the **
syntax ensures a seamless merge of dictionaries, resulting in a new merged dictionary.
Understanding and implementing dictionary unpacking in Jinja templates empowers developers to manipulate data structures efficiently. Whether you need to merge dictionaries based on specific attributes or stack them together seamlessly, mastering dictionary unpacking techniques enhances the flexibility and readability of your templates. Incorporate these practices into your Jinja templates to streamline your data processing workflows and create dynamic and adaptable templates effortlessly.
Loops are the backbone of dynamic content generation in Jinja templating. They enable you to perform repetitive tasks, iterating through lists or dictionaries, and executing a set of instructions multiple times. This article dives into the world of loops in Jinja, exploring both traditional for loops and the concise, powerful list comprehension method. By understanding these techniques, developers can significantly enhance their templating efficiency and readability.
In a traditional for loop, you iterate through a sequence of values and execute specific instructions. Here’s an example of populating a list from 0 to 8 using a for loop:
In this snippet, the loop iterates through numbers from 0 to 8, appending each value to the mylist
variable, which is then displayed.
List comprehension provides a more concise way to loop through elements and construct lists. It condenses the for loop into a single line, making your code more readable. Here’s how the same task is accomplished using list comprehension:
This one-liner creates a list containing numbers from 0 to 8, simplifying the process and enhancing code readability.
List comprehension can also be used for appending values directly to a list, eliminating the need for separate append statements. Here’s an example of appending a list using list comprehension:
In this code, list comprehension constructs the list directly within the append()
statement, making the process more compact and efficient.
Mastering loops in Jinja templating is essential for creating dynamic and responsive templates. By understanding both traditional for loops and the elegant list comprehension method, developers can choose the technique that best suits their needs. Whether you opt for the classic readability of traditional loops or the concise power of list comprehension, implementing these methods will significantly enhance your templating efficiency and code maintainability. Incorporate these techniques into your Jinja templates to streamline your development workflow and create dynamic, data-driven applications with ease.
Based on the , this filter allows hashes to be merged. For example, the following would override keys in one hash:
Apply the given values to a printf-style_ format string, like string % values. In most cases, it should be more convenient and efficient to use the % operator or :meth:str.format. _printf-style:
Extracts data from an object value using a JSONPath query.
Rewst uses the , aka "Jinja" templating language in text fields to enable more powerful processing of the data that exists in a workflow. Jinja is based on Python and shares much of its syntax and styling, but the key difference is that expressions are encapsulated to separate themselves from plain text in these fields.
The Jinja language is meant to be extensible, and within Rewst there are many that extend functionality, including an ever-growing list that Rewst adds to the platform. This means that if you search the web for help with Jinja, the answers you find may or may not be 100% applicable to the Rewst environment. When in doubt, you can always ask the ROC for assistance!
Want to learn more? Search for Jinja in to find related courses.
When working with date formats, it's essential to be familiar with the format codes. For reference, you can visit the website, which provides a comprehensive list of format codes for various date and time components.
Quite often, you will be in a situation where you have two lists and want to combine them, ensuring that the data matches between the two lists.
For example, if you pull a list of users and then want to add a list of groups that the user belongs to, which is not a part of the initial list.
There are a couple of ways to achieve this, both are outlined below
We have a data alias called CTX.m365_users
with a bunch of relevant information, we want to pull.
We then use a "With Items" action to loop through each of those users, getting a list of the groups they are a part of.
CTX.all_group_info_collected
This then gives us a list of users, with the group they are a part of - in the same output order that we put into the action
CTX.all_groups_info
This will then give us two lists - a list of users with general information, then a list of each user and the groups they are a part of.
In our example above, this is the first entry in each list. You can see the IDs match.
We now want to combine these lists. So we create a new alias, let's call it CTX.final_user_information
Using the ZIP method, along with our own custom comprehension, we take each entry in the list and combine them together in the same index that they exist. This means that index [0] in CTX.m365_users, combines with index [0] in CTX.all_groups_info
The end result?
We can see the lists have combined and we now have access to all that information in a single list.
Using the ZIP function is probably the most effective way to do this, however, the alternative is the enumerate function
In this example, we have two lists again - CTX.users
and CTX.query_results
. The first is a list of users from M365, the second is a list of results - again using a With Items, on each of those users.
We then want to combine those two lists, so we format the users with the relevant data we want such as mail, displayName, etc.
We then want the results in a key called breaches
. We then use enumerate
it to ensure that index[0] matches index[0] in both lists.
Because of the way our works, we have a data alias
Lists or Arrays are very common when working with sets of data in Rewst.
Any time you see information encapsulated in [
]
brackets, you are looking at a list, and working with the items in that list requires certain considerations. Working with these lists is referred to as "List Comprehension."
Splitting strings into lists
Indexing lists
Lists are indexed starting at zero:
{{ CTX.users[0] }}
(First element of list)
{{ CTX.users[-1] }}
(Last element of list)
Get the first (or last) elements:
Joining list results for output:
far, far away
Using the above example data, there are multiple ways to work with the members of this list. The method you choose will likely depend on more complex situations where one style more sense to use over another.
Method 1:
Method 2:
Method 3:
Method 1:
Method 2:
Jinja expressions can span multiple lines to improve readability
Sometimes you may wish to do something if a single item exists in two different lists:
If you need a single list, you can do the following:
This document is intended to provide an overview of Jinja's reserved keywords Rewst users will encounter while building their own automations, and addresses a common TypeError issue that users face when conflicts occur.
if
, elif
, else
: Conditional statements
for
: Looping through sequences
while
: Loop based on a condition
try
, except
, finally
: Exception handling
with
: Context management
True
, False
: Boolean values
None
: Represents null value
del
: Deletes a variable
def
: Function definition
return
: Returns a value from a function
yield
: Produces a generator
lambda
: Anonymous function
class
: Defines a class
and
, or
, not
: Logical operators
in
, is
: Comparison operators
raise
: Raise an exception
assert
: Assertion statement
break
, continue
: Loop control
pass
: Null operation
global
, nonlocal
: Scope specifiers
split
: Splits a string into a list
items
: Returns a list of dictionary's key-value tuple pairs
replace
: Replaces a string with another string
get
: Retrieves the value of a dictionary key
result
, results
: Used in Rewst to store outputs. Note that these are not built-in methods, they're used in Rewst as variable named to store outputs and should not cause issues.
import
: Importing modules
from
: Specifies what attributes to import from a module
JSON cannot serialize 'builtin_function_or_method': <built-in method items of dict object at 0x7f618cb407c0>
Ensure that you're not inadvertently referencing a built-in method like items
as an object when you actually intend to use its output. Execute the method first before attempting to serialize it to JSON.
If the output of an API call stores all the items in a key named items
, reference it like this:
This ensures that you're referencing the actual data rather than the built-in items
method, thus avoiding the serialization issue.
Always prefix your own variables and function names to avoid collision with these reserved words.
Use these words in the appropriate context to ensure readability and maintainability.
Understanding these protected words in Jinja is critical for effective template development. Familiarize yourself with these terms to write better, error-free code.
Capturing all the input variables dynamically from a workflow can be challenging, particularly when these variables are created dynamically, like through a form submission, a parent workflow or other triggering event. The method illustrated below can be used to capture all inputs in a structured manner, which could then be sent to other systems, logged, or used for debugging.
To capture all input variables dynamically in a workflow using a No-Op task's transition and store them in a dictionary, then output
Code Snippet
Add the following code as a data alias in the initial No-Op task's transition in the workflow.
Explanation
List All Context Keys: The CTX()
function is called, and its keys are converted to a list.
Exclude Unwanted Keys: You can exclude the keys that are specific to the executing workflow, and don't need to be included in the final dictionary as defined.
Initialize Dictionary: A dictionary named workflow_inputs
is initialized to hold the filtered context variables. For clarity, this should be whatever you named your Data Alias where you're adding this Jinja.
Iterate and Populate Dictionary: Loop through each context key, check if it's not in excluded keys
, and update workflow_inputs
with the key-value pair.
Output Dictionary: The dictionary is outputted and stored as however you defined the Data Alias for use in any subsequent tasks.
Overview
If you want to format the dynamic workflow inputs in a human-readable manner before sending them via email or another output method, you can use HTML tags along with Jinja2 templating. This can be useful to add readability to the key-value pairs.
Code Snippet
Extend the existing code that captures workflow input variables dynamically to include pretty formatting for email sending. In this example, we will add the following Jinja in the message of the core_sendmail
task:
Here, the key-value pairs in CTX.form_data
are sorted and formatted using HTML tags:
<b>
makes the key bold.
</br>
adds a line break after each key-value pair.
Explanation
Key-Value Pair Sorting: Jinja's dictsort
filter sorts the dictionary by its keys.
Iterating Through Sorted Dictionary: Iterate over the sorted dictionary, pulling out the key and value.
Pretty Formatting: HTML tags for bold and line break are used for each key-value pair.
Final Output: The entire message is formed by appending these formatted key-value pairs together, which can then be sent as the email body.
JSON Update
The core_sendmail
task's JSON would look like this:
Note
Ensure that the email client you're sending to supports rendering HTML.
Modify the HTML tags according to the email client's supported features for proper formatting.
This extension builds upon your initial code for capturing workflow variables, adding a step to format these variables effectively for email.
Press F1
within the editor to see menu and shortcut options
Press Ctrl + Space
to get the initial root options
Date-Time manipulations in Jinja can be easily achieved using context variables and built-in filters. This section provides examples to perform various date-time operations with JSON objects. Here are various examples demonstrating how to manipulate date-time values using Jinja filters in Rewst.
You can convert epoch time to a datetime object using convert_from_epoch
, then format it using format_datetime
.
Input:
Jinja:
Output:
You can convert datetime time to an epoch object. First, you set it to datetime to work with, then you can format using format_datetime.
Input:
Jinja:
Output:
Convert the date to a weekday number (%w
), which can then be used to fetch the corresponding day name from an array.
Input:
Jinja:
Output:
The time delta
filter allows you to add or subtract time from a datetime variable. Here, minutes=15
adds 15 minutes, and format '%H:%M:%S'
displays only the time as output.
Input:
Jinja:
Output:
The format_datetime
filter leverages format codes to specify the output string's structure. Here is a breakdown of commonly used format codes:
%Y
: 4-digit year (e.g., 2023)
%y
: 2-digit year (e.g., 23)
%m
: Month as a zero-padded decimal (e.g., 09 for September)
%B
: Full month name (e.g., September)
%d
: Day of the month as a zero-padded decimal (e.g., 11)
%A
: Full weekday name (e.g., Monday)
%w
: Weekday as a decimal number, where Sunday is 0 and Saturday is 6
%H
: Hour (24-hour clock) as a zero-padded decimal (e.g., 14)
%I
: Hour (12-hour clock) as a zero-padded decimal (e.g., 02)
%M
: Minute as a zero-padded decimal (e.g., 34)
%S
: Second as a zero-padded decimal (e.g., 56)
%p
: AM or PM
In your Rewst environment, you have access to several custom Jinja2 extensions that enhance the functionality of Jinja templates in Rewst. These extensions provide additional features and capabilities for your templating needs.
Purpose: This extension allows you to work with date and time values directly within your Jinja2 templates.
Usage:
{% now %}
: Inserts the current date and time.
{% now, "%Y-%m-%d" %}
: Inserts the current date and time formatted according to the specified format (e.g., 2023-11-22
).
{% now, False %}
: Inserts the current timestamp.
Example:
Purpose: The Try Catch extension introduces try and catch blocks in your Jinja2 templates, allowing you to handle exceptions gracefully.
Usage:
{% try %}
: Defines a try block where you can place code that may raise exceptions.
{% catch %}
: Optionally defines a catch block to handle exceptions. If no catch block is specified, an empty string is returned in case of an exception.
Example:
Purpose: The UUID extension simplifies the generation of Universally Unique Identifiers (UUIDs
) within your Jinja2 templates.
Usage:
{% uuid4 %}
: Inserts a randomly generated UUID version 4.
Example:
List comprehensions in Rewst's implementation of Jinja provide a compact way to transform lists, filter them, or generate new lists.
{{ [users.userPrincipalName for users in TASKS.task_name.result.result ]}}
Result: This will return all the users property "userPrincipalName"
Result: This will return the userPrincipalName of the user(s) that has a display name of "Test Name"
Result: This will return an object with the specified keys (group_name and group_id) and the specified property. It will only show groups that do not have a "dynamicMembership" property. This means that it will remove all dynamic groups from the list.
Result: This done the same as the above, except it has two conditions - adding that it'll only return groups with a display name of "Testing Group Name"
This section breaks down two practical examples of how to leverage list comprehensions in your Jinja templates: returning a new list of only a specified attribute, and filtering a list by the existence of a specific value within the specified attribute. Check out the details below.
This example demonstrates how to extract the first_name
attribute from each user
object within the CTX.users
list. The list comprehension iterates over CTX.users
and retrieves the first_name
for each entry.
Jinja:
Explanation:
for user in CTX.users
: Iterates over each user
object in the list CTX.users
.
user. First_name
: Retrieves the first_name
attribute of the current user
object.
In this example, the list comprehension filters CTX.users
to return only the objects where the first_name
attribute is "Luke."
Jinja:
Explanation:
for user in CTX.users
: Iterates over each user
object in the list CTX.users
.
if user.first_name == "Luke"
: Applies a filter to only include users with the first name "Luke."
These custom Jinja2 extensions enhance your templating capabilities, enabling you to work with dates, handle exceptions, generate UUIDs and perform List Comprehension seamlessly within your Rewst environment. Whether you need to format dates, gracefully handle exceptions, or generate unique identifiers, or perform comprehensions, these extensions provide the tools you need to streamline your templating tasks.
Access Rewst's Live Editor by navigating to Tools > Live Editor in the left side menu of your Rewst platform.
Switch between the two available languages in the editor by clicking the switch button in the top right of your Editor panel. The name of the language currently in use for the editor will display in blue on the button.
Click Render to display your code's result in the Result pane.
Click Share to create a link to share your context and code in the editor, to be opened by another individual later. This is particularly helpful for sending to coworkers or Rewst support staff.
Press F1
within the editor to see menu and shortcut options
Press Ctrl + Space
to get the initial root options
Streamlining Data Retrieval with Jinja Filters vs. List Comprehension
Explore how to use jsonpath_query
, list comprehension, and the map
filter in Rewst for extracting data from JSON structures. This guide highlights when and why to use each method, with a focus on scenarios best suited for jsonpath_query
and map
.
Extract event names from a JSON list containing detailed event information.
List comprehension is a straightforward Pythonic way to create lists by iterating over sequences.
Example:
Explanation:
This method loops through each event in CTX.events
, extracting the name
from the details
.
List Comprehension Syntax: [expression for item in list]
is standard list comprehension syntax.
Iterating Over the CTX.events
: The for item in CTX.events
part loops through each event in the CTX.events
array.
Extracting the name
: The item.details.name
extracts the name
property from the details
object of each event.
jsonpath_query
jsonpath_query
provides a more direct approach to targeting and extracting nested data.
Example:
Explanation:
This expression directly navigates to and extracts the name
field from each event's details
.
Using the jsonpath_query
Filter: jsonpath_query
is a filter applied to the CTX.events
variable.
Navigating the JSON Path: '$[*].details.name'
is the path expression. $
denotes the root of the JSON structure, [*]
accesses all elements in the events
array, and .details.name
navigates to the name
within each details
object.
map
with an attributeExample:
Explanation:
This example demonstrates using the map
filter in Jinja to extract a specific attribute from each element in a sequence.
Applying the map
Filter: The map
filter is applied to the CTX.events
variable. This Jinja2 filter iterates over each element in the given sequence.
Specifying the Attribute to Extract: The part attribute='details.name'
tells the map
filter to extract the name
attribute from the details
object within each element of CTX.events
.
List Comprehension: Offers control and flexibility, best for simpler structures or specific manipulations.
Filters (jsonpath_query
, map
): Streamline the process with specialized functionality. Choose jsonpath_query
for deep JSON navigation and map
for straightforward, uniform transformations.
All methods output a list of event names:
Integrations are a core part of Rewst. Simply put, an integration is the successful linking of the Rewst platform and a separate tool, to allow the free back and forth flow of information between platform and tool. Integrations are achieved with a variety of setup steps that will differ depending on the type of tool—PSA versus RMM, for example—and brand of tool type.
If Rewst doesn’t have an integration for your particular tool, you have the option to build one custom. Any tool that has an API can be integrated with Rewst via custom integration. We recommend that new Rewst users start with stock integrations, and complete all training in Cluck University before attempting custom integration builds.
Access integrations that are both installed and available for installation in the Rewst platform by navigating to Configuration > Integrations in the left side menu.
Uninstall any installed integration by clicking the ⋮ on its integration tile. You’ll be asked to confirm that you want to Delete the integration in a new dialogue. Click on any installed integration tile to view its configuration page.
Clicking on any of the available integrations under the Installed Integrations section will automatically begin that installation.
Each of our integrations has a separate integration setup and configuration guide, organized by type of integrated tool in this documentation site under the Documentation > Integrations > Individual integration documentation section of the left side documentation menu.
In the Rewst platform, search for any of Rewst’s integrations in the Find Integrations search bar at the top right of the Integrations page.
Click the +New button to reveal two options for how to set up a custom integration:
New Integration
Add OpenAPI Integration
Alternatively, you can kickoff the custom integration setup process by clicking + Add New Integration further down the page in the Get More Integrations section.
Organization mapping is the process of connecting each Rewst integration with your child organizations, enabling automations that leverage that integration to work for your customers. When setting up your integrations, this is frequently the last step.
Organization mapping for Microsoft integrations is slightly different than the process outlined on this page. Refer to the video on mapping and consenting organizations for the Microsoft Cloud bundle.
The general steps to map each organization are as follows.
Navigate to Configuration > Integrations in the Rewst platform.
Select the integration that you want to map.
Scroll down the page to the Organization Mapping submenu. Here you'll see your Organizations listed in a table.
Click Refresh Options to pull customer accounts from your integration.
If the blank text box turns into a dropdown field, the sync was successful.
If accounts are missing:
Check if the customer account exists in your integrated tool.
Adjust any applied filters that might be excluding accounts.
Click Suggest Values. Rewst will try to match organization names automatically.
Review the suggestions to ensure that organizations in Rewst and customer names in the integrated tool are aligned. If a match is missing, manually select the correct organization from the dropdown menu.
Double-check all mappings, especially if you have multiple pages of organizations. By default, only the first 10 organizations will be listed.
Click Save Mappings to finalize the connections.
Templates and scripts are similar features in Rewst, though each is intended for a different purpose. Once created, they're separated by type into two sections in the platform for ease of organization and sorting. Both can be referenced in workflows.
Templates are used to create a standardized set of text used in several places in Rewst. For example, if you want to create a ticket and always use the same HTML for the ticket description, you would create a template. In the input, you would reference the template instead of having to type that same text each time.
To access templates, navigate to Automations > Templates in the left side menu of your Rewst platform.
Write templates in either Markdown or HTML language.
Click + Create.
Fill in the relevant fields with the information for your template.
Name
Description
Tags
Select the language you want to write your template in from the Language drop-down selector.
Click into your Editor panel on the left side of the screen to begin writing. View your progress in the Preview panel.
Scroll down and click Submit when finished.
While templates are written in HTML or Markdown, they can accept small elements of Jinja to set up the use of templates elsewhere in Rewst. Templates allow for context variables to be set within them, which can then be referenced in workflows to allow the eventual sent message to populate with dynamic information.
In the example below, you're sending an e-mail to a new user that has been created.
In the input for the Send Mail
action, you would enter {{ template("<template-id>")}}
into the action's Message field instead of typing out the intended message manually. This would pull your pre-written template into the body of the email when it is sent.
The template ID can be taken from the URL, when editing the template. As an example, let's look at the URL below.
The part of the URL underlined in yellow is the template ID. For this particular ID, your Jinja would read as {{ template("768f5d45-5fe7-4c1f-b2c1-932dcbdcb1d7") }}
.
Scripts in Rewst enable you to write scripts in a straightforward and accessible manner compared to traditional programming languages. Scripting tasks can range from batch processes on a local computer to generating dynamic web pages on a web server. Scripts can be written, edited, and executed more quickly and easily than software programs.
To access scripts, navigate to Automations > Scripts in the left side menu of your Rewst platform.
Write Rewst scripts in any of the following languages: PowerShell, Python, YALM, Jinja.
Click + Create.
Fill in the relevant fields with the information for your script.
Name
Description
Tags
Select the language you want to write your script in from the Language drop-down selector.
Click into your Text panel to begin writing.
Scroll down and click Submit when finished.
PowerShell support is currently in beta, with general availability expected soon. We're gathering customer feedback to improve performance and expand context support. Scroll to the end of this page to view our current known issue list.
Rewst now supports PowerShell as a scripting option, giving you a familiar and flexible alternative to Jinja. PowerShell code can run in workflows, transitions, and data aliases by using secure Azure-hosted Function Apps deployed via Rewst. This means:
You write PowerShell in the same places you’d use Jinja, like the Live Editor or within a workflow.
You start a block with the #ps
header to tell Rewst to run that code using the PowerShell interpreter.
When you use a #ps
block:
Your code is sent to a dedicated Azure Function App tied to your Rewst org.
The app runs the script in an isolated PowerShell environment.
The result is returned to Rewst and used just like Jinja output would be.
Only CTX and RESULT objects are available as context inside PowerShell blocks.
If you already know your way around PowerShell, there’s a good chance that you’ve used it to script against systems like Active Directory, Exchange, Intune, or local machine configurations. Rewst now lets you tap into those skills directly, without needing to learn Jinja first.
Microsoft’s free tier allows for 1 million function executions, plus 400,000 GB-seconds of compute each month. Beyond those free limits, additional executions are billed according to Azure’s pay-as-you-go rates. Typically, these are fractions of a cent per million executions, plus memory usage.
For many Rewst customers who only run occasional PowerShell workflows, the monthly cost is minimal or effectively $0 since this number of executions will fall within the free tier.
Higher-traffic organizations can pay Microsoft anywhere from a few dollars to tens of dollars a month for function usage, depending on volume and script complexity.
When creating an Azure Function App, the app name must be globally unique across all Azure tenants. This name is used not only for the Function App itself, but also for the associated App Service, storage account, and the app’s root URL.
To ensure uniqueness and avoid naming collisions, we use "rewstinterpreters" as the base name and append a UUID.
To start using PowerShell, you’ll need to deploy an Azure Function App interpreter through Rewst. We use a ZIP deployment process for the Function App code.
Make sure that you have successfully set up the Microsoft Cloud integration bundle before attempting these steps.
Navigate to Tools > Interpreters in the left side menu of your Rewst platform.
Click PowerShell (Beta) to expand the accordion menu. The two drop-down fields within the menu will populate with options pulled from your Azure instance, to line up with your subscriptions.
Click down carrot in the Subscription drop-down selector and choose your relevant subscription.
Click down carrot in the Resource Group drop-down selector and choose your relevant resource group.
Click Deploy.
This process may take a few moments. An in-progress message will display while you wait. You can leave the page if desired, without interrupting the deployment.
Once finished, a deployed message will appear at the bottom of the accordion menu, along with a Remove interpreter button. If deployment fails, a red error message will appear in a dialog on your screen.
Rewst creates the following in your Azure environment during deployment of the interpreter:
A PowerShell 7.4-based Function App
A shared consumption App Service Plan
Application insights for logging
A Storage Account for keys and triggers
If you don’t have Azure set up for your organization, you can override the Azure integration with a parent organization's configuration. This lets sub-orgs run PowerShell without duplicating infrastructure.
The Live Editor supports real-time PowerShell testing.
Navigate to Tools > Live Editor.
Click Jinja2 to switch the Live Editor over to PowerShell.
Use #ps
to start a PowerShell block:
Remember, don’t mix PowerShell and Jinja in the same block. You can use both in the same workflow, just not together in one snippet.
powershell CopyEdit #ps "Hello from PowerShell"
PowerShell works in:
Tasks – e.g., for generating dynamic output
Transitions – e.g., to determine conditional logic
Data Aliases – e.g., when transforming or mapping data
Use #ps
exactly as you would #jinja
:
#psl
headerThe interpreter also allows for a #psl
header for line-by-line PowerShell. Currently its use is limited and not the focus of our first version of the PowerShell interpreter. Use #ps
unless you're testing something specific.
Azure Function execution timeout for PowerShell is similar to that of Jinja. Expect 30-60 seconds for actions, and 10 seconds for parameters.
All output from PowerShell is processed as JSON. For best results, use ConvertTo-JSON
when returning data.
JSON Parsing Error: Blocks accessing `$CTX.user` due to an empty property name error during serialization.
Subworkflow Hangs: PowerShell code hangs silently in subworkflows when the parent uses Integration Override, breaking complex structures.
Azure Region Quotas: Users hitting deployment failures in popular regions (like East US) because subscription quotas are `0`. Requires manually selecting other regions.
Process Timeouts: PowerShell scripts time out near completion, causing failed workflow renders. Needs longer timeout limits.
Auth/Refresh Errors: Users get `401` errors (or Python `_'str' object has no attribute 'get'_` errors) when authorizing or refreshing resource groups, blocking setup.
Module Persistence: Modules installed during a run don't persist, forcing users to reinstall them in scripts every time.
UI Syntax Highlighting: Requires double backslashes (`\\`) in the UI editor while actual PS code needs single (`\`), causing confusion.
Serialization Failures: Returning non-JSON serializable objects (e.g., from `New-Item`) causes errors even if the command worked. Requires explicit `ConvertTo-Json`.
Common PS Pitfalls: Users misusing `Write-Host` (doesn't return output), not using `finally` blocks for output, or using incorrect `ConvertTo-Json` pipe syntax.
Live Editor Friction: Users can enter the Live Editor for PowerShell before the required Azure setup is complete, leading to confusion.
Access the Jinja Editor on any fields where you see the code editor icon (fondly called the Jinja Burger amongst other Kewp Members)
Add |
to the end of your variables to access . e.g.: {{ ORG.ATTRIBUTES.id|default('test default string') }}
Context Variables are specific to the currently executing workflow. They include variables like from the , any defined , and results from tasks that have been executed.
Usage: {{ CTX.variable_name }}
Additional Note: Task results can be accessed once the task is complete. If attempted earlier, the variable will be undefined
.
Variables prefixed with ORG
are related to data and functions specific to the Organization the workflow is running for. Below are the options you can call with the ORG prefix
ORG.HAS_TAG
Description: Checks if the Organization associated with the running workflow has a specific tag.
Usage: {{ ORG.HAS_TAG.Advanced_Security }}
Note: Replace spaces in tag names with underscores (_
).
ORG.VARIABLES
Description: Custom variables associated with the Organization.
Usage: {{ ORG.VARIABLES.variable_name }}
ORG.MAPPING
Description: A mapping table that correlates Organization identifiers in the current system with those in external systems.
Usage: {{ ORG.MAPPING.ms_tenant_id }}
ORG.INTEGRATIONS
Description: Access integration-specific data and functionality.
Usage: {{ ORG.INTEGRATIONS.microsoft_graph }}
ORG.ATTRIBUTES
Description: Houses attributes like id
and managing_org_id
of the organization.
Usage: {{ ORG.ATTRIBUTES.id }}
TASKS
variables reference previous tasks by name.
Usage Example: {{ TASKS.list_tickets.result.result[0].id }}
Note: Replace spaces in task names with underscores (_
).
TASKS_RESULT_DATA
Description: Shortcut to reference task result data, equivalent to {{ TASKS.task_name.result.result }}
.
Usage: {{ TASKS_RESULT_DATA.Send_Message }}
Special Cases: For 'with items' tasks, use .collected_results
instead of .result.result
.
UTILS.NOW
Description: Returns the current time based on specified timezone and format. By default, returns the current UTC time as an integer.
Usage: {{ UTILS.now() }}
or {{ UTILS.now('EST', '%d-%m-%Y %H:%M:%S') }}
UTILS.uuid4
Description: Generates a new UUID (Universally Unique Identifier).
Usage: {{ UTILS.uuid4 }}
For more context and assistance with date-time formats, consult .
To read more in depth about this topic, please review the page.
Access the Live Editor in other menus in Rewst, in any fields where you see the button.
Add |
to the end of your variables to access . e.g.: {{ ORG.ATTRIBUTES.id|default('test default string') }}
For more on how to use Jinja in Rewst, see our , and sign up for courses in .
Select the method that best suits your task's complexity and your familiarity with programming concepts. Filters like jsonpath_query
and map
simplify the extraction process, making them efficient choices for various scenarios in Rewst. For more insights and community discussions, visit the #jinja
channel.
Once you’ve set up an integration, you can unpack Crates to achieve automations that depend on those integrated tools. More on Crates and how unpacking works can be found in our Crate documentation .
Our intro to custom integrations can be found . Information on how to set up custom integrations can be found .
We’re constantly adding new integrations to Rewst. Vote for which upcoming integrations should take priority by creating a post with your thoughts or upvoting other existing suggestion posts
To use the PowerShell interpreter, you’ll first need to set up our, which contains the Azure integration.
PowerShell is a command-line shell and scripting language used for automating tasks across Windows and other systems. Think of it as a way to write scripts that manage files, configure systems, and interact with services. It’s especially useful for MSPs who manage Microsoft-heavy organizations. If you’re new to Powershell, see .
Have questions or feedback? Reach out to Support or post in your dedicated Discord support channel. Suggest improvements or new features in our feedback collector.
Format String: Consult for custom date-time formatting.
Open QuickBooks Online Intuit Developer Dashboard. Navigate to https://developer.intuit.com/app/developer/dashboard 1.1 You might have to switch to classic view if you are not able to see the dashboard. 1.2 Click Dashboard in the top navbar after switching to classic view.
Create a new app. Click the "Create an app" button in the upper right corner.
Configure your app. Fill out the required fields and click "Create app". Check the scope for com.intuit.quickbooks.accounting. This is the only one required for QuickBooks Online.
Add Redirect URI to your app. Click on the newly created app. Under Development Settings(if Sandbox) or Production Settings (if Production) -> Keys & Credentials: Add the following redirect URI:
Copy your client ID and client secret. In the same page, under Development Settings(if Sandbox) or Production Settings (if Production) -> Keys & Credentials: Copy the client ID and client secret to your clipboard. You will need these values to authenticate your API calls.
Navigate back to Rewst. Paste the Client ID and Client Secret into the form below.
IMPORTANT If you are using the sandbox environment, use the appropriate sandbox hostname. This will direct API calls to the QuickBooks Online sandbox environment. Note: Sandbox credentials are different from Production credentials. They are under Development Settings and Production Settings respectively.
Click Save Configuration.
Click Authorize. You will be redirected to QuickBooks Online to authorize the connection. You may be prompted to log in. 9.1. Choose a Company from the list. This is the company that Rewst will interact with.
The QuickBooks Online Integration with Rewst delivers a robust set of actions and endpoints for interacting with QuickBooks Online. Below is a summary of each section, highlighting the diverse capabilities and opportunities provided through the QuickBooks Online Integration:
POST
quickbooks.api.intuit.com/account
Creates an account, then returns the Account object
GET
quickbooks.api.intuit.com/account/{id}
Returns the account object, given the ID
POST
quickbooks.api.intuit.com/account
Fully update an account, then return the Account object
GET
quickbooks.api.intuit.com/query
Lists all accounts
POST
quickbooks.api.intuit.com/customer
Creates a customer, then returns the Customer object. The DisplayName attribute or at least one of Title, GivenName, MiddleName, FamilyName, or Suffix attributes is required during object create.
GET
quickbooks.api.intuit.com/customer/{id}
Returns the customer object, given the ID
POST
quickbooks.api.intuit.com/customer
Fully update an customer, then return the Customer object
GET
quickbooks.api.intuit.com/query
Lists all customers
POST
quickbooks.api.intuit.com/deposit
Creates a Deposit, then returns the Deposit object
GET
quickbooks.api.intuit.com/deposit/{id}
Returns the deposit object, given the ID
POST
quickbooks.api.intuit.com/deposit
Fully update an deposit, then return the Deposit object. If sparse update, only the provided fields will be updated. If sparse is false, the entire deposit will be updated and empty fields will be nullified.
POST
quickbooks.api.intuit.com/deposit
Delete an deposit
GET
quickbooks.api.intuit.com/query
Lists all deposits
GET
quickbooks.api.intuit.com/<url_path>
Generic action for making authenticated requests against the QuickBooks Online API
POST
quickbooks.api.intuit.com/invoice
Creates an Invoice, then returns the Invoice object
GET
quickbooks.api.intuit.com/invoice/{id}
Returns the invoice object, given the ID
POST
quickbooks.api.intuit.com/invoice
Fully update an invoice, then return the Invoice object. If sparse update, only the provided fields will be updated. If sparse is false, the entire invoice will be updated and empty fields will be nullified.
POST
quickbooks.api.intuit.com/invoice
Delete an invoice
GET
quickbooks.api.intuit.com/query
Lists all invoices