Posting on LinkedIn Directly from Zoho Cliq

Posting on LinkedIn Directly from Zoho Cliq

Are you tired of switching back and forth between Zoho Cliq and LinkedIn to make a simple post? Well, there's good news! With the following instructions, you can post directly on LinkedIn from within Zoho Cliq. Let's get started!

Step 1: Generate an OAuth Token

To post on LinkedIn from Zoho Cliq, you'll need to generate an OAuth token. Here's how to do it:
  • Go to the LinkedIn Developer page and create a new app by clicking on "Create app"

  • Enter your app name, LinkedIn page, and app logo, then agree to the terms and conditions and click on "Create app".

  • Navigate to the "Products" tab and request access for "Share on LinkedIn" and "Sign In with LinkedIn".

  • Go to the OAuth Tools page and create a new access token.
  • Congratulations! You've successfully generated an OAuth token.

Step 2: Configure the OAuth Token in Zoho Cliq

Now that you have your OAuth token, it's time to configure it in Zoho Cliq. Here's how:
  • Go to https://cliq.zoho.com and navigate to "Profile" > "Bots & tools" > "Integrations" > "Command" > "Create".
  • Enter a command name, hint, access level, and click on "Save".
  • Copy and paste the following code:
  1. inputs = List();
  2. inputs.add({"type":"textarea", "name":"description","label":"Description","placeholder":"What do you want to talk about?","min_length":"0","max_length":"1000","mandatory":true});
  3. inputs.add({"name":"file","label":"Add a Photo","placeholder":"Please upload a photo to upload.","mandatory":false,"type":"file"});
  4. return {"type":"form","title":"Create a post","name":"linkedinPost","hint":"","button_label":"Submit","inputs":inputs,"action":{"type":"invoke.function","name":"linkedinPost"}};
  • Next, go to "Profile" > "Bots & tools" > "Integrations" > "Function" > "Create".
  • Name your function "linkedinPost", enter a hint, choose the function type as form, and click on "Save".
  • Copy the code below and paste it inside the form submit handler.
  1. formValues = form.get("values");
  2. textContent = formValues.get("description");
  3. file = formValues.get("file");
  4. // fetch access token
  5. token = "Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  6. headersMap = Map();
  7. headersMap.put("Authorization",token);
  8. headersMap.put("LinkedIn-Version","202208");
  9. fetchUserID = invokeurl
  10. [
  11.  url :"https://api.linkedin.com/v2/me"
  12.  type :GET
  13.  headers:headersMap
  14. ];
  15. info fetchUserID;
  16. userID = fetchUserID.get("id");
  17. if(file.length() == 0)
  18. {
  19.  params = {"author":"urn:li:person:" + userID,"lifecycleState":"PUBLISHED","specificContent":{"com.linkedin.ugc.ShareContent":{"shareCommentary":{"text":textContent},"shareMediaCategory":"NONE"}},"visibility":{"com.linkedin.ugc.MemberNetworkVisibility":"PUBLIC"}};
  20.  createPost = invokeurl
  21.  [
  22.   url :"https://api.linkedin.com/v2/ugcPosts"
  23.   type :POST
  24.   parameters:params + ""
  25.   headers:headersMap
  26.   detailed:true
  27.  ];
  28.  info createPost;
  29. }
  30. else
  31. {
  32.  initializeParams = {"initializeUploadRequest":{"owner":"urn:li:person:" + userID}};
  33.  initializeUpload = invokeurl
  34.  [
  35.   url :"https://api.linkedin.com/rest/images?action=initializeUpload"
  36.   type :POST
  37.   parameters:initializeParams + ""
  38.   headers:headersMap
  39.  ];
  40.  info initializeUpload;
  41.  imageUrl = initializeUpload.get("value").get("uploadUrl");
  42.  imageID = initializeUpload.get("value").get("image").toList(":").get(3);
  43.  uploadFile = invokeurl
  44.  [
  45.   url :imageUrl
  46.   type :PUT
  47.   parameters:file
  48.   headers:headersMap
  49.   detailed:true
  50.   content-type:"application/octet-stream"
  51.  ];
  52.  info uploadFile;
  53.  if(uploadFile.get("responseCode") == 201)
  54.  {
  55.   params = {"author":"urn:li:person:" + userID,"lifecycleState":"PUBLISHED","specificContent":{"com.linkedin.ugc.ShareContent":{"shareCommentary":{"text":"Good Afternoon everyone"},"shareMediaCategory":"IMAGE","media":{{"status":"READY","description":{"text":"Center stage!"},"media":"urn:li:digitalmediaAsset:" + imageID,"title":{"text":"First LinkedIn Post"}}}}},"visibility":{"com.linkedin.ugc.MemberNetworkVisibility":"PUBLIC"}};
  56.   createPost = invokeurl
  57.   [
  58.   url :"https://api.linkedin.com/v2/ugcPosts"
  59.   type :POST
  60.   parameters:params + ""
  61.   headers:headersMap
  62.   detailed:true
  63.   ];
  64.   info createPost;
  65.  }
  66.  else
  67.  {
  68.   return {"text":createPost.get("responseText").get("message"),"card":{"theme":"10"}};
  69.  }
  70. }
  71. if(createPost.get("responseCode") == 201)
  72. {
  73.  return {"text":"Post created successfully","type":"banner","status":"success"};
  74. }
  75. else
  76. {
  77.  return {"text":createPost.get("responseText").get("message"),"card":{"theme":"10"}};
  78. }
  79. return Map();
  • That's it! You can now use the command you created in Step 2 to post directly on LinkedIn from Zoho Cliq.
