GithubHelp home page GithubHelp logo

sendgrid-parse-api-example's People

Contributors

motdotla avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sendgrid-parse-api-example's Issues

SendGrid API Key

Can you add code to use bearer / Token instead of basic authentication?

Receiving duplicate emails when using sendgrid inbound parse

Sorry if this isn't the best forum, but I'm not sure how else to reach sendgrid developers.

The issue is I'm the same email multiple times. I built a simply example, end-to-end of receiving inbound email via sendgrid's parse, calling my webhook, which then stores the payload into an air table. You can see the results here:
Screen Shot 2021-09-21 at 10 16 45 AM

On the sender's end, I receive no bounce messages. Not sure if there's anything I can do on my end to fix this but any suggestions would be appreciated!

Inbound Google function parse attacment issue

Hi, i have an isuue with GF parsing attachment emails, i am not able even check if attachments was arrived, here is my nodejs function


app.post('', async function(req, res) {
 
  try {

    if (req.method === 'POST') {
      const busboy = new Busboy({ headers: req.headers, limits: 50000000 });
      const uploads = {};
      const body = {};


      busboy.on('field', (fieldname, val) => { 
        body[fieldname] = val;
      });
      const tmpdir = os.tmpdir();
      const fileWrites = [];
  
      busboy.on('file', (fieldname, file, filename) => {
        const filepath = path.join(tmpdir, filename); 
        uploads[fieldname] = {
          filename: filename || file.name || 'temp.temp',
          filepath,
          file,
        };

        const writeStream = fs.createWriteStream(filepath);
        file.pipe(writeStream);
 
        const promise = new Promise((resolve, reject) => {
          file.on('end', () => {
            writeStream.end();
          });
          writeStream.on('finish', resolve);
          writeStream.on('error', reject);
        });
        fileWrites.push(promise);
      });
 
      busboy.on('finish', () => {
        Promise.all(fileWrites).then(async () => { 
          try {

         //uploads always are empty
          } catch (e) {
            console.log(e);
          }
           
        });
      });
 

      busboy.end(req.rawBody || req.body);
    } else { 
      res.status(405).send({ error: 'ONLY POST' });
    }

    console.log('Start logging--', req.body);


  } catch (e) {
    console.log(e);
    res.status(400).send(e.message || e);
  }
});

Can you help to find out the issue?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.