This workflow recursively fetches all active campaigns, compares their Deadline, and takes action as apprioriate.
7 days pre-due, call sub-workflow
3 days pre-due, call sub-workflow
due date, call sub workflow
7 days past-due, close the campaign and REVOKE any undecided access DevDays2025-2-IterateCampaigns.json (10.5 KB)
This workflow gets called per-campaign, to recursively iterate over CERTIFICATIONS that belong to the campaign that triggered the workflow
Steps taken:
7 days pre-due: email the reviewer
3 days pre-due: email the reviewer and their manager
due date: re-assign the certification to the reviewers manager (if present) DevDays2025-3-IterateCertifications.json (11.4 KB)
I would like to compare the Time stamp only on 4th day past due date (like only duedate +4 day, I don’t want to check duedate+1, duedate+2, duedate+3, duedate+4 days)
I was able to create same workflow and made some changes like not having the revoke certification.
Workflow works great i am able to see the emails as well.
I am getting one problem here my observations are,
when I have more than 100 certification in campaign, it run forever in loop step.
—–@@ Loop step input is –
{
“context.$”: “”,
“input”: [
{
“campaign”: {…etc
—–@@ Loop step output is {
“context”: null,
“definitions”: {
“start”: “Compare Strings 1”,
“steps”: {
“Compare Strings 1”: {
“actionId”: “sp:compare-strings”,
“choiceList”: [
{
“comparator”: “StringEquals”,
“nextStep”:
When i have less than 100 certifications in campaigns it run sucess. Same loop inut as i mentioned ablove and
Lop out put looks like this..
{
“loopOutput”: {
“failureItems”:
“successfulItems”: [
{
“266af576-b4a2-46c-1”: “019551aa687f4ab”,
“compareStrings1”: {..etc
I also observed when i removed subject in one of the email template inside the loop it works with more or less than 100 certifications..
After loop this is my compare string $.hTTPRequest1.body.length().
In side loop i have three email templates, I also added some Templating Context same behavior with or with out Templating Context.
any idea what issue causing my loop step runs for ever and not trigers any email when i have more than 100 certifications.
I have this question :
After loop can i compare like this: $.hTTPRequest1.body.length() is greater than or Equal to 100.
If less than 100 end , if True i am calling http with request body {“campaignId”:“{{$.trigger.campaignId}}”,“pagination”:“{{$.trigger.pagination}}A”}
Thank you for creating this for the broader community and for providing both the instructional video and templates!
I downloaded your templates and followed the instructions step-by-step.
I wanted to note a couple minor updates I made to the “DevDays2025-3-IterateCertifications.json” template to get it to function correctly in my tenant.
The filter string in the GET Certifications call seems to be case sensitive (line 63).
“filters”: “campaign.id eq \”{{$.trigger.campaignId}}\" and completed eq false",
Update “variableA” in Compare Timestamps 3 (line 163 for me) from “$.loop.loopInput.deadline” to “$.loop.loopInput.due”
Hope this can help anyone downloading the templates to implement the workflows.