We will learn how Dialogflow connects with backend systems to provide rich and dynamic responses to users questions. We will use the same Agent that we created in previous labs “Appointment Scheduler”. In the Agent’s GCP project we will enable Google Calendar API and a service account to access google calendar. Then we create the fulfillment and use the credentials we generated for the calendar access to connect it with the fulfillment. Finally we will test to see if the calendar invites are being set up per user request.

What is Fulfillment?

Fulfillment is code that’s deployed as a webhook that lets your Dialogflow agent call business logic on an intent-by-intent basis. During a conversation, fulfillment allows you to use the information extracted by Dialogflow’s natural language processing to generate dynamic responses or trigger actions on your back-end.

Most Dialogflow agents make use of fulfillment. The following are some example cases where you can use fulfillment to extend an agent:

Enable Calendar API


Setup Service Account



Calendar Setup





Setup Fulfillment in Dialoflow

Add Service Account and Calendar ID to Fulfillment




const timeZone = ‘America/Chicago’;

const timeZoneOffset = ‘-05:00’;

Enable Fulfillment response


Test Your Chatbot!

Let’s test our chatbot, you can test it in the simulator or use the web or google home integration we have learnt in previous codelabs.



You created a fulfillment using inline editor and integrated with Google Calendar. Think of more such integrations like these.