Skip to content
CopyPost blog
EN
Open CopyPost

Scenario · webhooks

The post is out in the channel — and it's already in your CRM

Usually, after a post is published, someone still has to carry it over by hand: into the CRM as a lead, onto the website as news, into the catalog as a product card. CopyPost does it by itself — you write in the channel as before, and on the other side a lead, a news item or a product appears.

Your channelTelegramSignatureYour CRMnew leadsnew
The post leaves the channel with CopyPost's digital signature — and a new card appears in the CRM.

Set it up once

In CopyPost it takes a few minutes (all you need is the address to send posts to). After that you just run your channel, and the CRM or the site fills up without you.

  1. Add the addressIn the Webhooks section (“Вебхуки”), paste the address of the CRM or site where posts should arrive — you'll get it from the developer who sets up the CRM or site to accept posts from CopyPost. The main thing is that the address is reachable from the internet.
  2. Tick it in the pipelineSwitch this address on (in the panel it's called a webhook) in the pipeline — the “from where → to where” rule — that reads your channel. Filters and replacements run before sending, so the text arrives already clean.
  3. That's itNow every new post comes to you by itself: the text with its formatting (bold, italics, links), and photos and videos as links to the files (a link works for a week, so the site should save the file on its side). An album usually arrives in one delivery — unless Telegram holds up some of the photos, and then the late ones come in the next.

Where the posts end up

What to do with the post next is up to your system. Most often it's one of three things.

A lead in the CRM

If the channel posts listings, job openings or orders, every post becomes a card on a manager's desk — and nobody has to sit and carry them over by hand anymore.

News on the website

The site's News section updates itself: a post comes out in the channel, and almost at once it's on the site — with the same photos and the same text.

A product in the catalog

You post a new arrival in the shop's channel — and the site already has a product card, with the photo and description straight from the post.

The site won't accept posts that didn't come from CopyPost

CopyPost signs every delivery with your webhook's secret (a key that only CopyPost and your site know) — it's a digital signature, and it isn't visible in the post itself. The site checks the signature and the send time and accepts only what really came from CopyPost, and throws away a forgery or an old delivery that someone decided to send again.

The secret is in the Webhooks section: copy it and give it to whoever sets up the site — they'll add the signature check on their side.

For the developer: the HMAC-SHA256 signature is in the X-CopyPost-Signature header, the send time in X-CopyPost-Timestamp. A verification example is in the guide.

A post from your channeltext: “New this week”photo: link to the filechannel: your channelsignature: ● ● ● ● ●COPYPOSTsignature valid

If the server doesn't answer

Sometimes the hosting is down for a minute or the CRM is in the middle of an update — the post won't be lost, as long as the server comes back within about twelve minutes. If the server doesn't answer within 15 seconds, says it's busy or fails with an error on its end, CopyPost tries again after 1 second, then after 5 and 30 seconds, after 2 minutes and after 10 (as in the old joke about the programmer who puts two glasses on his nightstand before bed: a full one in case he gets thirsty, and an empty one in case he doesn't).

One request for your server: have it answer “accepted” right away and do all the long processing after the answer (otherwise after 15 seconds CopyPost decides there's no answer and sends the same post again).

Delivery board · example
#WhenServer response
1at onceno answer
2after 1 sbusy
3after 5 saccepted
…30 s, 2 min, 10 minin reserve in case the server stays silent longer

Both to the channel and to the site

A pipeline that copies a source's posts to your Telegram channels can right away send them to the server as well, so you don't have to choose: one post gives you copies in the channels, a lead in the CRM and a news item on the site.

You can attach up to 16 webhooks to one pipeline — say, the CRM and the site together. Or you can send posts only to the server, with no recipient channels at all.

SourceYour channelYour site

A thousand deliveries a month — free

One delivery is one post sent to one address (an album that arrived in one delivery counts as one too, and a post that went to both the CRM and the site counts as two). For a small channel the free thousand a month is usually more than enough.

1,000deliveries a month — free

+10,000 for 231 ⭐if that's not enough — a pack for 30 days, paid in Telegram Stars

How many have gone out so far is shown on the Plan page (“Тариф”) in the panel.

Try it on your next post

Connect a channel and add the address of your CRM or site — the next post you publish will already arrive there.