After importing a file by using an action, you may want to process all records. This can be done with a callback action. For example, if each imported record needs to be sent by email.
- Go to Actions by clicking on the Actions icon in the Builder Bar.
- Choose an action that uses an import event, or create one by following the steps above.
- Select the import event of the action and click on the Edit button in the top right corner.
- Scroll down and check the Enable callback action checkbox, this will show additional input fields.
- Check the Process imported records checkbox to automatically use the imported records within the records variable of the action.
- Choose an action to execute after the import, or create a new action by choosing `- New -`. Note that if the Process imported records checkbox is enabled, you'll only be able to choose actions that are a batch action and are built on the same model as the imported records.
- Optionally, you can choose to enable the Execute all action in foreground checkbox, which sets the callback action to run in the foreground if this is set to background.
- Click on the Save button in the top right corner to save the import event.
- In the chosen callback action, enable the Preserve collection checkbox to use a collection of all records in the action (input variable records). If this option is disabled the action will be executed once for every record (input variable record).
This callback action will trigger when the last record is imported in the import event. It will then use all records from the import to start a batch action. More about callback action can be found in this article: HowTo use callback actions.