DEV Community

Cover image for Post Reddit posts on Instagram with a simple like on Discord. You will love Webhooks! πŸͺ
Neetigya Chahar
Neetigya Chahar

Posted on • Edited on

Post Reddit posts on Instagram with a simple like on Discord. You will love Webhooks! πŸͺ

Hello guys, my first post here. In this post I want to talk about how cool can web hooks be! so lets get started...

What is a web hook?

webhook flowchart

Simply said, it as an application to application communication based on an event.

In the context of event-driven communication, an "application" can be any software or service that performs specific tasks. Here are a few examples:

  1. E-commerce Platform: When a customer places an order, the e-commerce platform (like Amazon) can send a webhook to the warehouse management system to start processing the order.

  2. Payment Gateway: When a payment is successfully processed, the payment gateway (like PayPal) can send a webhook to the merchant's system to confirm the transaction and update the order status.

  3. Social Media: When someone posts a new tweet, Twitter can send a webhook to a third-party application that tracks social media mentions for a brand.

  4. Continuous Integration (CI) System: When code is pushed to a repository, a CI system (like Jenkins) can send a webhook to trigger automated tests and deployments.

  5. Customer Support System: When a new support ticket is created, the customer support system (like Zendesk) can send a webhook to a Slack channel to notify the support team.

What are some social media platforms that provide web hooks?

well, all.

  • WhatsApp Business Platform Webhooks includes notifications for messages, message status, message templates, contacts, etc.
  • Webhooks - Instagram platform includes notifications for new posts, comments, mentions, direct messages, and story insights.
  • Discord Webhooks allows you to manage reaction roles, automate messages, create custom embeds, send personalized bot messages, post RSS feed updates, etc.
  • Telegram Bot API notifies you about new messages, edited messages, channel posts, inline query results, callback queries, user joins/leaves, poll updates, and payments.
  • Slack webhooks can handle events like messages, reactions, channel activities, user status changes, file actions, app updates, team profile updates, etc.

No-code web automation platforms

Platforms like zapier & ifttt allow users to create automated workflows between different apps and services without needing to write any code. These platforms use event triggers from various platforms and provide customisable flow creation by triggering an api call that does an action. Basically they provide webhooks to web apis customizable integration. Obviously, you can always implement your own server functions.

This flexibility is immensely powerful. You can map any event trigger to any API which is provided by various platforms. Here are few examples:

  1. Social Media Automation:

    • Monitor Twitter for Keywords: Automatically track specific keywords or hashtags on Twitter and compile them into a daily digest for review. This is great for staying on top of industry trends or monitoring brand mentions.
  2. Lead Management:

    • Capture and Nurture Leads: When a new lead fills out a form on your website, Zapier can automatically add their details to your CRM, send a personalized welcome email, and create a follow-up task in your project management toolΒ³.
  3. Content Curation:

    • Share Randomized Links: Use Zapier to pick a random tool or article from a spreadsheet and share it on your social media channels. This keeps your content fresh and engaging without manual effort.
  4. Customer Support:

    • Automate Ticket Creation: When a customer submits a support request via email or a form, Zapier can create a ticket in your helpdesk software, notify the support team in Slack, and log the request in a spreadsheet for tracking.
  5. Project Management:

    • Task Automation: Automatically create tasks in your project management tool when certain conditions are met, such as when a new project is started or when a specific email is received. This ensures nothing falls through the cracks and keeps your team organized.

So what did I do?

I created a web flow with the following steps:

  1. Watch for reddit trending posts from subReddits and search results.
  2. List them to a Discord server.
  3. I manually review the posts, and give a reaction (thumbs up in this case) to the posts that I approve.
  4. Then I use ChatGPT to generate an engaging caption with a good prompt.
  5. Then the post with that media is posted on Instagram.

I felt that was cool. You can monitor trending posts on a platform, Reddit here, in a single thread and approve the ones you like and those can directly be shared to Instagram. I could even trigger different flows based on different reactions to the post.

Remember, it is always important to respect copyright policies.

This a collector flow which will collect posts and send them to Discord server.
Post collector flow

This is a flow to trigger posts with AI generated caption

Instagram publish flow

Once you have explored, implemented and tested a flow on these platforms, you can always go ahead and implement it in code and host it on a server or a server-less function.

Hope you learnt something new!
Happy learning & coding! πŸš€

Top comments (0)