New comment email notification with link to direct post/comment

Hello everyone.

I have managed to set up a comment and replies page, with each comment or reply an email notification is sent to the email of the comment creator or post creator as the case may be.

However, I want to include a link in the email that the recipient can click to come straight to the comment/post that has the activity. I have created slugs for post, comments and replies but I don’t know how to proceed …

Your response will be greatly appreciated

In the link, you would have to include the slug of the post.
Then you create a workflow “do when page is loaded” and only when “parameter post (for example) is not empty”.

You then display data in the repeating group → Do a search for post with constraint slug = get data from page url “post” (for example).

The repeating group should now contain only the post with the slug that is found in the url.

Let me know if that helps.

Cheers :slight_smile:

Thank you. I am missing a key step in your explanation. Those url + slugs have to be autogenerated as soon as the user clicks on 'send comment" and then they also have to be in the email body . How do i do this?

@mikeloc @adamhholmes Calling on you once again. Please help

For clarity, see image below for what i am trying to achieve. The problem i am facing is how to include an auto generated url with the slug in the postmark email body that is sent to the user.

Okay so let’s get started.
I’m assuming you already have the comment data type and post data type. This is what the demo I built looks like.



I have a button to create a new post that has these workflows:

I’ve Created my first post. It should have a slug and a caption now. Let’s see how it looks:

Now we want to add a comment right? Let’s check out the workflow:

So here, you want to send the email to the person who created the post. So dynamically map their email. The sender name is your website name. You choose your subject.
For the body, give them some context. In my case, I’m telling the receiver that the person who created the comment, created the comment. I then let them see what the comment content is.

Now for the link:
You should use your website home url, for example
Then you tell the link what page you want to land on, in this case comment page, so now we have
Now tell it what parameters to send, which is the comment and the post.
add the “?” and choose whatever your parameter key for post will be. I chose “post”. In that “post” key, you want to put the slug of the post you want the user to see. You dynamically map this.

Now you want to do the same for the comment, so add an ampersand and your parameter key for comment, in my case “comment”. Then add its slug.

so now it should look something like this:

I added a comment and The email should look like this:

Now when you click the url, it will bring you to the comment page and have the slugs in the url. To display only THAT post and THAT comment, you will have this workflow (please use the same parameter keys as the one you have in your email, in my case, “comment” and “post”:

You can’t do the “display list” workflow to the comments repeating group because it’s a repeating group within a repeating group. The workflow section can’t reach it. But you can easily just add a conditional statement within the comments repeating group itself, which is what we do here:

Now, when the user clicks the link sent to their email, they will only see THAT post and THAT comment. I wouldn’t recommend letting the user see only the comment that was sent. I would just highlight the comment, like this:

So the results
Without clicking the URL:

By clicking the url in email:

You probably didn’t need it as detailed as this, but if a beginner has the same question, they can just use this forum post as reference.

Let me know if this was helpful!

Cheers mate :slight_smile:

1 Like

My Explanation for generating the url for the email is in the 8th image.


Thanks a whole lot for the detailed explanation. Link + slug successfully sent via email as a link.

Now i am trying to make sure the link comes back to a specific post, I can’t seem to figure out how to set the condition on the workflow “when page is loaded”. It seems you have set parameter keys post and comment somewhere not shown in the steps.

Because I am unable to set the constraint. Only when Get post from page url is not empty

Greatly appreciate.

It’s the “Get data from page URL” function. The last one in the screenshot you have provided. The parameter name is going to be post. Then you do another one for comment.

Did you set the parameter keys post and comment somewhere? I understand I have to set the keys and their value. I don’t know where to do that

Those parameter keys are what you included in the email you sent. Remember my example:

Here “post” holds the slug of the post you want to show and “comment” holds the slug of the comment.

You don’t have to set them up anywhere. You just have to tell the workflow to run only when those parameters aren’t empty.

Maybe I am understanding you correctly, is it not working?

So sorry. I have fixed it. I am exhausted and stressed out and I was not thinking straight. I will be back as soon as everything works perfectly

1 Like

No problem at all. Get the rest you need and come back stronger :slight_smile:

Thank you for your time and patience. Everything is copacetic. :+1:

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.