In this tutorial, we will show you how to translate a post published on Lens and automatically post it as a comment using the Lens and ChatGPT integration.
1- To start, log in to ChainJet with your wallet and click "create workflow" on the dashboard.
2- Select "New Post" as the trigger in the Lens Protocol integration. Here, fill the Lens handle of whose new posts you want to translate. In this case, we have chosen the "Only post" option in the “Include Mirrors” field, as we do not want to translate any mirrors by this user.
3- Next, select the action by clicking the "+" button under the trigger, and choose "Get Chat response (ChatGPT)" in the OpenAI integration.
In the "Chat Message" field, type "translate to " and select "metadata.content" from the drop-down menu.
*If this is your first time using the OpenAI integration, you will need to connect your account with the API Key.
4- Finally, select the last action by clicking the "+" button under the previous action. Then, choose the Lens integration and select "Create Comment". Here, fill in two fields:
Publication ID: Select "ID" from the Lens options drop-down menu.
Comment content: Select "Response" from the ChatGPT options drop-down menu.
That's it! Your workflow is now ready and active. A comment with the translation will appear on the next post you make on Lens! Thank you for reading this tutorial; we hope it has been helpful.