Skip to content

Conversation

@JonSandoval
Copy link
Contributor

@JonSandoval JonSandoval commented Oct 31, 2025

PR Summary: feat(flow): Add 'Run Scheduled Data Import' Action

Description:
This PR introduces a new custom Flow Designer action, "Run Scheduled Data Import," within the "Action Pack" application. This action allows developers to programmatically trigger a specific Scheduled Data Import (Data Source) on-demand as part of a flow or subflow.

The primary use case is for ad-hoc execution of data imports that are normally on a fixed schedule, providing greater flexibility for integrations and automated processes.

Key Components:

  1. Action: Run Scheduled Data Import

    • Description: "Ad-hoc trigger Scheduled Data Import"

    • Accessibility: Available from all application scopes.

  2. Action Inputs:

    • Import (import): A mandatory reference field to the 'Scheduled Data Import' (scheduled_import_set) record that needs to be executed.
  3. Action Outputs:

    • Import Ran (import_ran): A True/False boolean value indicating whether the import was successfully triggered.

      • true: The SncTriggerSynchronizer.executeNow() API returned a job ID, implying the import was initiated.

      • false: The SncTriggerSynchronizer.executeNow() API did not return a value, indicating the import failed to start.

  4. Logic (Script Step):

    • The action uses a script step to retrieve the specified scheduled_import_set record.

    • It executes the import using SncTriggerSynchronizer.executeNow().

    • It then checks the return value from executeNow() to populate the import_ran output variable.

  5. Error Handling:

    • Includes a custom error evaluation step, "Scheduled Data Import Trigger Failed," which likely activates if the import_ran output is false.

How to Test:

  1. Create a new Flow.

  2. Add the "Run Scheduled Data Import" action.

  3. In the "Import" input, select a valid, existing Scheduled Data Import (e.g., a test data source).

  4. Run the flow and check the execution details.

  5. Verify that the import_ran output is true.

  6. Navigate to the "Import Sets" module and confirm that a new import set was created and processed for the triggered data source.

Screenshot 2025-10-31 142341 Screenshot 2025-10-31 142400 Screenshot 2025-10-31 142425 Screenshot 2025-10-31 142409

@github-actions
Copy link

Valid PR for ActionPack

Thank you for your contribution. This PR complies with the CONTRIBUTING.md.
A maintainer will review this shortly. In the meantime, Happy Hacking!

@Lacah Lacah self-assigned this Oct 31, 2025
@Lacah Lacah merged commit 1089d53 into ServiceNowDevProgram:main Oct 31, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants