LogoLogo
Get a demoLog inAcademyDevelopersMore docs
  • Bird CRM docs
    • Explore all products
    • Use cases
      • Bird for travel
        • Abandoned search recovery
        • Flight confirmation
        • Holiday search campaigns
        • Price change alerts
    • About Bird CRM
  • Inbox
    • Inbox
      • Concepts
        • Reports
      • Admin guide
        • Agents
          • Invite an agent to Inbox
          • Remove an agent from Inbox
          • FAQs
        • Tags
        • Routing
        • Teams
        • Feeds
        • Sender profiles
        • Reporting
      • Agent guide
        • 📚1. The basics
        • ⏰2. Your availability status
        • ✉️3. Send and receive messages
        • 💬4. Manage conversations
        • 👥5. View conversation participants
        • 👤6. View a contact's profile
  • Campaigns
    • Campaigns
      • Quickstarts
        • Send a campaign
      • Concepts
        • A/B tests
          • FAQs
        • Branded links
        • Calendar view
        • Campaign tags
        • Frequency limits
        • Scheduling
      • How-to
        • Schedule a campaign
        • Run an A/B test
        • Replicate a campaign
    • WhatsApp campaigns
      • How-to
        • Send a WhatsApp campaign
    • Email campaigns
      • How-to
        • Send an email campaign
    • SMS campaigns
      • Concepts
        • Best practices for MMS campaigns
      • How-to
        • Send an SMS campaign
    • Push notifications
      • How-to
        • Send a push notification campaign
  • Automation
    • Journeys
      • Quickstarts
        • Create an abandoned cart recovery journey
      • Concepts
        • Journey templates
        • Journey runs
        • Journey insights
        • Journey reports
      • How-to
        • Use a send message step in a journey
        • Use a wait step in a journey
        • Use a conditional step in a journey
        • Use an update contact step in a journey
        • Use an end journey step in a journey
    • Flows
      • Quickstarts
        • Use template flows
        • Build an inbound flow
      • Concepts
        • Capabilities and limitations
        • Triggers
          • Agent triggers
          • Connector triggers
            • HubSpot triggers
          • Contact triggers
          • Conversation triggers
          • Feed item triggers
          • Message lifecycle triggers
          • Voice triggers
          • Webhook triggers
          • HTTP endpoint trigger
          • WhatsApp flow endpoint trigger
        • Actions
          • Bird API actions
            • Bots actions | API
            • Channel actions | API
            • Collaboration actions | API
            • Conversation actions | API
            • Engagements actions | API
            • Number management actions | API
          • Core actions
            • How to set up global variables in Flows
          • Contact actions
          • Channel actions
          • Conversation actions
          • Connector actions
            • HubSpot actions
            • Open AI actions
          • Voice actions
      • How-to
        • Route conversations based on language
        • Route conversations based on sentiment
        • Set up a business hours auto-responder
        • Create a simple auto-responder
        • Set up conversational marketing
        • Create an FAQ bot
    • Approval Flow
  • Audience & Contacts
    • Sign-up forms
      • Quickstarts
        • Create a sign-up form
        • Create quizzes
      • Concepts
        • Sign-up process
        • Display
        • Colors
        • Targeting
        • Languages
        • Sign-up form analytics
    • Lists and segments
      • Quickstarts
        • Create a segment
      • Concepts
        • Segments
        • Lists
      • How-to
        • Create a segment based on contact activity
        • View contacts in a segment
        • Edit the setup of a segment
        • Delete a segment
        • Create a list
    • Contacts
      • Concepts
        • Contacts
        • Contacts directory
        • Contact profiles
        • Consent and subscriptions
          • Suppressions
          • Managing unsubscribes
          • Opt-ins, consent, and subscription statuses
            • Contacts with a 'blank' subscription status
      • How-to
        • Add contacts
        • Update the subscription status of your existing contacts
        • Send marketing campaigns to contacts with a 'blank' subscription status
        • Export contacts
  • Content
    • Email templates
      • Concepts
        • Email content, styling, and personalization
        • Email design best practices
        • Advanced Email Templating
      • How-to
        • Create an email template
        • Import a custom HTML email
        • Use a prebuilt email template
        • Create personalized abandoned cart, browse and order placed emails
    • Message templates
      • Quickstarts
        • Create a message template
      • Concepts
        • Localization
        • Versioning
        • WhatsApp message templates
          • WhatsApp approved message templates
          • Reply to open conversation message template
          • Commerce messages
        • Apple Messages for Business
        • Push notifications
      • How-to
        • Localize a message template
        • Add variables to a message template
        • Create an SMS message template
        • Apple Messages for Business
          • Use dynamic variables in Apple Messages templates
          • Create a text Apple Messages template
          • Create an image Apple Messages template
          • Create a location Apple Messages template
          • Create a file Apple Messages template
          • Create a rich link Apple Messages template
          • Create a list picker Apple Messages template
          • Create authentication Apple Messages message types
          • Create a quick reply Apple Messages template
          • Create a time picker Apple Messages template
          • Create an iMessage App message template
          • Create a payment Apple Messages template
        • WhatsApp message templates
          • Create a WhatsApp approved message template
          • Create a reply to open conversation WhatsApp message template
          • Create a single product WhatsApp message template
          • Create a catalog WhatsApp message template
          • Create a coupon WhatsApp message template
          • Create an action WhatsApp message template
          • Create a limited time offer WhatsApp message template
          • Create a carousel WhatsApp message template
          • Create Approved WhatsApp Flows Template
          • Create reply to open conversation WhatsApp Flows Template
        • Create Push Notifications message templates
    • Chat widgets
      • Concepts
        • Send and receive messages
      • How-to
        • Build and install a chat widget on a Shopify store
        • Build and install a chat widget on your website
    • Media Library
      • How to Upload Images to the Media Library
    • Translation files
      • Creating and using translation files
    • External Data Sources
    • Lookup Tables
    • Discounts
    • Lookup tables
      • Managing lookup tables
      • Using lookup tables in Flows
    • Products
      • Custom Product Catalog Source
  • Analytics
    • Analytics
      • Concepts
        • Reporting metrics
        • Understanding the Attribution Model
        • List-unsubscribe in email headers
        • Understand Open Tracking
    • Channel analytics
      • Concepts
        • Channel logs
      • How-to
        • Analyze the performance of your channels
    • Campaign reports
      • Concepts
        • WhatsApp campaign reports
        • Email campaign reports
        • SMS campaign reports
      • How-to
        • View campaign reports
        • View A/B test campaign reports
        • See an overview campaign performance
  • Channels
    • Channels
      • Concepts
        • Quiet hours
      • Quickstarts
        • Find and install a channel
        • View information about an installed channel
        • View Channel Logs
      • Supported channels
        • Apple Messages for Business
          • Quickstarts
            • Install Apple Messages for Business
            • Use Apple Messages for Business
          • Concepts
            • Typing indicators
            • User device capabilities
          • How-to
            • Complete onboarding
            • Use entry points
            • Route messages
            • Send messages
            • Use Apple Pay
        • Email
          • Install email
          • Forwarding emails from Gmail
          • IP pools
          • Configure BIMI
        • Facebook Messenger
          • Install Facebook Messenger
          • Use Facebook Messenger
          • Facebook Messenger message types
        • Instagram Messaging
          • Install Instagram Messaging
          • Use Instagram Messaging
          • FAQs and Best Practices
          • Instagram message types
        • LINE
          • Install LINE
        • LinkedIn Pages Messaging
          • Install LinkedIn Pages messaging
          • Use LinkedIn Pages Messaging
          • LinkedIn Pages Messaging Types
        • Numbers
          • Quickstarts
            • Find and buy a new number
            • Activate a number
          • Concepts
            • Number types
            • Know-Your-Customer (KYC)
            • Activation, approval, and rejection
            • Number restrictions in China
          • How-to
            • Use a number
            • Cancel a number
            • Troubleshooting
            • FAQs
        • Push notifications
        • Google RCS
          • Create a Google RCS agent and install Google RCS as a channel
          • Testing and launching your agent
          • Create a Google RCS message template
          • RCS message template types
          • Create and send a Google RCS campaign
          • Create an RCS lead nurture journey with a fallback
          • Use RCS with an AI Agent
          • Grow RCS subscribers with a sign-up form
        • SMS
          • Quickstarts
            • Install SMS
            • Toubleshoot SMS Deliveries Faliures
            • (Missing) SMS delivery status
            • Troubleshoot Channel Health
          • Concepts
            • SMS parts and message length
            • SMS message types and compliance
            • Opt-in and opt-out compliance
            • Choose the right sender : Availability and restrictions by country
              • SMS Country Information Guide: Africa (A-L)
              • SMS Country Information Guide: Africa (M-Z)
                • South Africa
                • Nigeria
              • SMS Country Information Guide: Asia (A-K)
                • Japan
                • India
                • China
              • SMS Country Information Guide: Asia (L-Z)
                • Malaysia
                • Singapore
              • SMS Country Information Guide: Caribbean
              • SMS Country Information Guide: Central America
              • SMS Country Information Guide: Europe (A-M)
              • SMS Country Information Guide: Europe (N-Z)
              • SMS Country Information Guide: Middle East
                • United Arab Emirates
              • SMS Country Information Guide: North America
                • Messaging Best Practices - NORAM SMS / MMS
                • Canada
                • United States
                • Prohibited Content - NORAM SMS / MMS
              • SMS Country Information Guide: Oceania
                • New Zealand
                • Australia
              • SMS Country Information Guide: South America
            • MMS sizes and limitations
            • Automatic sender selection
            • SMS Registration
              • Use case requirements for SMS Registration
              • Setting up a SMS consent flow
              • SMS Privacy Policies
              • SMS Toll-free number
                • TFN Verification
                • Additional Costs for using TFN
                • How-to Guides
                  • Purchase a Toll Free Number via Bird
                  • Register a US or Canadian TFN for SMS via Bird
              • SMS 10DLC
                • How-to Guides
                  • Purchase a 10DLC number via Bird
                  • Register a 10DLC brand via Bird
                  • Register a 10DLC campaign via Bird
                  • Install SMS 10DLC
                  • Delete inactive 10DLC campaigns to avoid additional charges
                • Throughput and Daily Caps
                • Brand registration
                • Campaign registration
                • Additional costs for using 10DLC
                • 10DLC FAQs
            • Page 1
        • WhatsApp
          • Quickstarts
            • Before you start
            • Install WhatsApp
          • Concepts
            • WhatsApp for Business
            • Accounts and verification levels
              • Verified Facebook Business Manager Account
              • Official WhatsApp Business Account (Green tick)
            • Use WhatsApp
            • WhatsApp message types
            • WhatsApp's Customer Care Window
            • FAQs
          • How-to
            • Verify your Facebook Business Manager Account
            • Set up commerce messaging
              • Product inquiries
              • Product orders
            • Create a WhatsApp Flow
              • Create a flow
              • Testing your flow
              • Publishing and sending your flow
              • Handling Flow submission
            • Enable conversational components
            • Become a WhatsApp Tech Provider
              • Onboard as a Tech Provider
              • Connecting to Bird as solutions provider
              • Meta Tech Partner Migration 2024
        • Telegram
          • Install Telegram
          • Bot commands setup
  • AI
    • AI
      • Quickstarts
        • Create an FAQ model
        • Build a detect intent model
      • Concepts
        • AI Assistants
          • Agent Assistant
          • Flows Assistant
          • Studio Assistant
          • FAQ Assistant
          • Audience Assistant
        • AI flow actions
        • AI integrations
        • Detect language: Supported languages
      • How-to
        • Set up and deploy automated FAQs
        • Set up and deploy detect intent models
    • AI Agents
      • Concepts
        • Knowledge bases
        • OpenAI token usage
      • How-to
        • Build a knowledge base
        • Set up an AI Agent
        • Deploy an AI Agent
  • Payments
    • Bird Pay (Beta)
      • Quick Start
        • How to get Bird Pay access?
      • Concepts
        • Onboarding
        • Payment Link
        • Wallet
          • Transfer
          • Recipient
        • Payments
          • Disputes
        • My customers
        • Payouts
        • Payment methods
        • Bird Pay Coverage
        • Strong Customer Authentication (SCA)
      • How-to
        • Create a Payment link
        • Refund a Payment
        • Manage Payout
        • Respond to a Dispute
        • How to set up MFA using the Authenticator app?
      • FAQs
        • Why was my onboarding unsuccessful?
        • How do I update my business address?
        • What are foreign currency fees on my Bird Payments?
        • How to raise an issue with Bird Pay with support?
  • Integrations
    • Integrations
      • Quickstarts
        • Find and install an integration
      • Concepts
        • Integration data sync
      • Supported integrations
        • ActiveCampaign
        • OPERA Cloud
        • Calendly
        • Easyship
        • Google Cloud Translation AI
        • HubSpot
        • Magento 1
        • Magento 2
        • Monday.com
        • Notion
        • OpenAI
        • Rebrandly
        • Salesforce
        • Shopify
        • SugarCRM
        • Zoho CRM
        • TikTok Ads
        • Typeform
        • WooCommerce
        • Zendesk Support
        • Google BigQuery
        • Snowflake
        • Amazon S3
        • Salesforce Marketing Cloud
        • Meta ads
        • Google Ads
  • Account & Billing
    • Account
      • Organization settings
        • General
        • Single-Sign On (SSO)
          • Set up Single-Sign On (SSO)
          • Enforce Single-Sign On (SSO)
          • Entra ID
          • Google Workspaces
          • Okta
        • SCIM
          • Okta setup
          • Entra ID
        • Security Settings
        • Business profile
        • Workspaces
        • Plans & Billing
        • Wallets
        • Users
        • Access policies
        • Access roles
        • Access keys
        • How to find your Organization ID
        • How to find a Workspace ID
        • How to limit a user's access to a single workspace
        • How to download usage report?
        • How to pay (settle) invoices via wallet?
  • Help & Reference
    • Bird support
      • Invite Bird support
    • Deliverability & compliance
      • Email compliance - Bulk sending
      • United States SMS/MMS compliance
        • Key US Regulations
        • General US content restrictions
        • US SMS/MMS compliance
        • US Voice compliance
        • US state-level laws and regulations
        • US compliance & best practices checklist
        • US compliance FAQs
      • Singapore SMS Compliance
    • Data protection
      • Approved subprocessors
    • Release notes
    • Glossary
