← Async Interview + Mews integrations

Update Reservation with Mews API on New Interview Response from Async Interview API

Pipedream makes it easy to connect APIs for Mews, Async Interview and 2,800+ other apps remarkably fast.

Trigger workflow on
New Interview Response from the Async Interview API
Next, do this
Update Reservation with the Mews API
No credit card required
Intro to Pipedream
Watch us build a workflow
Watch us build a workflow
8 min
Watch now ➜

Trusted by 1,000,000+ developers from startups to Fortune 500 companies

Adyen logo
Appcues logo
Bandwidth logo
Checkr logo
ChartMogul logo
Dataminr logo
Gopuff logo
Gorgias logo
LinkedIn logo
Logitech logo
Replicated logo
Rudderstack logo
SAS logo
Scale AI logo
Webflow logo
Warner Bros. logo
Adyen logo
Appcues logo
Bandwidth logo
Checkr logo
ChartMogul logo
Dataminr logo
Gopuff logo
Gorgias logo
LinkedIn logo
Logitech logo
Replicated logo
Rudderstack logo
SAS logo
Scale AI logo
Webflow logo
Warner Bros. logo

Developers Pipedream

Getting Started

This integration creates a workflow with a Async Interview trigger and Mews action. When you configure and deploy the workflow, it will run on Pipedream's servers 24x7 for free.

  1. Select this integration
  2. Configure the New Interview Response trigger
    1. Connect your Async Interview account
    2. Configure timer
  3. Configure the Update Reservation action
    1. Connect your Mews account
    2. Optional- Configure Reason
    3. Optional- Configure Reprice
    4. Optional- Configure Apply Cancellation Fee
    5. Select a Reservation ID
    6. Optional- Configure Channel Number
    7. Optional- Configure Start UTC
    8. Optional- Configure End UTC
    9. Optional- Configure Released UTC
    10. Optional- Configure Person Counts
    11. Optional- Configure Assigned Resource ID
    12. Optional- Configure Requested Category ID
    13. Optional- Select a Travel Agency ID
    14. Optional- Select a Company ID
    15. Optional- Select a Business Segment ID
    16. Optional- Configure Purpose
    17. Optional- Select a Rate ID
    18. Optional- Select a Credit Card ID
    19. Optional- Configure Time Unit Prices
    20. Select a Booker ID
    21. Optional- Configure Assigned Resource Locked
    22. Optional- Select a Availability Block ID
    23. Optional- Configure Options Owner Checked In
  4. Deploy the workflow
  5. Send a test event to validate your setup
  6. Turn on the trigger

Details

This integration uses pre-built, source-available components from Pipedream's GitHub repo. These components are developed by Pipedream and the community, and verified and maintained by Pipedream.

To contribute an update to an existing component or create a new component, create a PR on GitHub. If you're new to Pipedream component development, you can start with quickstarts for trigger span and action development, and then review the component API reference.

Trigger

Description:Emit new event when a new interview response is received.
Version:0.0.1
Key:async_interview-new-interview-response

Async Interview Overview

The Async Interview API enables automation around video interview processes. With this API, you can craft workflows on Pipedream that manipulate interview data, initiate new interviews, and respond to events within the Async Interview platform. Pipedream's serverless architecture allows you to connect with hundreds of apps to streamline recruitment workflows, analyze interview data, or enhance the candidate experience with personalized interactions.

Trigger Code

import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform";
import asyncInterview from "../../async_interview.app.mjs";
import sampleEmit from "./test-event.mjs";

