Create your first workflow

This is a short tutorial to create your first workflow, it will be a simple one to get you used to Mantiq.

Let’s assume we want to get a notification email whenever a new post is created on your website. To do that, we will want to trigger a workflow on post creation and run a single action to send you the email with the post title.

Create the workflow

To create your first workflow, go to your wp-admin and click “workflows” on the admin menu to get to the list of the available workflows.

 

Click on the “New workflow” button on the top left.

 


And now you are in the WP Mantiq editor to add your logic.

Adding the logic to the workflow



The event trigger

First of all, let’s make our workflow runs whenever a new post is created. We can do that by clicking on the Schedule block to see its settings on the sidebar.

As we can see, the default event for the trigger of the workflow is a schedule every hour. We are not interested in that, so let’s change our trigger to run on a specific event by selecting “Event” from the “What should trigger it” option.

And now we can see that an error appeared. This is because WP Mantiq is asking us what event are we interested in. We need to select that from the dropdown under the “What event should trigger it” question. Let’s select

Post Published

For our case because this is when we want our workflow to trigger. Now our workflow looks like this:

 

The “Send email” action

Now our workflow will run whenever a new post is published, but the workflow is empty, meaning it will do nothing when that happens. So let’s create our first action by clicking the + button right below the event

After clicking the + button, WP Mantiq will ask us what do we want to add as a logic block? we are interested in an action (sending an email)

 
Now, we will see that WP Mantiq created an action block for us and highlighted it for us and we can already see its settings on the sidebar

Let’s give it any name (it is up to you) and select the action that you want to trigger, in our case, it will be “Send Email”

Once we selected the “Send Email” action, we noticed that we can see more settings for this action, those settings are related to the email that we want to send. So let’s fill in the “To” to be your email address, use any subject and body you want (up to you) Finally, this is how my final workflow looks like:

Giving the workflow a name

Now let’s give our workflow a name in the top bar to identify it

The last step is to enable the workflow to make it work by clicking the activation toggle button

 

 

And voila! Your first workflow is up and running. You can test it out by publishing a post.

 

 

Are you facing any issues with your workflow?

If your workflow is not running as you expect or you are not receiving emails, it can be for different reasons, but the workflow above, you can do 2 checks:

  1. Make sure your SMTP settings are set correctly in your WordPress and that your WordPress can send emails without issues.
  2. Check the logs in the workflow by going to the workflow and clicking the “View Logs” button and see if your workflow is running and if you see any error messages.

If you still don’t know what to do, feel free to reach out to our free support. We are always happy to help.

Share on facebook
Share on twitter
Share on linkedin
Last updated: October 24, 2021

Table of Contents

Stay connected

Receive the latest news about Mantiq including early-access benefits

We use cookies to ensure you get the best experience on our website.