diff --git a/emf.rules.inc b/emf.rules.inc
new file mode 100644
index 0000000..5653313
--- /dev/null
+++ b/emf.rules.inc
@@ -0,0 +1,115 @@
+<?php
+
+function emf_rules_action_info() {
+  $actions = array();
+
+  $actions['emf_action_subscribe_to_list'] = array(
+    'label' => t('Subscribe to list'),
+    'arguments' => array(),
+    'module' => 'Email Marketing Framework',
+  );
+
+  return $actions;
+}
+
+function emf_action_subscribe_to_list_form($settings, &$form, &$form_state) {
+  $settings += array('list_id' => '', 'fields' => array());
+
+  if (empty($settings['list_id'])) {
+    $emf_lists = emf_db_get_lists();
+    $list_options = array();
+    foreach ($emf_lists as $list) {
+      $list_options[$list->lid] = $list->name_api;
+    }
+
+    $form['settings']['list_id'] = array(
+      '#type' => 'select',
+      '#options' => $list_options,
+      '#default_value' => $settings['list_id'],
+      '#description' => 'Select the subscriber list',
+	  '#required' => TRUE,
+    );
+
+    $form['negate']['#access'] = FALSE;
+    $form['input_help']['#access'] = FALSE;
+    $form['weight']['#access'] = FALSE;
+
+    $form['submit']['#submit'] = array('emf_action_subscribe_to_list_form_step_submit');
+    $form['submit']['#value'] = t('Continue');
+  }
+  else {
+    $list = emf_db_get_list($settings['list_id']);
+
+    $form['settings']['list'] = array(
+      '#type' => 'item',
+      '#title' => t('List'),
+	  '#value' => check_plain($list->name_api),
+    );
+
+    $form['settings']['fields'] = array(
+      '#type' => 'fieldset',
+      '#title' => t('Field mapping'),
+      '#tree' => TRUE,
+    );
+
+    foreach ($list->field_mapping as $field) {
+      $settings['fields'] += array($field->key => '');
+      $form['settings']['fields'][$field->key] = array(
+        '#title' => $field->name,
+        '#type' => 'textfield',
+        '#required' => FALSE,
+        '#default_value' => $settings['fields'][$field->key],
+      );
+    }
+  }
+}
+
+function emf_action_subscribe_to_list_form_step_submit($form, &$form_state) {
+  $form_state['element']['#settings'] += array(
+    'list_id' => $form_state['values']['settings']['list_id'],
+    'fields' => array()
+  );
+
+  $list = emf_db_get_list($form_state['values']['settings']['list_id']);
+
+  foreach ($list->field_mapping as $field) {
+    $form_state['element']['#settings']['fields'] += array($field->key => '');
+  }
+
+  $names = array();
+  foreach (array_keys($form_state['element']['#settings']['fields']) as $key) {
+    $names[] = "fields|$key";
+  }
+
+  $form_state['element']['#info']['eval input'] = $names;
+}
+
+function emf_action_subscribe_to_list_form_submit(&$settings, $form, &$form_state) {
+  $settings['fields'] = $form_state['values']['fields'];
+}
+
+function emf_action_subscribe_to_list($settings, $element, &$state) {
+  $args = func_get_args();
+
+  $list_id = $settings['list_id'];
+  $fields = $settings['fields'];
+
+  $mail = $fields['mail'];
+  unset($fields['mail']);
+  unset($fields['#eval input']);
+
+  require_once drupal_get_path('module', 'emf') .'/emf.db.inc';
+  require_once drupal_get_path('module', 'emf') .'/emf.helpers.inc';
+
+  $result = db_query("SELECT * FROM {emf_request} WHERE mail = '%s' AND lid = %d", $mail, $list_id);
+  $request = db_fetch_object($result);
+
+  if (!$request) {
+    emf_helpers_subscribe($mail, $list_id, $fields);
+  }
+}
+
+function emf_action_subscribe_to_list_label($settings) {
+  $list = emf_db_get_list($settings['list_id']);
+  return t("Subscribe to list '@list'", array('@list' => $list->name_api));
+}
\ No newline at end of file
