← Twilio + Google Maps (Places API) integrations

Search Places with Google Maps (Places API) API on New Incoming SMS (Instant) from Twilio API

Pipedream makes it easy to connect APIs for Google Maps (Places API), Twilio and 2,700+ other apps remarkably fast.

Trigger workflow on
New Incoming SMS (Instant) from the Twilio API
Next, do this
Search Places with the Google Maps (Places API) 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 Twilio trigger and Google Maps (Places API) 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 Incoming SMS (Instant) trigger
    1. Connect your Twilio account
    2. Select a Incoming Phone Number
    3. Optional- Configure Response Message
  3. Configure the Search Places action
    1. Connect your Google Maps (Places API) account
    2. Configure Text Query
    3. Optional- Configure Included Type
    4. Optional- Configure Include Pure Service Area Businesses
    5. Optional- Select a Language Code
    6. Optional- Configure Location Bias
    7. Optional- Configure Location Restriction
    8. Optional- Configure EV Options
    9. Optional- Configure Min Rating
    10. Optional- Configure Open Now
    11. Optional- Select one or more Price Levels
    12. Optional- Select a Rank Preference
    13. Optional- Configure Region Code
    14. Optional- Configure Strict Type Filtering
  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 every time an SMS is sent to the phone number set. Configures a webhook in Twilio, tied to an incoming phone number.
Version:0.1.5
Key:twilio-new-incoming-sms

Twilio Overview

Twilio's API on Pipedream opens up a multitude of communication capabilities, allowing you to build robust, scalable, and automated workflows. With Twilio, you can send and receive SMS and MMS messages, make voice calls, and perform other communication functions programmatically. Leveraging Pipedream's seamless integration, you can connect these communications features with hundreds of other services to automate notifications, streamline customer interactions, and enhance operational efficiency.

Trigger Code

import twilio from "twilio";
import common from "../common/common-webhook.mjs";
import constants from "../../common/constants.mjs";

const MessagingResponse = twilio.twiml.MessagingResponse;

export default {
  ...common,
  key: "twilio-new-incoming-sms",
  name: "New Incoming SMS (Instant)",
  description: "Emit new event every time an SMS is sent to the phone number set. Configures a webhook in Twilio, tied to an incoming phone number.",
  version: "0.1.5",
  type: "source",
  dedupe: "unique",
  props: {
    ...common.props,
    responseMessage: {
      propDefinition: [
        common.props.twilio,
        "responseMessage",
      ],
    },
  },
  methods: {
    ...common.methods,
    getServiceType() {
      return constants.SERVICE_TYPE.SMS;
    },
    getResponseBody() {
      const twiml = new MessagingResponse();
      let responseBody = "<Response></Response>";
      if (this.responseMessage) {
        twiml.message(this.responseMessage);
        responseBody = twiml.toString();
      }
      return responseBody;
    },
    generateMeta(body, headers) {
      return {
        /** if Twilio retries a message, but we've already emitted, dedupe */
        id: headers["i-twilio-idempotency-token"],
        summary: body.Body,
        ts: Date.now(),
      };
    },
  },
};

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
TwiliotwilioappThis component uses the Twilio app.
Incoming Phone NumberincomingPhoneNumberstringSelect a value from the drop down menu.
N/Ahttp$.interface.httpThis component uses $.interface.http to generate a unique URL when the component is first instantiated. Each request to the URL will trigger the run() method of the component.
Response MessageresponseMessagestring

The message you want to send in response to incoming messages. Leave this blank if you don't need to issue a response.

Trigger Authentication

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

To connect your Twilio account to Pipedream,

API Key and API Key SID

First, create an API key in Twilio

  • There are three types of keys: Main, Standard, and Restricted. You'll need a Main key to interact with certain API endpoints, like /Accounts.
  • If you don't need to interact with those endpoints, you can use a Standard or Restricted key.

After creating your key, you'll see fields for Sid and Secret. Enter those in the fields below.

Account SID and Auth Token

Visit your Twilio Dashboard. You'll see your Account SID and Auth Token under Account info.

About Twilio

Twilio is a cloud communications platform for building SMS, Voice & Messaging applications on an API built for global scale.

Action

