Skip to content

Notion Automations

How to Create a Notion Database Item When a WP All Import Import Fails

To keep a record of failed imports, use Zapify's free An import fails trigger with the Create an item in a database action. Each failure becomes a Notion incident your team can assign and close.

What this automation does

The automation is one trigger plus one action:

  • Trigger: An import fails (WPAI_IMPORT_FAILED, WP All Import)
  • Action: Create an item in a database (NOTION_CREATE_DB_ITEM, Notion)

When an import fails, Zapify creates a Notion item with the import's name, the error and the time.

Before you start

  • WP All Import installed and active, with at least one import saved.
  • A Notion account, and an internal integration secret — create one at notion.so/profile/integrations. Notion's own guide is here.
  • A Notion database named Import incidents with these properties: Import (title), Error (text), Status (status), Logged (date). Share it with your integration (Step 1 explains how).

PRO feature

Notion is a Zapify PRO integration and needs a Connection under Settings → Connections. The WP All Import trigger itself is free.

How to build the automation

Step 1: Connect Notion

  1. In Notion, open My integrations and click New integration. Choose Internal, name it Zapify, and copy the Internal Integration Secret (it starts with ntn_ or secret_). Notion's own walkthrough is here.
  2. Share what Zapify may use. Open the Import incidents database in Notion, click the ••• menu, choose Connections, and add your integration. Notion hides anything that has not been shared, so Zapify cannot see it until you do.
  3. In WordPress, go to Settings → Connections and click Add New.

Open the Connections tab

  1. Choose Notion, paste in the Integration secret, and name the connection something like Company Notion.

Add the Notion connection

  1. Click Test. Zapify asks Notion who the integration is and answers Connected as "Zapify" with the integration's name. If the secret is wrong it says Notion refused the credentials. instead, so you find out before building anything.
  2. Save.

See Connections for how this screen works generally.

Step 2: Create a new automation

  1. In the WordPress admin, go to Zapify → Automations.
  2. Click Add New to open the builder.
  3. Name it clearly, such as Log failed imports in Notion.

Create a new automation

Step 3: Add the "An import fails" trigger

  1. Click Add Trigger.

Add a trigger

  1. Choose WP All Import as the app.

Select WP All Import as the trigger

  1. Select An import fails.

Select An import fails

  1. In the Import field, pick the import to watch, or leave it as Any import.

Step 4: Add the "Create an item in a database" action

  1. Click Add Action.

Add an action

  1. Choose Notion as the app.

Select Notion as the action

  1. Select Create an item in a database.

Select Create an item in a database

Step 5: Configure the action

Field Required What it does
Connection Yes The Notion connection from Step 1.
Database Yes The database the item should be added to. Only databases shared with the integration appear.
Property values Yes One row per property. Put the property name on the left and the value on the right. Zapify converts each value to the property's type.
Content No Text for the body of the new item. Blank lines start a new paragraph, # makes a heading and - a bullet.

For Property values, add these rows:

Notion property Value
Import Import name token
Error Error message token
Status Open
Logged A date token from the token picker, such as the current date

Step 6: Set the steps Live and save

Each trigger and action has its own Live / Off / Draft switch. A new automation starts as a Draft and does nothing until its steps are Live.

  1. Set the trigger and every action to Live.
  2. Click Save.

Set the automation live

Step 7: Test it

Force an import to fail, for example with a bad file URL, and check Notion.

Tokens you can use

The An import fails trigger exposes these tokens. Insert them into any field with the {} button.

Token What it holds
Import ID / Import name Which import failed.
Error message The reason, when WP All Import provides one. It is often empty, so also check the import's own log under All Import → Manage Imports.

The Notion action makes Page ID and Page URL available to later actions.

Conclusion

With the An import fails trigger and the Create an item in a database action, failed imports are tracked instead of forgotten. To be told by email too, see sending an email when a WP All Import import fails.

FAQs

Why is the error empty?

WP All Import does not always provide a reason. Check the import's own log under All Import → Manage Imports.

Can I log successes too?

Yes. Add a second automation with the An import is completed trigger.

Is this free in Zapify?

The An import fails trigger from WP All Import is free. The Notion action needs an active Zapify PRO licence and a Connection.

Why does Zapify say Notion cannot find the database or page?

Notion only shows an internal integration the pages and databases that have been shared with it. Open the database or page in Notion, click •••, choose Connections, and add your integration. Then reopen the field in Zapify; the lists are kept for about a minute. Notion's own steps are here.

Why was a property left empty in Notion?

Zapify skips a property whose value is empty, so a token that resolved to nothing cannot blank what is already there. A property that is a formula, rollup, file or created-time type cannot be set through Notion's API, so Zapify skips it and names it in the run log. The property name must also match the one in your database exactly (capitals do not matter).

Do I need to write any code?

No. The integration secret is the only thing you copy from outside Zapify.

Was this page helpful?