Skill level: Easy
Time required: 5 minutes
This article explains the use and functioning of the Logger app in a journey.
Prerequisites
- An active GitHub account with access to a repository where issues can be created and tracked.
- A Slack account with a configured Slack workspace and dedicated channels for customer support and engineering to receive notifications about GitHub issues.
- Access to Quickwork for configuring GitHub trigger and actions.
What is a Logger
Quickwork provides a Logger app and data transformation capabilities that help optimize and debug workflows.
Here are the key capabilities of Logger:
- Recording output data:
- Logger enables the recording of output data from triggers and actions while a journey is in an execution state.
- It provides visibility into the complete data flow between actions, aiding debugging and monitoring the journey process.
- Visualizing data: It serves as a powerful visualization tool for tracing and understanding the data interactions and transformations within a journey.
- Data transformation:
- Logger supports data transformations directly within its interface.
- You can use Formula mode within Logger to manipulate output data, such as:
- Converting the case of text, for example, from lowercase to uppercase.
- Performing arithmetic operations on numerical data.
- Changing date formats to suit different requirements or locales.
- JavaScript sandbox environment:
- When the Logger is set to Formula mode, it functions like a JavaScript sandbox.
- This environment allows for complex data manipulations and custom transformations based on JavaScript syntax.
Consider a scenario, whenever a GitHub issue with the title containing bug is created, a notification is sent on Slack. Extending it, let us consider that the notification has a deadline (2 days from the issue-created date) for resolving such issues, and the customer support team must be notified about the deadline through the Slack channel. To achieve this, the Logger can be utilized for data transformation (to calculate the date two days later than the created date.
Step-by-step guide
- Configure the trigger and actions: Ensure you have an active GitHub repository and a Slack channel for notifications, with the appropriate If condition set up.
- Utilize Logger for data transformation:
- Add a step with the Logger app, selecting the Log a message action, and position it just after the If Condition step.
- Change the Message input field to Formula mode.
- Drag the Created At data pill from the GitHub | New issue Trigger into the Message field .
- Enter JavaScript code to calculate a date two days from the created date.
- Execution and testing:
- Click Save & Start to activate the journey
- Activate the journey and create a new issue in GitHub.
- Observe the loggedMessage in the History tab.
- Check the Slack message.
Comments
0 comments
Please sign in to leave a comment.