Description:Searches for places based on location, radius, and optional filters like keywords, place type, or name. [See the documentation](https://developers.google.com/maps/documentation/places/web-service/text-search)
Version:0.0.1
Key:google_maps_platform-search-places

Google Maps (Places API) Overview

The Google Maps (Places API) offers detailed information about physical locations, including places of interest, reviews, and other metadata. In Pipedream, you can leverage this API to create dynamic workflows that respond to location data. Whether you're building apps that track asset locations, automate location-based alerts, or provide users with local info, integrating with Google Maps can add a powerful spatial context to your services.

Action Code

import {
  LANGUAGE_CODE_OPTIONS,
  PRICE_LEVEL_OPTIONS,
  RANK_PREFERENCE_OPTIONS,
} from "../../common/constants.mjs";
import { parseObject } from "../../common/utils.mjs";
import app from "../../google_maps_platform.app.mjs";

export default {
  key: "google_maps_platform-search-places",
  name: "Search Places",
  description: "Searches for places based on location, radius, and optional filters like keywords, place type, or name. [See the documentation](https://developers.google.com/maps/documentation/places/web-service/text-search)",
  version: "0.0.1",
  type: "action",
  props: {
    app,
    textQuery: {
      type: "string",
      label: "Text Query",
      description: "The text string on which to search, for example: \"restaurant\", \"123 Main Street\", or \"best place to visit in San Francisco\". The API returns candidate matches based on this string and orders the results based on their perceived relevance.",
    },
    includedType: {
      type: "string",
      label: "Included Type",
      description: "Restricts the results to places matching the specified type defined by [Table A](https://developers.google.com/maps/documentation/places/web-service/place-types#table-a). Only one type may be specified.",
      optional: true,
    },
    includePureServiceAreaBusinesses: {
      type: "boolean",
      label: "Include Pure Service Area Businesses",
      description: "If set to `true`, the response includes businesses that visit or deliver to customers directly, but don't have a physical business location. If set to `false`, the API returns only businesses with a physical business location.",
      optional: true,
    },
    languageCode: {
      type: "string",
      label: "Language Code",
      description: "The language in which to return results.",
      options: LANGUAGE_CODE_OPTIONS,
      optional: true,
    },
    locationBias: {
      type: "object",
      label: "Location Bias",
      description: "Specifies an area to search. This location serves as a bias which means results around the specified location can be returned, including results outside the specified area. [See the documentation](https://developers.google.com/maps/documentation/places/web-service/text-search#location-bias) for further information.",
      optional: true,
    },
    locationRestriction: {
      type: "string",
      label: "Location Restriction",
      description: "Specifies an area to search. Results outside the specified area are not returned.",
      optional: true,
    },
    evOptions: {
      type: "object",
      label: "EV Options",
      description: "Specifies parameters for identifying available electric vehicle (EV) charging connectors and charging rates. [See the documentation](https://developers.google.com/maps/documentation/places/web-service/text-search#evoptions) for further information.",
      optional: true,
    },
    minRating: {
      type: "string",
      label: "Min Rating",
      description: "Restricts results to only those whose average user rating is greater than or equal to this limit. Values must be between 0.0 and 5.0 (inclusive) in increments of 0.5. For example: 0, 0.5, 1.0, ... , 5.0 inclusive. Values are rounded up to the nearest 0.5. For example, a value of 0.6 eliminates all results with a rating less than 1.0.",
      optional: true,
    },
    openNow: {
      type: "boolean",
      label: "Open Now",
      description: "If `true`, return only those places that are open for business at the time the query is sent. If `false`, return all businesses regardless of open status. Places that don't specify opening hours in the Google Places database are returned if you set this parameter to `false`.",
      optional: true,
    },
    priceLevels: {
      type: "string[]",
      label: "Price Levels",
      description: "Restrict the search to places that are marked at certain price levels. The default is to select all price levels.",
      options: PRICE_LEVEL_OPTIONS,
      optional: true,
    },
    rankPreference: {
      type: "string",
      label: "Rank Preference",
      description: "Specifies how the results are ranked in the response based on the type of query: For a categorical query such as \"Restaurants in New York City\", RELEVANCE (rank results by search relevance) is the default. You can set Rank Preference to RELEVANCE or DISTANCE (rank results by distance). For a non-categorical query such as \"Mountain View, CA\", it is recommended that you leave Rank Preference unset.",
      options: RANK_PREFERENCE_OPTIONS,
      optional: true,
    },
    regionCode: {
      type: "string",
      label: "Region Code",
      description: "The region code used to format the response, specified as a [two-character CLDR code](https://www.unicode.org/cldr/charts/46/supplemental/territory_language_information.html) value. This parameter can also have a bias effect on the search results.",
      optional: true,
    },
    strictTypeFiltering: {
      type: "boolean",
      label: "Strict Type Filtering",
      description: "Used with the `Included Type` parameter. When set to `true`, only places that match the specified types specified by includeType are returned. When `false`, the default, the response can contain places that don't match the specified types.",
      optional: true,
    },
  },
  async run({ $ }) {
    const response = await this.app.searchPlaces({
      $,
      data: {
        textQuery: this.textQuery,
        includedType: this.includedType,
        includePureServiceAreaBusinesses: this.includePureServiceAreaBusinesses,
        languageCode: this.languageCode,
        locationBias: parseObject(this.locationBias),
        locationRestriction: this.locationRestriction,
        evOptions: parseObject(this.evOptions),
        minRating: this.minRating,
        openNow: this.openNow,
        priceLevels: parseObject(this.priceLevels),
        rankPreference: this.rankPreference,
        regionCode: this.regionCode,
        strictTypeFiltering: this.strictTypeFiltering,
      },
    });

    const placeCount = response.places?.length || 0;
    $.export("$summary", `Found ${placeCount} place(s)`);

    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
Google Maps (Places API)appappThis component uses the Google Maps (Places API) app.
Text QuerytextQuerystring

The text string on which to search, for example: "restaurant", "123 Main Street", or "best place to visit in San Francisco". The API returns candidate matches based on this string and orders the results based on their perceived relevance.

Included TypeincludedTypestring

Restricts the results to places matching the specified type defined by Table A. Only one type may be specified.

Include Pure Service Area BusinessesincludePureServiceAreaBusinessesboolean

If set to true, the response includes businesses that visit or deliver to customers directly, but don't have a physical business location. If set to false, the API returns only businesses with a physical business location.

Language CodelanguageCodestringSelect a value from the drop down menu:{ "label": "Afrikaans", "value": "af" }{ "label": "Albanian", "value": "sq" }{ "label": "Amharic", "value": "am" }{ "label": "Arabic", "value": "ar" }{ "label": "Armenian", "value": "hy" }{ "label": "Azerbaijani", "value": "az" }{ "label": "Basque", "value": "eu" }{ "label": "Belarusian", "value": "be" }{ "label": "Bengali", "value": "bn" }{ "label": "Bosnian", "value": "bs" }{ "label": "Bulgarian", "value": "bg" }{ "label": "Burmese", "value": "my" }{ "label": "Catalan", "value": "ca" }{ "label": "Chinese", "value": "zh" }{ "label": "Chinese (Simplified)", "value": "zh-CN" }{ "label": "Chinese (Hong Kong)", "value": "zh-HK" }{ "label": "Chinese (Traditional)", "value": "zh-TW" }{ "label": "Croatian", "value": "hr" }{ "label": "Czech", "value": "cs" }{ "label": "Danish", "value": "da" }{ "label": "Dutch", "value": "nl" }{ "label": "English", "value": "en" }{ "label": "English (Australian)", "value": "en-AU" }{ "label": "English (Great Britain)", "value": "en-GB" }{ "label": "Estonian", "value": "et" }{ "label": "Farsi", "value": "fa" }{ "label": "Finnish", "value": "fi" }{ "label": "Filipino", "value": "fil" }{ "label": "French", "value": "fr" }{ "label": "French (Canada)", "value": "fr-CA" }{ "label": "Galician", "value": "gl" }{ "label": "Georgian", "value": "ka" }{ "label": "German", "value": "de" }{ "label": "Greek", "value": "el" }{ "label": "Gujarati", "value": "gu" }{ "label": "Hebrew", "value": "iw" }{ "label": "Hindi", "value": "hi" }{ "label": "Hungarian", "value": "hu" }{ "label": "Icelandic", "value": "is" }{ "label": "Indonesian", "value": "id" }{ "label": "Italian", "value": "it" }{ "label": "Japanese", "value": "ja" }{ "label": "Kannada", "value": "kn" }{ "label": "Kazakh", "value": "kk" }{ "label": "Khmer", "value": "km" }{ "label": "Korean", "value": "ko" }{ "label": "Kyrgyz", "value": "ky" }{ "label": "Lao", "value": "lo" }{ "label": "Latvian", "value": "lv" }{ "label": "Lithuanian", "value": "lt" }{ "label": "Macedonian", "value": "mk" }{ "label": "Malay", "value": "ms" }{ "label": "Malayalam", "value": "ml" }{ "label": "Marathi", "value": "mr" }{ "label": "Mongolian", "value": "mn" }{ "label": "Nepali", "value": "ne" }{ "label": "Norwegian", "value": "no" }{ "label": "Polish", "value": "pl" }{ "label": "Portuguese", "value": "pt" }{ "label": "Portuguese (Brazil)", "value": "pt-BR" }{ "label": "Portuguese (Portugal)", "value": "pt-PT" }{ "label": "Punjabi", "value": "pa" }{ "label": "Romanian", "value": "ro" }{ "label": "Russian", "value": "ru" }{ "label": "Serbian", "value": "sr" }{ "label": "Sinhalese", "value": "si" }{ "label": "Slovak", "value": "sk" }{ "label": "Slovenian", "value": "sl" }{ "label": "Spanish", "value": "es" }{ "label": "Spanish (Latin America)", "value": "es-419" }{ "label": "Swahili", "value": "sw" }{ "label": "Swedish", "value": "sv" }{ "label": "Tamil", "value": "ta" }{ "label": "Telugu", "value": "te" }{ "label": "Thai", "value": "th" }{ "label": "Turkish", "value": "tr" }{ "label": "Ukrainian", "value": "uk" }{ "label": "Urdu", "value": "ur" }{ "label": "Uzbek", "value": "uz" }{ "label": "Vietnamese", "value": "vi" }{ "label": "Zulu", "value": "zu" }
Location BiaslocationBiasobject

Specifies an area to search. This location serves as a bias which means results around the specified location can be returned, including results outside the specified area. See the documentation for further information.

Location RestrictionlocationRestrictionstring

Specifies an area to search. Results outside the specified area are not returned.

EV OptionsevOptionsobject

Specifies parameters for identifying available electric vehicle (EV) charging connectors and charging rates. See the documentation for further information.

Min RatingminRatingstring

Restricts results to only those whose average user rating is greater than or equal to this limit. Values must be between 0.0 and 5.0 (inclusive) in increments of 0.5. For example: 0, 0.5, 1.0, ... , 5.0 inclusive. Values are rounded up to the nearest 0.5. For example, a value of 0.6 eliminates all results with a rating less than 1.0.

Open NowopenNowboolean

If true, return only those places that are open for business at the time the query is sent. If false, return all businesses regardless of open status. Places that don't specify opening hours in the Google Places database are returned if you set this parameter to false.

Price LevelspriceLevelsstring[]Select a value from the drop down menu:{ "label": "Place price level is unspecified or unknown.", "value": "PRICE_LEVEL_UNSPECIFIED" }{ "label": "Place provides free services.", "value": "PRICE_LEVEL_FREE" }{ "label": "Place provides inexpensive services.", "value": "PRICE_LEVEL_INEXPENSIVE" }{ "label": "Place provides moderately priced services.", "value": "PRICE_LEVEL_MODERATE" }{ "label": "Place provides expensive services.", "value": "PRICE_LEVEL_EXPENSIVE" }{ "label": "Place provides very expensive services.", "value": "PRICE_LEVEL_VERY_EXPENSIVE" }
Rank PreferencerankPreferencestringSelect a value from the drop down menu:{ "label": "Rank results by search relevance.", "value": "RELEVANCE" }{ "label": "Rank results by distance.", "value": "DISTANCE" }
Region CoderegionCodestring

The region code used to format the response, specified as a two-character CLDR code value. This parameter can also have a bias effect on the search results.

Strict Type FilteringstrictTypeFilteringboolean

Used with the Included Type parameter. When set to true, only places that match the specified types specified by includeType are returned. When false, the default, the response can contain places that don't match the specified types.

Action Authentication

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

About Google Maps (Places API)

Find what you need by getting the latest information on businesses, including grocery stores, pharmacies and other important places with Google Maps.

More Ways to Connect Google Maps (Places API) + Twilio

Search Places with Google Maps (Places API) API on New Call (Instant) from Twilio API
Twilio + Google Maps (Places API)
 
Try it
Get Place Details with Google Maps (Places API) API on New Call (Instant) from Twilio API
Twilio + Google Maps (Places API)
 
Try it
Get Place Details with Google Maps (Places API) API on New Incoming SMS (Instant) from Twilio API
Twilio + Google Maps (Places API)
 
Try it
Search Places with Google Maps (Places API) API on New Phone Number from Twilio API
Twilio + Google Maps (Places API)
 
Try it
Get Place Details with Google Maps (Places API) API on New Phone Number from Twilio API
Twilio + Google Maps (Places API)
 
Try it
New Incoming SMS (Instant) from the Twilio API

Emit new event every time an SMS is sent to the phone number set. Configures a webhook in Twilio, tied to an incoming phone number.

 
Try it
New Call (Instant) from the Twilio API

Emit new event each time a call to the phone number is completed. Configures a webhook in Twilio, tied to a phone number.

 
Try it
New Phone Number from the Twilio API

Emit new event when you add a new phone number to your account

 
Try it
New Recording from the Twilio API

Emit new event when a new call recording is created

 
Try it
New Transcript Created from the Twilio API

Emit new event when a new call transcript is created

 
Try it
Make a Phone Call with the Twilio API

Make a phone call passing text, a URL, or an application that Twilio will use to handle the call. See the documentation

 
Try it
Check Verification Token with the Twilio API

Check if user-provided token is correct. See the documentation

 
Try it
Create Verification Service with the Twilio API

Create a verification service for sending SMS verifications. See the documentation

 
Try it
Delete Call with the Twilio API

Remove a call record from your account. See the documentation

 
Try it
Delete Message with the Twilio API

Delete a message record from your account. See the documentation

 
Try it

Explore Other Apps

1
-
24
of
2,700+
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.
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.
Pinterest
Pinterest
Pinterest is a visual discovery engine for finding ideas like recipes, home and style inspiration, and more.
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.