Powered by GitBook
On this page
  • Step 1: Creating External Data Sources
  • Create an external data source
  • Step 2: Using External Data Sources in Email

Was this helpful?

  1. Content

External Data Sources

Last updated 1 month ago

Was this helpful?

Integrating external data sources into email templates allows for highly personalized and dynamic content, improving engagement and relevance. This guide will walk you through setting up external data sources and utilizing them in your email templates.

Step 1: Creating External Data Sources

External data sources provide dynamic content to your email templates by pulling information from external APIs. This is useful for:

  • Personalizing content based on an external feed

  • Displaying real-time data like flight status from an API

  • Customizing links by passing parameters and getting back final links through an external tool

Create an external data source

  1. Navigate to Marketing app and click on Content

  2. Under Content, Click on External data sources > Create External Data Source

  1. You can give it a name. This should be a continuous string with no spaces

  2. Give the link for your API

  3. Define if you want the content to be dynamically updated or want to refresh manually once added to email and then do not want it to update.

  4. You can choose to have no authentication or define type of authentication and also add any headers

  1. Once you click on Save Configuration, the external data source is created

  2. Once created, you can test your configuration to see what output you get by clicking on Test Config as shown below.

Step 2: Using External Data Sources in Email

Once your external data source is set up correctly, you can use its output in the email template using liquid templating language.

