Step 1: Scheduling the Workflow Trigger
Navigating to the Workflow Editor
First, we need to schedule when this workflow runs. Using ResNet’s built-in scheduling function, we can trigger the workflow at a specific time each day.
First, we need to schedule when this workflow runs. Using ResNet’s built-in scheduling function, we can trigger the workflow at a specific time each day.
- Navigate to the workflow editor and add a Scheduled Trigger.
- Set the trigger time—let’s say midnight or afternoon, depending on your needs.
This ensures your workflow runs automatically at the right time.
Step 2: Connecting to Your Database
Adding the PostgreSQL Connector
Next, we'll pull data from a PostgreSQL database.
Next, we'll pull data from a PostgreSQL database.
- Add the PostgreSQL Query connector to the workflow.
- If this is your first time, click Create Connection and enter the database credentials:
-
- Server Name
- Database Name
- Username & Password
🚨 Important: You’ll need to whitelist ResNet’s IP addresses for database access. Check the documentation for the IP list.
Step 3: Writing the SQL Query
Entering the Query
Now, let’s define the SQL query to retrieve production variance data.
Now, let’s define the SQL query to retrieve production variance data.
- In the Query Field, enter your SQL statement.
- Select the table containing variance data.
- Ensure that your query pulls relevant information, such as:
-
- Customer Lookup ID (to match ResNet wells)
- Date
- Variance Category
This data will help us track production alarms efficiently.
Step 4: Looping Through the Data
Looping Over Query Results
Now that we have the data, let’s loop through each row to process the variances.
Now that we have the data, let’s loop through each row to process the variances.
- Use a Loop Component to iterate over the results.
- Match each Customer Lookup ID in your SQL table to the corresponding well in ResNet.
This step ensures that variances are linked to the correct assets in ResNet.
Step 5: Filtering for 24-Hour Variances
Adding a Filter Component
To focus on the most relevant data, let’s filter for 24-hour production variances.
To focus on the most relevant data, let’s filter for 24-hour production variances.
- Add a Branch or Filter Component.
- Set the condition to Category = 24-hour Production Variance.
Now, only the most urgent variances will be processed in the workflow.
Step 6: Formatting the Data
Adding a Date Formatter
To ensure consistency, let’s format the date before creating issues.
To ensure consistency, let’s format the date before creating issues.
- Use the Date Formatter Tool to convert the date into the required format.
- This helps ensure clear and accurate timestamps in issue tracking.
Step 7: Creating an Issue in ResNet
Configuring the Create Issue Step
Finally, let’s create an issue for each variance.
Finally, let’s create an issue for each variance.
- Use the Create Issue Component.
- Pull in details from:
-
- The SQL Query results
- The ResNet campaign details
- The asset values
With this setup, ResNet will automatically generate issues for production variances, helping teams address them in real-time.
Recap & Next Steps
That’s it! You’ve successfully set up a workflow that automates issue creation for the top 10 production variances in ResNet.
✅ Scheduled daily automation
✅ Connected to a PostgreSQL database
✅ Filtered for key variances
✅ Created issues automatically
✅ Connected to a PostgreSQL database
✅ Filtered for key variances
✅ Created issues automatically
Need more help? Check out our support documentation or reach out to our team. Happy automating!