 Hello everyone. I am Sanjay Gupta. I welcome you on Sanjay Gupta Tech School. In this video, I'm going to demonstrate a scenario based on record trigger flow. Let's understand the requirement of this record trigger flow scenario. So I'm going to demo how you can post to chatter through action, element, and through feed item object with the help of record trigger flow. So let's jump to the on. So I'm going to create new flow and I'm selecting record trigger flow. So first, I'm going to show you how you can post to chatter through action. So I'm selecting opportunity as object when opportunity record is created. Then I'm selecting actions and related reports. So here I'm not putting any condition. So I want to perform this chatter post whenever a new opportunity is created. If you want to apply any entry criteria as per your business requirement, so you can do. Now, before using action for chatter post, we need to create a message. So why so? Because if I select action, then post to chatter. So here you can see we need to provide the message. So we need to prepare a message so that we can use that here. So you have two options. Either you can click new resource from here or you can cancel it and you can create new resource from here as well. So resource will be of type text template. So API name is chatter masses and here you can prepare the body. So here I'm selecting view as plain text. So my message will show opportunity name. Now opportunity name is a plain text. Now if you want to show the name of opportunity that you are creating so you can merge fields as well this way. So whenever you create any opportunity record so that newly created opportunity information will be available in this dollar record global variable. So you can just search dollar record global variable here and you can have any field from there. Then I want close date. So again dollar record dot close date and stage so you can have dollar record dot stage. So this way our chatter post message is created. I'm clicking on done. Now I'm going to select the section post to chatter. So chatter post through action from here we need to select this detection. So it is chatter post now target name or ID. So it will be the record. So we need to put record dot ID here. So here is the ID. So with this like your chatter message will be available under this record and then you can just click on done. Now just save it. So I just saved it. I'm activating it. Now I need to create new opportunity so that I can see whether chatter post is happening or not. So I'm clicking on new. So I'm creating opportunity as OPP 1011 and I'm providing close date and stage and clicking on safe. So opportunities created. Now I'm moving to chatter and here you can see chatter post is available. So it is showing opportunity name close date and stage. So we created a flow record trigger flow. So it is executing on creation of this opportunity record and it is throwing this chatter post through this action. Now as I told you earlier, like I'm going to show you this through two different ways. So this is the one way like through this action we can do chatter post. Now I'm going to remove this and here I'm going to pick create records element and I'm going to create feed item. So basically we have this object known as feed item, which is also a responsible to create chatter post, right? So here we have these fields which we need to populate. So I'm just picking body and here I'm setting the chatter masses and in the second field, I'm going to have this related record ID and here I'm passing opportunity record ID and I'm clicking on done. So here you can see we have one more field that is important to know is rich text. So if you want to show your message in form of rich text, so you can select it and you can set as yes, otherwise you can ignore it. So we need to save as and then activate. Then again, I'm going to create new opportunity. So you need to fill all the required fields and click on save. This time it is showing some error. So we need to check the email. So it is saying field integrity exception related record ID, ID value of incorrect time. Okay, so let's check it. Let's have this instead of related record ID moving to chatter. Yeah, so this time it is working. So it was my bad, like instead of having related record ID, you need to use the parent ID and parent ID will be the opportunity record with which this newly created feed item record will be related. So this way I showed you two different ways to do chatter post when a record is created with the help of record trigger flow. So one is action and one is feed item. Both are, both you can use as per your requirement. So which goes with your requirement, you can pick that particular element.