Bulk Job Progress Tracker with Teams Updates
After launching a Salesforce Bulk API job, this flow polls GetJobInfo every 5 minutes, posts progress updates (records processed, records failed) to a Teams channel, and sends a final completion/failure summary.
Provided as-is, without warranty of any kind. Review and test each pattern in a non-production environment before deploying it to live automations. See our Terms.
Overview
This flow monitors a Salesforce Bulk API job by polling GetJobInfo at a configurable interval, posting real-time progress updates (records processed, records failed) to a Microsoft Teams channel, and delivering a final completion, failure, or timeout summary.
Use Case
After launching a Salesforce Bulk API job (insert, update, upsert, delete, or query), operations teams need visibility into job progress without manually refreshing the Salesforce UI. This flow provides automated monitoring with Teams notifications so the team can track bulk operations passively.
The flow is ideal for teams that:
- Operations teams running Salesforce Bulk API jobs who need passive monitoring
- Admins who want Teams visibility into long-running data loads
- Developers integrating Salesforce bulk jobs with collaboration workflows
Flow Architecture
Manually trigger a flow
Manual triggerUser provides the Bulk Job ID as a text input to start the monitoring run.
Initialize tracking variables
6 parallel Initialize VariableInitializes Teams Group ID, Teams Channel ID, Poll Interval, Max Polls, Poll Count (integer 0), and Job Complete (boolean false) — pulled from environment variables.
Get Initial Job Info
Salesforce - GetJobInfoFetches initial job state, operation type, object name, and record counts for the supplied Bulk Job ID.
Post Initial Status to Teams
Teams - PostMessageToConversationSends a styled HTML message with job ID, state, operation, object, record counts, and configured poll interval.
Do Until Loop (Poll Until Complete)
Do UntilLoops until varJobComplete is true OR varPollCount is greater than or equal to varMaxPolls. Each iteration: Delay varPollInterval minutes, run Salesforce GetJobInfo for current state, increment varPollCount, then check if state equals JobComplete / Failed / Aborted to set varJobComplete = true — otherwise posts a progress update to Teams.
Compose Final Summary
ComposeBuilds an HTML summary that captures success / failure / timeout status, final record counts, and total polls executed.
Post Final Summary to Teams
Teams - PostMessageToConversationDelivers the final summary message to the configured Teams channel.
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_TeamsGroupId | String | <configure> | Microsoft Teams group (team) ID where progress and summary messages are posted. |
| flowlibs_TeamsChannelId | String | <configure> | Microsoft Teams channel ID within the configured group for notifications. |
| flowlibs_BulkJobPollIntervalMinutes | String | 5 | How often (in minutes) the flow polls Salesforce GetJobInfo for the bulk job status. |
| flowlibs_BulkJobMaxPolls | String | 60 | Maximum number of polls before the flow times out (approximately 5 hours at the 5-minute default interval). |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| Salesforce | shared_salesforce | GetJobInfo (Fetch bulk job state and record counts) |
| Microsoft Teams | shared_teams | PostMessageToConversation (Post initial, progress, and final summary messages) |
Note — All connections are referenced as solution connection references; the flow is portable between environments as long as a connection is mapped at import time.
Customization Guide
Almost every realistic variant of this flow can be implemented by changing environment variable values. A few cases require small edits inside the flow definition — those are called out explicitly below.
- Set Teams Group and Channel IDs
- Update flowlibs_TeamsGroupId and flowlibs_TeamsChannelId env var values in your target environment so messages land in the right Teams channel.
- Adjust Poll Frequency
- Change flowlibs_BulkJobPollIntervalMinutes (default 5 minutes). Lower values give faster updates but consume more Salesforce API calls.
- Adjust Timeout
- Change flowlibs_BulkJobMaxPolls (default 60). At 5-minute intervals, 60 polls equals roughly 5 hours of total monitoring time.
- Authorize Connections
- Sign into both the Salesforce and Microsoft Teams connections after importing the solution into your environment.
- Turn On
- Toggle the flow to On once connections are authorized and the env vars above are configured.
Key Expressions
The flow is intentionally light on Power Fx / WDL gymnastics — the heaviest expressions are the branch-name concatenation and the approval outcome check. They are listed below in the order they appear in the flow.
EXPR.01Dynamic delay
Converts the string env var value to an integer so the Wait/Delay action can consume it.
EXPR.02Job completion check
Sets varJobComplete = true whenever the Salesforce job reports JobComplete, Failed, or Aborted.
EXPR.03Null-safe record counts
Defaults to '0' when Salesforce has not yet populated the record count field.
EXPR.04Conditional final summary
Switches between the timeout message and the completion message, with nested if() calls choosing success / failure / abort icons.
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.