Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:28:87

And never let them avert you from the verses of Allah after they have been revealed to you. And invite ˹people˺ to your Lord. And never be of those who associate others with Allah.  

And never let them bar you (yasuddunnaka is actually yasuddūnannaka, but the nūn of the indicative ˹ending˺ has been omitted because of the apocopating particle ˹lā˺, as has the wāw of the ˹third person plural˺ subject of the verb because of its coming together with an unvocalised nūn) from God’s signs after they have been revealed to you, in other words, do not consult with them in such ˹matters˺, and summon, people, to your Lord, by affirming His Oneness and worshipping Him, and never be of the idolaters, by supporting them (lā takūnanna: the apocopating particle does not affect the ˹ending of the˺ verb here because of its invariability).
القرآن:٢٨:٨٧

وَلَا يَصُدُّنَّكَ عَنْ آيَاتِ اللَّهِ بَعْدَ إِذْ أُنْزِلَتْ إِلَيْكَ ۖ وَادْعُ إِلَىٰ رَبِّكَ ۖ وَلَا تَكُونَنَّ مِنَ الْمُشْرِكِينَ  

{ولا يصدنَّك} أصله يصدوننك حذفت نون الرفع للجازم، وواو للفاعل لالتقائها مع النون الساكنة {عن آيات الله بعد إذ أنزلت إليك} أي لا ترجع إليهم في ذلك {وادع} الناس {إلى ربك} بتوحيده وعبادته {ولا تكونن من المشركين} بإعانتهم ولم يؤثر الجازم في الفعل لبنائه.