export default {
  key: "async_interview-new-interview-response",
  name: "New Interview Response",
  description: "Emit new event when a new interview response is received.",
  version: "0.0.1",
  type: "source",
  dedupe: "unique",
  props: {
    asyncInterview,
    db: "$.service.db",
    timer: {
      type: "$.interface.timer",
      default: {
        intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL,
      },
    },
  },
  methods: {
    _getLastId() {
      return this.db.get("lastId") || 0;
    },
    _setLastId(lastId) {
      this.db.set("lastId", lastId);
    },
    generateMeta(event) {
      return {
        id: event.id,
        summary: `New interview response with ID ${event.id}`,
        ts: Date.parse(event.datetime),
      };
    },
    async startEvent(maxResults = 0) {
      const lastId = this._getLastId();

      let data = await this.asyncInterview.listInterviewResponses();

      data = data.filter((item) => item.id > lastId).reverse();

      if (maxResults && (data.length > maxResults)) data.length = maxResults;
      if (data.length) this._setLastId(data[0].id);

      for (const item of data.reverse()) {
        this.$emit(item, this.generateMeta(item));
      }
    },
  },
  hooks: {
    async deploy() {
      await this.startEvent(25);
    },
  },
  async run() {
    await this.startEvent();
  },
  sampleEmit,
};

Trigger Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI and CLI.
LabelPropTypeDescription
Async InterviewasyncInterviewappThis component uses the Async Interview app.
N/Adb$.service.dbThis component uses $.service.db to maintain state between executions.
timer$.interface.timer

Trigger Authentication

Async Interview uses API keys for authentication. When you connect your Async Interview account, Pipedream securely stores the keys so you can easily authenticate to Async Interview APIs in both code and no-code steps.

About Async Interview

Async Interview is the world’s most advanced video interviewing platform, offering pre-recorded interviews customized to meet any recruitment scenario.

Action

