365 flow trigger mail chimp update when sql changes

To set up a 365 flow trigger to send an email to Mailchimp when a SQL change occurs, you'll need to follow these steps:

Prerequisites:

  1. You have a Microsoft 365 account with Flow enabled.
  2. You have a Mailchimp account with an API key.
  3. You have a SQL database with a table that you want to monitor for changes.

Step 1: Create a new Flow

  1. Log in to your Microsoft 365 account and navigate to the Flow portal.
  2. Click on "Create from blank" and select "Automated cloud flow".
  3. Choose "When an item is updated" as the trigger.
  4. Select "SQL" as the data source.
  5. Enter the connection details for your SQL database, including the server name, database name, username, and password.

Step 2: Configure the SQL trigger

  1. In the "SQL query" field, enter a query that selects the data you want to monitor for changes. For example: SELECT * FROM mytable
  2. In the "Update detection" field, select "Track changes" to enable change tracking.
  3. Set the "Update detection interval" to a suitable value, such as 1 minute.

Step 3: Add a Mailchimp action

  1. Click on the "Add an action" button and select "Mailchimp" as the action type.
  2. Enter your Mailchimp API key and select the list you want to send the email to.
  3. Choose the "Send an email" action and configure the email settings as desired.

Step 4: Configure the email template

  1. In the "Email template" field, select a template or create a new one.
  2. Configure the email content as desired, using placeholders for the data you want to include from the SQL query.

Step 5: Save and test the Flow

  1. Save the Flow and test it by updating a record in your SQL table.
  2. Verify that the email is sent to Mailchimp as expected.

Here's an example of what the Flow might look like:

Trigger: When an item is updated (SQL)

Action: Send an email (Mailchimp)

By following these steps, you can set up a 365 Flow trigger to send an email to Mailchimp whenever a change occurs in your SQL database.