We hope this guide was helpful. Now, you can post on LinkedIn without leaving Zoho Cliq. Happy posting! 

    Zoho Desk Resources

    • Desk Community Learning Series


    • Digest


    • Functions


    • Meetups


    • Kbase


    • Resources


    • Glossary


    • Desk Marketplace


    • MVP Corner


    • Word of the Day


      • Sticky Posts

      • New in Zoho Chat: Threaded conversation at its finest best

        Perform effective team communication in Zoho Chat with our new 'Reply' option.   Converse and stay focussed on the parent conversation, rather than getting entangled in the web of several, never-ending sub threads.   To reply to a certain message, all you need to do is hover to the left hand side of the message. Then, click on the three dots to open a pop up menu. Here, click on the Reply button and type the reply to the message in the compose box and press Enter.   Voila, that was pretty simple. 
      • Changes in Cliq iOS app notification due to iOS 13 and Xcode 11

        Hello everyone! With the iOS 13 update, Apple has updated its policy on usage of VoIP push notifications. Over the past few months, we tried our best to provide a similar experience with the updated policy.  Changes in iOS 13:  With iOS 13, Apple mandates all VoIP push notifications to be reported to the CallKit framework as a new call. If a VoIP push notification is not reported to the CallKit within a designated time window, iOS will terminate the app. If enough VoIP push notifications are not
      • What's new in Zoho Cliq - June 2020 updates

        Hello again, everyone! I'm back to share with you the recent feature improvements and updates that we've pulled together for enhancing your experience in Cliq. Here's what's new this June for you all in Cliq's web and iOS app! New on Cliq Web: Drag and drop files to a chat in your left side panel   Now you can drag and drop attachments from your open conversation window to a specific chat or channel in the left side menu without opening it. Swift up actions and collaborate efficiently with Cliq's
      • 4 Things You Should Do Once You Get Started with Cliq

        Hey there, new user!  You've successfully logged in and set up your organization and you're all set to start working. What's next? Buckle up because here are 4 essential things you need to do first in order to get the most out of your Cliq experience:   1. Invite your colleagues   Now that you've set up your Cliq for business, you need to bring in all your employees, of course, because how else can you collaborate with them?   To invite your colleagues to Cliq, head on over to the Admin Panel which
      • New in Zoho Chat : Search for contacts, files, links & conversations with the all new powerful 'Smart Search' bar.

        With the newly revamped 'Smart Search' bar in Zoho Chat, we have made your search for contacts, chats, files and links super quick and easy using Search Quantifiers.   Search for a contact or specific conversations using quantifiers, such as, from: @user_name - to find chats or channel conversations received from a specific user. to: @user_name - to find chats or channel conversations sent to a specific user. in: #channel_name - to find a particular instance in a channel. in: #chat_name - to find

      Zoho CRM Plus Resources

        Zoho Books Resources


          Zoho Subscriptions Resources

            Zoho Projects Resources


              Zoho Sprints Resources


                Zoho Orchestly Resources


                  Zoho Creator Resources


                    Zoho WorkDrive Resources



                      Zoho Campaigns Resources

                        Zoho CRM Resources

                        • CRM Community Learning Series

                          CRM Community Learning Series


                        • Tips

                          Tips

                        • Functions

                          Functions

                        • Meetups

                          Meetups

                        • Kbase

                          Kbase

                        • Resources

                          Resources

                        • Digest

                          Digest

                        • CRM Marketplace

                          CRM Marketplace

                        • MVP Corner

                          MVP Corner




                          Zoho Writer Writer

                          Get Started. Write Away!

                          Writer is a powerful online word processor, designed for collaborative work.

                            Zoho CRM コンテンツ




                              ご検討中の方