Using External Data Source for Content Feed

For showing a content feed, you can create an API which gives a json with many items of the content feed. As an example it can look like below:

{
  "feed": {
    "version": "1.0",
    "title": "sample-data-feed",
    "items": [
      {
        "title": "Meet the Full Cast",
        "link": "https://bird.com/article",
        "description": "See who's joining previously announced stars Katie Brayben and Christian Borle in the Elton John-Jake Shears-James Graham musical.",
        "thumbnail": "https://assets.bird.com.jpg",
        "date": "2024-08-28T11:21:00",
        "creator": "Joe Black"
      },
      {
        "title": "Stars in ASL American",
        "link": "https://bird.com/article",
        "description": "Center Theatre Group is teaming up with Deaf West Theatre to reopen the Mark Taper Forum with a new production of the Green Day musical after bringing revivals of Big River and Spring Awakening to Broadway.",
        "thumbnail": "https://assets.bird.com.jpg",
        "date": "2024-08-28T11:59:00",
        "creator": "Joe Black"
      }
    ]
  }
}

The above json feed can be used as an API URL while creating an external data source.

Once created, you can refer it in an email template as follows:

  1. First add an html element and add below code to fetch the external data source by name i.e. {% datafetch "external-data-source-name" %}

  2. Use the for function in liquid to get all the items in your feed along with the path i.e. {% for <your-item> in dataFetchResponse.<your-json-path> %}.

