Skip to main content
Solved

Webhook events FILE_UPDATE and FILE_COMMENT not working


Daniel_Schwartz1

When I delete a file, I’m getting a response, but when I use FILE_COMMENT or FILE_UPDATE, I’m not getting a response. My code is below. Am I doing something wrong or this is broken? Appreciate any help!

import express from "express";
import bodyParser from "body-parser";
import crypto from "crypto";
import fetch from "node-fetch";
import ngrok from "ngrok";

const PORT = 3000;
const app = express();
const passcode = crypto.randomBytes(48).toString("hex");

app.use(bodyParser.json());

app.post("/", (request, response) => {
  console.log("helo");
  if (request.body.passcode === passcode) {
    console.log("Posted");
    console.log(request.body);
    const { file_name, timestamp } = request.body;
    console.log(`${file_name} was updated at ${timestamp}`);
    response.sendStatus(200);
  } else {
    response.sendStatus(403);
  }
});

app.listen(PORT, () => console.log(`🚀 Server running on port ${PORT}`));

ngrok.connect(PORT).then(async (endpoint: any) => {
  const params: any = {
    event_type: "FILE_COMMENT",
    team_id: "1201202467225990766",
    passcode: passcode,
    endpoint,
  };
  const options = {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      "X-Figma-Token": "figd_xaoeUzYV5187C7uKfLUZdlBhg7V_RgAA1IpIfwud",
    },
    body: JSON.stringify(params),
  };
  const response = await fetch("https://api.figma.com/v2/webhooks/", options);
  const json = await response.json();
  console.log(json);
});

Best answer by Celine_

Hey everyone,
Thank you for flagging this! Our engineering team is aware of this issue, and good news, we’ve implemented a fix! Can you please let us know if the situation has improved on your end? Thank you

View original
This topic has been closed for comments

10 replies

Denys_Prokhorin

Hey , also got similar issue with FILE_COMMENT webhook. I’ve created ticket , and waiting for updates from support team 🙂


  • 1 reply
  • April 17, 2023

same issue, only can receive FILE_UPDATE and COMMENT on a specific file.any update?


Hello, any update from support team?


Denys_Prokhorin

Hi, yup .
Our engineering team has been investigating the issue, but to be transparent, due to a shortage of staff and the complexity of the issue, we regret to inform you that we won’t be able to resolve it anytime soon.

And weird thing , that I’ve found . If I subscribe to a file from the slack integration my custom FILE_COMMENT webhook will also trigger for this file .


Having the same issue…any updates on this?


Celine_
Figmate
  • Community Support
  • 3532 replies
  • November 30, 2023

Hey there,
After checking internally, I saw in our backend that it is a long standing bug that our engineering team has been investigating the issue. But to be transparent, due to a shortage of staff and the complexity of the issue, we regret to inform you that we won’t be able to resolve it anytime soon.
However, please be assured that our team will continue to actively look into the issue and we will reach out to you once we have any further updates.

We truly appreciate your patience and understanding during this time!

In the meantime, please reach out to the support team so we can collect some addionnal data by filling a form here: https://help.figma.com/hc/en-us/requests/new


  • 2 replies
  • December 1, 2023

This is broken for me as well, and a crucial part of our business.


  • 2 replies
  • December 1, 2023

It had been working for me for about 2 weeks, then all the sudden stopped.


Matan_Arbel

We’ve been having issues with webhooks not being very stable as well.
sometimes sending multiple hooks for the same event or not sending anything


Celine_
Figmate
  • Community Support
  • 3532 replies
  • Answer
  • December 6, 2023

Hey everyone,
Thank you for flagging this! Our engineering team is aware of this issue, and good news, we’ve implemented a fix! Can you please let us know if the situation has improved on your end? Thank you


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings