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 youtube.com
Then you tell the link what page you want to land on, in this case comment page, so now we have youtube.com/commentpage.
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: https://youtube.com/commentspage?post=post-3456&comment=comment-7632
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!