---
title: "fswa_import_trigger — Action Hook"
description: "Restore per-trigger data after a webhook is recreated from a Build import."
url: "https://wpwebhooks.org/docs/fswa-import-trigger/"
---

[WP Webhooks](https://wpwebhooks.org/) / [Docs](https://wpwebhooks.org/docs/) / fswa\_import\_trigger

Action since v2.4.0

# fswa\_import\_trigger

Restore per-trigger data after a webhook is recreated from a Build import.

/ Signature

```
do_action( 'fswa_import_trigger', $webhook_id, $trigger_name, $trigger )
```

/ When it fires

Fires once per trigger while importing a webhook, after its schema (field mapping + conditions) has been written. Pro listens here to recreate the pre/post Code Glue snippets carried in the trigger’s `code_glue` block.

/ Parameters

| Name | In | Type | Req | Description |
| --- | --- | --- | --- | --- |
| $webhook\_id | param | int | yes | The freshly created webhook ID. |
| $trigger\_name | param | string | yes | The trigger (WordPress action) name. |
| $trigger | param | array | yes | The trigger document from the import (name, schema, and any extra blocks such as \`code\_glue\`). |

/ Examples

Log which triggers were restored on import

```
add_action( 'fswa_import_trigger', function ( $webhook_id, $trigger_name, $trigger ) {
    error_log( sprintf( '[fswa] imported %s onto webhook #%d', $trigger_name, $webhook_id ) );
}, 10, 3 );
```

/ Related

[Import & Export](https://wpwebhooks.org/docs/import-export/)[fswa\_export\_trigger](https://wpwebhooks.org/docs/fswa-export-trigger/)[fswa\_export\_doc](https://wpwebhooks.org/docs/fswa-export-doc/)[fswa\_import\_extra\_root\_keys](https://wpwebhooks.org/docs/fswa-import-extra-root-keys/)

/Ready

## Your next automation is  
one sentence away.

[Install Plugin→](https://wordpress.org/plugins/flowsystems-webhook-actions/) [See the Plugin →](https://wpwebhooks.org/wordpress-webhook-plugin/)

$ wp plugin install flowsystems-webhook-actions --activate

## Structured data

```json
{"@context":"https://schema.org","@type":"TechArticle","name":"fswa_import_trigger — Action Hook — Webhook Actions Docs","description":"Restore per-trigger data after a webhook is recreated from a Build import.","url":"https://wpwebhooks.org/docs/fswa-import-trigger/","isPartOf":{"@type":"WebSite","name":"WP Webhooks","url":"https://wpwebhooks.org"},"about":{"@type":"SoftwareApplication","name":"Webhook Actions","applicationCategory":"WordPress Plugin"}}
```