Description:Update an existing reservation in Mews. [See the documentation](https://mews-systems.gitbook.io/connector-api/operations/reservations#update-reservations)
Version:0.0.2
Key:mews-update-reservation

Mews Overview

The Mews API is a gateway for developers to interact with the Mews hospitality platform, allowing for innovative connections and automations between hotel management systems and other software tools. By using Pipedream, you can create custom workflows that automate repetitive tasks, integrate with numerous third-party services, and manipulate data to suit specific needs within the hospitality industry. The combination of Mews' API and Pipedream's serverless execution model paves the way for enhanced guest experiences, optimized operations, and real-time data handling.

Action Code

import { ConfigurationError } from "@pipedream/platform";
import app from "../../mews.app.mjs";
import utils from "../../common/utils.mjs";

export default {
  name: "Update Reservation",
  description: "Update an existing reservation in Mews. [See the documentation](https://mews-systems.gitbook.io/connector-api/operations/reservations#update-reservations)",
  key: "mews-update-reservation",
  version: "0.0.2",
  type: "action",
  props: {
    app,
    reason: {
      type: "string",
      label: "Reason",
      description: "Reason for updating the reservation. Required when updating the price of the reservation.",
      optional: true,
    },
    reprice: {
      type: "boolean",
      label: "Reprice",
      description: "Whether the price should be updated to latest value for date/rate/category combination set in Mews. If not specified, the reservation price is updated.",
      optional: true,
    },
    applyCancellationFee: {
      type: "boolean",
      label: "Apply Cancellation Fee",
      description: "Whether the cancellation fees should be applied according to rate cancellation policies. If not specified, the cancellation fees are applied.",
      optional: true,
    },
    reservationId: {
      propDefinition: [
        app,
        "reservationId",
      ],
      description: "Unique identifier of the reservation.",
    },
    channelNumber: {
      type: "string",
      label: "Channel Number",
      description: "Number of the reservation within the Channel (i.e. OTA, GDS, CRS, etc) in case the reservation group originates there (e.g. Booking.com confirmation number)",
      optional: true,
    },
    startUtc: {
      type: "string",
      label: "Start UTC",
      description: "Reservation start in UTC timezone in ISO 8601 format",
      optional: true,
    },
    endUtc: {
      type: "string",
      label: "End UTC",
      description: "Reservation end in UTC timezone in ISO 8601 format",
      optional: true,
    },
    releasedUtc: {
      type: "string",
      label: "Released UTC",
      description: "Date when the optional reservation is released in UTC timezone in ISO 8601 format",
      optional: true,
    },
    personCounts: {
      type: "string[]",
      label: "Person Counts",
      description: `Number of people per age category the reservation is for. If supplied, the person counts will be replaced. Each item should contain:
- \`AgeCategoryId\` (string, required): Unique identifier of the Age category
- \`Count\` (integer, required): Number of people of a given age category. Only positive value is accepted

Pass an array of person counts or null if the person counts should not be updated.

**Example:**
\`\`\`json
[
  {
    "AgeCategoryId": "12345678-1234-1234-1234-123456789012",
    "Count": 2
  },
  {
    "AgeCategoryId": "87654321-4321-4321-4321-210987654321",
    "Count": 1
  }
]
\`\`\``,
      optional: true,
    },
    assignedResourceId: {
      type: "string",
      label: "Assigned Resource ID",
      description: "Identifier of the assigned Resource. If the assigned resource is locked, see AssignedResourceLocked for updating the assigned resource.",
      optional: true,
    },
    requestedCategoryId: {
      type: "string",
      label: "Requested Category ID",
      description: "Identifier of the requested ResourceCategory",
      optional: true,
    },
    travelAgencyId: {
      label: "Travel Agency ID",
      description: "Identifier of the Travel Agency. (Company with a TravelAgencyContract)",
      propDefinition: [
        app,
        "companyId",
        () => ({
          filter: (company) => {
            return company.NchClassifications?.OnlineTravelAgency === true;
          },
        }),
      ],
      optional: true,
    },
    companyId: {
      propDefinition: [
        app,
        "companyId",
      ],
      description: "Unique identifier of Company.",
      optional: true,
    },
    businessSegmentId: {
      propDefinition: [
        app,
        "businessSegmentId",
      ],
      description: "Unique identifier of BusinessSegment.",
      optional: true,
    },
    purpose: {
      type: "string",
      label: "Purpose",
      description: "Purpose of the reservation",
      optional: true,
    },
    rateId: {
      propDefinition: [
        app,
        "rateId",
      ],
    },
    creditCardId: {
      propDefinition: [
        app,
        "creditCardId",
      ],
    },
    timeUnitPrices: {
      type: "string[]",
      label: "Time Unit Prices",
      description: `Prices for time units of the reservation. Each unit should contain:
- \`Index\` (integer, required): Index of the unit starting with 0 (e.g., first night has index 0)
- \`Amount\` (object, optional): Amount parameters including:
  - \`GrossValue\` (decimal, optional): Amount including tax (required for Gross Pricing environments)
  - \`NetValue\` (decimal, optional): Amount excluding tax (required for Net Pricing environments)
  - \`Currency\` (string, required): \`ISO-4217\` code of the currency
  - \`TaxCodes\` (array of strings, required): Codes of tax rates to be applied (note: only one tax when using \`GrossValue\`, multiple taxes with \`NetValue\`)

Pass an array of price units or null if the unit amounts should not be updated.

**Example:**
\`\`\`json
[
  {
    "Index": 0,
    "Amount": {
      "GrossValue": 100.00,
      "Currency": "EUR",
      "TaxCodes": ["VAT"]
    }
  },
  {
    "Index": 1,
    "Amount": {
      "NetValue": 85.00,
      "Currency": "EUR",
      "TaxCodes": ["VAT", "CityTax"]
    }
  }
]
\`\`\``,
      optional: true,
    },
    bookerId: {
      label: "Booker ID",
      description: "Identifier of the Customer on whose behalf the reservation was made.",
      propDefinition: [
        app,
        "customerId",
      ],
    },
    assignedResourceLocked: {
      type: "boolean",
      label: "Assigned Resource Locked",
      description: "Whether the reservation should be locked to the assigned Resource. To reassign the reservation to a new Resource, first set AssignedResourceLocked to false to unlock the resource. Then, assign the reservation to a new Resource by setting AssignedResourceId to the new resource ID.",
      optional: true,
    },
    availabilityBlockId: {
      propDefinition: [
        app,
        "availabilityBlockId",
      ],
    },
    optionsOwnerCheckedIn: {
      type: "boolean",
      label: "Options Owner Checked In",
      description: "Whether the owner of the reservation has checked in.",
      optional: true,
    },
  },
  async run({ $ }) {
    const {
      app,
      reason,
      reprice,
      applyCancellationFee,
      reservationId,
      channelNumber,
      startUtc,
      endUtc,
      releasedUtc,
      personCounts,
      assignedResourceId,
      requestedCategoryId,
      travelAgencyId,
      companyId,
      businessSegmentId,
      purpose,
      rateId,
      creditCardId,
      timeUnitPrices,
      bookerId,
      assignedResourceLocked,
      availabilityBlockId,
      optionsOwnerCheckedIn,
    } = this;

    // Parse arrays
    const parsedPersonCounts = personCounts
      ? utils.parseArray(personCounts)
      : undefined;
    const parsedTimeUnitPrices = timeUnitPrices
      ? utils.parseArray(timeUnitPrices)
      : undefined;

    // Validate arrays
    if (parsedPersonCounts && !Array.isArray(parsedPersonCounts)) {
      throw new ConfigurationError("**Person Counts** must be an array when provided");
    }

    if (parsedTimeUnitPrices && !Array.isArray(parsedTimeUnitPrices)) {
      throw new ConfigurationError("**Time Unit Prices** must be an array when provided");
    }

    const response = await app.reservationsUpdate({
      $,
      data: {
        Reason: reason,
        Reprice: reprice,
        ApplyCancellationFee: applyCancellationFee,
        ReservationUpdates: [
          {
            ReservationId: reservationId,
            ...(channelNumber && {
              ChannelNumber: {
                Value: channelNumber,
              },
            }),
            ...(startUtc && {
              StartUtc: {
                Value: startUtc,
              },
            }),
            ...(endUtc && {
              EndUtc: {
                Value: endUtc,
              },
            }),
            ...(releasedUtc && {
              ReleasedUtc: {
                Value: releasedUtc,
              },
            }),
            ...(parsedPersonCounts && {
              PersonCounts: {
                Value: parsedPersonCounts,
              },
            }),
            ...(assignedResourceId && {
              AssignedResourceId: {
                Value: assignedResourceId,
              },
            }),
            ...(requestedCategoryId && {
              RequestedCategoryId: {
                Value: requestedCategoryId,
              },
            }),
            ...(travelAgencyId && {
              TravelAgencyId: {
                Value: travelAgencyId,
              },
            }),
            ...(companyId && {
              CompanyId: {
                Value: companyId,
              },
            }),
            ...(businessSegmentId && {
              BusinessSegmentId: {
                Value: businessSegmentId,
              },
            }),
            ...(purpose && {
              Purpose: {
                Value: purpose,
              },
            }),
            ...(rateId && {
              RateId: {
                Value: rateId,
              },
            }),
            ...(creditCardId && {
              CreditCardId: {
                Value: creditCardId,
              },
            }),
            ...(parsedTimeUnitPrices && {
              TimeUnitPrices: {
                Value: parsedTimeUnitPrices,
              },
            }),
            ...(bookerId && {
              BookerId: {
                Value: bookerId,
              },
            }),
            ...(assignedResourceLocked !== undefined && {
              AssignedResourceLocked: {
                Value: assignedResourceLocked,
              },
            }),
            ...(availabilityBlockId && {
              AvailabilityBlockId: {
                Value: availabilityBlockId,
              },
            }),
            ...(optionsOwnerCheckedIn !== undefined && {
              Options: {
                OwnerCheckedIn: {
                  Value: optionsOwnerCheckedIn,
                },
              },
            }),
          },
        ],
      },
    });

    $.export("$summary", `Successfully updated reservation ${reservationId}`);
    return response;
  },
};

Action Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI.

LabelPropTypeDescription
MewsappappThis component uses the Mews app.
Reasonreasonstring

Reason for updating the reservation. Required when updating the price of the reservation.

Repricerepriceboolean

Whether the price should be updated to latest value for date/rate/category combination set in Mews. If not specified, the reservation price is updated.

Apply Cancellation FeeapplyCancellationFeeboolean

Whether the cancellation fees should be applied according to rate cancellation policies. If not specified, the cancellation fees are applied.

Reservation IDreservationIdstringSelect a value from the drop down menu.
Channel NumberchannelNumberstring

Number of the reservation within the Channel (i.e. OTA, GDS, CRS, etc) in case the reservation group originates there (e.g. Booking.com confirmation number)

Start UTCstartUtcstring

Reservation start in UTC timezone in ISO 8601 format

End UTCendUtcstring

Reservation end in UTC timezone in ISO 8601 format

Released UTCreleasedUtcstring

Date when the optional reservation is released in UTC timezone in ISO 8601 format

Person CountspersonCountsstring[]

Number of people per age category the reservation is for. If supplied, the person counts will be replaced. Each item should contain:

  • AgeCategoryId (string, required): Unique identifier of the Age category
  • Count (integer, required): Number of people of a given age category. Only positive value is accepted

Pass an array of person counts or null if the person counts should not be updated.

Example:

[
  {
    "AgeCategoryId": "12345678-1234-1234-1234-123456789012",
    "Count": 2
  },
  {
    "AgeCategoryId": "87654321-4321-4321-4321-210987654321",
    "Count": 1
  }
]
Assigned Resource IDassignedResourceIdstring

Identifier of the assigned Resource. If the assigned resource is locked, see AssignedResourceLocked for updating the assigned resource.

Requested Category IDrequestedCategoryIdstring

Identifier of the requested ResourceCategory

Travel Agency IDtravelAgencyIdstringSelect a value from the drop down menu.
Company IDcompanyIdstringSelect a value from the drop down menu.
Business Segment IDbusinessSegmentIdstringSelect a value from the drop down menu.
Purposepurposestring

Purpose of the reservation

Rate IDrateIdstringSelect a value from the drop down menu.
Credit Card IDcreditCardIdstringSelect a value from the drop down menu.
Time Unit PricestimeUnitPricesstring[]

Prices for time units of the reservation. Each unit should contain:

  • Index (integer, required): Index of the unit starting with 0 (e.g., first night has index 0)
  • Amount (object, optional): Amount parameters including:
    • GrossValue (decimal, optional): Amount including tax (required for Gross Pricing environments)
    • NetValue (decimal, optional): Amount excluding tax (required for Net Pricing environments)
    • Currency (string, required): ISO-4217 code of the currency
    • TaxCodes (array of strings, required): Codes of tax rates to be applied (note: only one tax when using GrossValue, multiple taxes with NetValue)

Pass an array of price units or null if the unit amounts should not be updated.

Example:

[
  {
    "Index": 0,
    "Amount": {
      "GrossValue": 100.00,
      "Currency": "EUR",
      "TaxCodes": ["VAT"]
    }
  },
  {
    "Index": 1,
    "Amount": {
      "NetValue": 85.00,
      "Currency": "EUR",
      "TaxCodes": ["VAT", "CityTax"]
    }
  }
]
Booker IDbookerIdstringSelect a value from the drop down menu.
Assigned Resource LockedassignedResourceLockedboolean

Whether the reservation should be locked to the assigned Resource. To reassign the reservation to a new Resource, first set AssignedResourceLocked to false to unlock the resource. Then, assign the reservation to a new Resource by setting AssignedResourceId to the new resource ID.

Availability Block IDavailabilityBlockIdstringSelect a value from the drop down menu.
Options Owner Checked InoptionsOwnerCheckedInboolean

Whether the owner of the reservation has checked in.

Action Authentication

Mews uses API keys for authentication. When you connect your Mews account, Pipedream securely stores the keys so you can easily authenticate to Mews APIs in both code and no-code steps.

About Mews

An innovative hospitality management cloud that empowers the modern hotelier to improve performance, maximize revenue, and provide remarkable guest experiences.

More Ways to Connect Mews + Async Interview

Cancel Reservation with Mews API on New Interview Response from Async Interview API
Async Interview + Mews
 
Try it
Create Reservation with Mews API on New Interview Response from Async Interview API
Async Interview + Mews
 
Try it
Fetch Reservations with Mews API on New Interview Response from Async Interview API
Async Interview + Mews
 
Try it
Fetch Order Items with Mews API on New Interview Response from Async Interview API
Async Interview + Mews
 
Try it
Fetch Customers with Mews API on New Interview Response from Async Interview API
Async Interview + Mews
 
Try it
New Interview Response from the Async Interview API

Emit new event when a new interview response is received.

 
Try it
New Closed Bill from the Mews API

Emit new event when a bill is closed

 
Try it
New Company from the Mews API

Emit new event when a company is created. See the documentation

 
Try it
New Customer from the Mews API

Emit new event when a customer is created. See the documentation

 
Try it
New Order Item Created from the Mews API

Emit new order items as they are created (polling). See the documentation

 
Try it
Add Customer with the Mews API

Adds a new customer to the system. See the documentation

 
Try it
Add Customer File with the Mews API

Add a customer file to the Mews system. See the documentation

 
Try it
Add Reservation Companion with the Mews API

Add a customer as a companion to a reservation. See the documentation

 
Try it
Add Reservation Product with the Mews API

Add a product to a reservation. See the documentation

 
Try it
Cancel Reservation with the Mews API

Cancel a reservation in Mews.

 
Try it

Explore Other Apps

1
-
24
of
2,800+
apps by most popular

HTTP / Webhook
HTTP / Webhook
Get a unique URL where you can send HTTP or webhook requests
Node
Node
Anything you can do with Node.js, you can do in a Pipedream workflow. This includes using most of npm's 400,000+ packages.
Python
Python
Anything you can do in Python can be done in a Pipedream Workflow. This includes using any of the 350,000+ PyPi packages available in your Python powered workflows.
Schedule
Schedule
Trigger workflows on an interval or cron schedule.
Pipedream Utils
Pipedream Utils
Utility functions to use within your Pipedream workflows
Notion
Notion
Notion is a new tool that blends your everyday work apps into one. It's the all-in-one workspace for you and your team.
OpenAI (ChatGPT)
OpenAI (ChatGPT)
OpenAI is an AI research and deployment company with the mission to ensure that artificial general intelligence benefits all of humanity. They are the makers of popular models like ChatGPT, DALL-E, and Whisper.
Anthropic (Claude)
Anthropic (Claude)
AI research and products that put safety at the frontier. Introducing Claude, a next-generation AI assistant for your tasks, no matter the scale.
Google Sheets
Google Sheets
Use Google Sheets to create and edit online spreadsheets. Get insights together with secure sharing in real-time and from any device.
Telegram
Telegram
Telegram, is a cloud-based, cross-platform, encrypted instant messaging (IM) service.
Google Drive
Google Drive
Google Drive is a file storage and synchronization service which allows you to create and share your work online, and access your documents from anywhere.
Google Calendar
Google Calendar
With Google Calendar, you can quickly schedule meetings and events and get reminders about upcoming activities, so you always know what’s next.
Shopify
Shopify
Shopify is a complete commerce platform that lets anyone start, manage, and grow a business. You can use Shopify to build an online store, manage sales, market to customers, and accept payments in digital and physical locations.
Supabase
Supabase
Supabase is an open source Firebase alternative.
MySQL
MySQL
MySQL is an open-source relational database management system.
PostgreSQL
PostgreSQL
PostgreSQL is a free and open-source relational database management system emphasizing extensibility and SQL compliance.
Premium
AWS
AWS
Amazon Web Services (AWS) offers reliable, scalable, and inexpensive cloud computing services.
Premium
Twilio SendGrid
Twilio SendGrid
Send marketing and transactional email through the Twilio SendGrid platform with the Email API, proprietary mail transfer agent, and infrastructure for scalable delivery.
Amazon SES
Amazon SES
Amazon SES is a cloud-based email service provider that can integrate into any application for high volume email automation
Premium
Klaviyo
Klaviyo
Email Marketing and SMS Marketing Platform
Premium
Zendesk
Zendesk
Zendesk is award-winning customer service software trusted by 200K+ customers. Make customers happy via text, mobile, phone, email, live chat, social media.
Premium
ServiceNow
ServiceNow
The smarter way to workflow
Slack
Slack
Slack is a channel-based messaging platform. With Slack, people can work together more effectively, connect all their software tools and services, and find the information they need to do their best work — all within a secure, enterprise-grade environment.
Microsoft Teams
Microsoft Teams
Microsoft Teams has communities, events, chats, channels, meetings, storage, tasks, and calendars in one place.