If you only have one item, this may not be needed

Assuming sample-data-feed is the name of the external data source and feed.items is the path in the json feed to get the items, it will look like below:

{% datafetch "sample-data-feed" %}
{% for item in dataFetchResponse.feed.items %}
  1. After this is added, you can then add any image, text, button elements and refer to the external data source as below assuming the sample-data-feed structure

    1. {{item.title}} - To show title in a text element

    2. {{item.description}} - To show description in a text element

    3. {{item.link}} - To add a link in a button element

    4. {{item.thumbnail}} - To add a Image URL source in image element

  2. Now add another html block to end the fetching of external data source and the for function as shown below

{% endfor %}
{% enddatafetch %}
  1. To preview your email, you can switch over to preview and see how your content feed looks like

Note: If you have a static feed, you can refresh it here manually by selecting the external data source under Refresh External Data Source dropdown.

Using External Data Source for Customizing URLs

You can also use external data sources along with variables in the API URL. This helps to pass any parameters to an external API and give back response to be added to an email template

For example, you can use an API URL like below passing variables as shown below

To use this external data source in an email template, you have to provide the values of the variables as well in the liquid tag:

  1. Add the first html element as {% datafetch "name", "variable1", "variable1 value", "variable2, "variable2 value" %}

In below example, the first line avoids causing issues when email address has a + sign. The second line actually initiates the external data flow with the variables. You can give static values as"value" or you can provide variable references like contact.attributes.userId.

{%- assign email_for_datafetch = contact.attributes.email_address | url_encode -%}
{% datafetch "GenerateLink","email", email_for_datafetch,"referenceId", contact.attributes.userId, "locale", contact.attributes.locales[0],"name", contact.attributes.name %}

GenerateLink is the name of the external data source above.

  1. To render a customized link you can use a button element with the link defined as {{dataFetchResponse.url}} where url contains the response from your API

  1. After this, add the closing html element as below:

{% enddatafetch %}
https://api.bird.com/workspaces/?email={{email}}&referenceId={{referenceId}}&locale={{locale}}&name={{name}}api.bird.com