Moar Automation in DevRel - Build a Trip Reports System
Tags: api, productivity, devrel, postman
Published: 2022-05-31 10:00:03

---
title: Moar Automation in DevRel - Build a Trip Reports System
published: true
description: Making the right decisions is important, in Developer Relations as in any other business. How can we use data for something that usually is a biased gut feeling decision?
tags: api, productivity, devrel, postman
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s7lzejyheeorve9et1px.png
---

TL;DR I've built a [priority event list](https://dev.to/postman/a-devrel-approach-to-prioritising-events-3d7m) and an assessment logic and now we need to also report back and use that feedback for extended assessment. Here's what I want to come up with, a trip report database connected to our events database, a collection mechanism as well as a standardised assessment. You can build something like that yourself. Here's the scaffold. 

## Why would I want a trip reports system?

The core idea of a trip reports and why we want to collect them in a database is to 
 - capture the feedback while it is still fresh,
 - use a standardised matrix,
 - aggregate multiple assessments if available,
 - analyse and compare the data i.e. evaluate the trip,
 - make an educated decision for future trips.

## What tools should I use?

You could just use about anything. An Excel list, Notion, SQL Server, Salesforce. Whatever.
The simplest and most automate-able approach for us was to use AirTable and its native forms for collecting the data. That's mainly because we already have our [priority event list](https://dev.to/postman/a-devrel-approach-to-prioritising-events-3d7m) on AirTable, and we also automated quite a bit through [AirTable's great API](https://airtable.com/api) and [Postman Monitors](https://learning.postman.com/docs/monitoring-your-api/intro-monitors/). We can access and modify any data in our "Base" and also use things like webhooks. And when the tools in our belt don't suffice, there's always [Zapier](https://zapier.com/app/dashboard), like in this example, where I built a [Slack bot that is looking up events in AirTable through comparing URLs](https://dev.to/postman/moar-automation-in-devrel-build-a-slack-bot-that-notifies-you-about-relevant-devto-articles-4pki).
When you use AirTable's forms, you can look up entries in the same base, e.g. a person can select themselves from a roster, so the newly created entry is directly matched to a unique person. Same is true for the events, the trip report shall belong to. That's somethign that I wasn't yet able to realise with other survey tools like TypeForm. I like the flow and optics of TypeForm much more than the AirTable forms, but when it comes to functionality, pun is intended, form follows function. 

![Screenshot of an AirTable form that shows a select field listing the author and a selection window for existing events that you could choose from](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ule67zfkqycwf8qnlzi7.png)

## What feedback should I gather?

Initially I thought this would only be for developer advocates, as they are the ones that go to conferences, speak there, interact with attendees and staff a booth. But after some social surveying on Twitter I realised this should be more wholesome.

{% embed https://twitter.com/jansche/status/1526199607251947521 %}

People mostly commented that we need more than numbers, "it was 3/5 on site" would just not suffice. They also mentioned that for making a recommendation for next year, we should also note down how the collaboration with the organisers went.

I knew this would be a compromise. We want feedback as unbiased as possible, in a standard rating scheme, involving as many voices from as many roles as possible, AND also hear individual opinions in a free-form text? Not to mention it shouldn't be bloated as nobody likes filling out surveys. Oof.

## The compromise 

Here's the fields that we currently collect. Not all of them need to be filled by every reportee (e.g. Budget Committed or Registrants). Then some of us like to write a wrap-up on our wiki as well.

- Reportee Name (selector from Lookup)
- Event Type (conference or meetup)
- Event Name (selector from Lookup)
- Budget Committed (number)
- # of Touchpoints (number)
- # of Attendees (number)
- # of Registrations (number)
- Y/N Competition on site (boolean)
- Y/N Product Feedback Gathered (boolean)
- 1-5 Swag Effectiveness (scale)
- 1-5 New Relationships Created (scale)
- 1-5 Social Engagement (scale)
- 1-5 Good Experience (scale)
- # of Partnerships created  (number)
- Link to full report if any (url)
- Y/N individual recommendation (boolean)
- comments (long text)

## The automation part

For making educated decisions about re-engaging on an event the next time, we need to transform these answers into numbers. Or one number (a score) and an average of Yes/No (a recommendation). Let's do this on AirTable, here's a stripped down example how you could create this score for the trip report entry:

```javascript
console.log(`Starting assessment on ${base.name}.`);
// change these names to pick a view:
let table = base.getTable('Trip Reports');
let view = table.getView('DATA COMPLETE');
let result = await view.selectRecordsAsync();
let score;

for (let record of result.records) {
    // change the field names here to adapt this script to your base

    let costPerLead = 0;
    let footTraffic = "low";
    let competitiveIntel = false;
    let productFeedback = false;
    let swagEffectiveness = "low";
    let relationshipsBuilt = "low";
    let twitterEngagement = "low";
    let numPartnershipsFormed = 0;
    let numOps = 0;
    let goodExperience = "low";

    score = 0;

    if (record.getCellValue('Foot Traffic')) footTraffic = record.getCellValue('Foot Traffic').name;
    if (footTraffic == "high") score += 15;
    else if (footTraffic == "medium") score += 10;
    else score += 5;

    if (record.getCellValue('Competitive Intel')) competitiveIntel = record.getCellValue('Competitive Intel');
    if (competitiveIntel) score += 8;
    else score += 0;

    if (record.getCellValue('Product Feedback')) productFeedback = record.getCellValue('Product Feedback');
    if (productFeedback) score += 8;
    else score += 0;

    if (record.getCellValue('Swag Effectiveness')) swagEffectiveness = record.getCellValue('Swag Effectiveness').name;
    if (swagEffectiveness == "high") score += 0;
    else if (swagEffectiveness == "medium") score += 0;
    else score += 0;

    if (record.getCellValue('Relationships Built')) relationshipsBuilt = record.getCellValue('Relationships Built').name;
    if (relationshipsBuilt == "high") score += 15;
    else if (relationshipsBuilt == "medium") score += 10;
    else score += 0;

    if (record.getCellValue('Twitter Engagement')) twitterEngagement = record.getCellValue('Twitter Engagement').name;
    if (twitterEngagement == "high") score += 2;
    else if (twitterEngagement == "medium") score += 1;
    else score += 0;

    if (record.getCellValue('Good Experience')) goodExperience = record.getCellValue('Good Experience').name;
    if (goodExperience == "high") score += 2;
    else if (goodExperience == "medium") score += 1;
    else score += 0;


    await table.updateRecordAsync(record, {
        'Score': score,
    }); 
```

This is copy/paste/delete-some, so expect this code to not run as-is. It should just demonstrate what we're doing to get to comparable numbers.

Once you have this score from a number of trip reports, you can calculate an average or median to feed back into your main event database. Et voila, having this generated assessment on the main entry, it can go into decision making through MOAR AUTOMATIONS!

Stay safe, folks, and let me know what you do for automations in the comments below. <3